Configuration
Configuration is the schema for terraform definitions in terraform controller
Version v1alpha1
Properties
.apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
.kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
.metadata
.spec
ConfigurationSpec defines the desired state of a terraform
.spec.auth
Auth is used to configure any options required when the source of the terraform module is private or requires credentials to retrieve. This could be SSH keys or git user/pass or AWS credentials for an s3 bucket.
.spec.auth.name
name is unique within a namespace to reference a secret resource.
.spec.auth.namespace
namespace defines the space within which the secret name must be unique.
.spec.enableAutoApproval
EnableAutoApproval when enabled indicates the configuration does not need to be manually approved. On a change to the configuration, the controller will automatically approve the configuration. Note it still needs to adhere to any checks or policies.
.spec.enableDriftDetection
EnableDriftDetection when enabled run periodic reconciliation configurations looking for any drift between the expected and current state. If any drift is detected the status is changed and a kubernetes event raised.
.spec.module
Module is the URL to the source of the terraform module. The format of the URL is a direct implementation of terraform’s module reference. Please see the following repository for more details https://github.com/hashicorp/go-getter
.spec.plan
Plan is an optional reference to a plan this configuration is associated with. If not set and a policy exists to enforce a plan, the configuration will be rejected.
.spec.plan.name
Name is the name of the plan this configuration is associated with
.spec.plan.revision
Revision is the revision of the plan this configuration is associated with
.spec.providerRef
ProviderRef is the reference to the provider which should be used to execute this configuration.
.spec.providerRef.name
Name is the name of the provider which contains the credentials to use for this configuration.
.spec.providerRef.namespace
Namespace is the namespace of the provider itself.
.spec.terraformVersion
TerraformVersion provides the ability to override the default terraform version. Before changing this field its best to consult with platform administrator. As the value of this field is used to change the tag of the terraform container image.
.spec.valueFrom
ValueFromSource is a collection of value from sources, where the source of the value is taken from a secret
.spec.valueFrom[*]
ValueFromSource defines a value which is taken from a secret
.spec.valueFrom[*].context
Context is the context is the name of the terraform context where the value should be retrieved from
.spec.valueFrom[*].key
Key is the key in the secret which we should used for the value
.spec.valueFrom[*].name
Name is the name which we use when injecting the value into the terraform code i.e. the secret may contain data.DB_HOST but you call this database_hostname. Note, for backwards compatiability if no name is provided, we using the key at the name
.spec.valueFrom[*].optional
Optional indicates the secret can be optional, i.e if the secret does not exist, or the key is not contained in the secret, we ignore the error
.spec.valueFrom[*].secret
Secret is the name of the secret in the configuration namespace
.spec.variables
Variables provides the inputs for the terraform module itself. These are passed to the terraform executor and used to execute the plan, apply and destroy phases.
.spec.writeConnectionSecretToRef
WriteConnectionSecretToRef is the name for a secret. On execution of the terraform module any module outputs are written to this secret. The outputs are automatically uppercased and ready to be consumed as environment variables. WriteConnectionSecretRef is the secret where the terraform outputs will be written.
.spec.writeConnectionSecretToRef.keys
Keys is a collection of name used to filter the terraform output. By default all keys from the output of the terraform state are written to the connection secret. Here we can define exactly which keys we want from that output.
.spec.writeConnectionSecretToRef.keys[*]
.spec.writeConnectionSecretToRef.name
Name is the of the secret where you want to the terraform output to be written. The terraform outputs will be written to the secret as a key value pair. All are uppercased can read to be consumed by the workload.
.status
ConfigurationStatus defines the observed state of a terraform
.status.conditions
Conditions represents the observations of the resource’s current state.
.status.conditions[*]
Condition is the current observed condition of some aspect of a resource
.status.conditions[*].detail
Detail is any additional human-readable detail to understand this condition, for example, the full underlying error which caused an issue
.status.conditions[*].lastTransitionTime
LastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
.status.conditions[*].message
Message is a human readable message indicating details about the transition. This may be an empty string.
.status.conditions[*].name
Name is a human-readable name for this condition.
.status.conditions[*].observedGeneration
ObservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
.status.conditions[*].reason
Reason contains a programmatic identifier indicating the reason for the condition’s last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
.status.conditions[*].status
Status of the condition, one of True, False, Unknown.
.status.conditions[*].type
Type of condition in CamelCase or in foo.example.com/CamelCase. — Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
.status.costs
Costs is the predicted costs of this configuration. Note this field is only populated when the integration has been configured by the administrator.
.status.costs.enabled
Enabled indicates if the cost integration was enabled when this configuration was last executed.
.status.costs.hourly
Hourly is the hourly estimated cost of the configuration
.status.costs.monthly
Monthly is the monthly estimated cost of the configuration
.status.driftTimestamp
DriftTimestamp is the timestamp of the last drift detection
.status.lastReconcile
LastReconcile describes the generation and time of the last reconciliation
.status.lastReconcile.generation
Generation is the generation reconciled on the last reconciliation
.status.lastReconcile.time
Time is the last time the resource was reconciled
.status.lastSuccess
LastSuccess descibes the generation and time of the last reconciliation which resulted in a Success status
.status.lastSuccess.generation
Generation is the generation reconciled on the last reconciliation
.status.lastSuccess.time
Time is the last time the resource was reconciled
.status.resourceStatus
ResourceStatus indicates the status of the resources and if the resources are insync with the configuration
.status.resources
Resources is the number of managed cloud resources which are currently under management. This field is taken from the terraform state itself.
.status.terraformVersion
TerraformVersion is the version of terraform which was last used to run this configuration