Revision
Revision is the schema for a revision
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
RevisionSpec defines the desired state of a configuration plan revision
.spec.configuration
Configuration is the configuration which this revision is providing to the consumer.
.spec.configuration.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.configuration.auth.name
name is unique within a namespace to reference a secret resource.
.spec.configuration.auth.namespace
namespace defines the space within which the secret name must be unique.
.spec.configuration.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.configuration.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.configuration.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.configuration.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.configuration.plan.name
Name is the name of the plan this configuration is associated with
.spec.configuration.plan.revision
Revision is the revision of the plan this configuration is associated with
.spec.configuration.providerRef
ProviderRef is the reference to the provider which should be used to execute this configuration.
.spec.configuration.providerRef.name
Name is the name of the provider which contains the credentials to use for this configuration.
.spec.configuration.providerRef.namespace
Namespace is the namespace of the provider itself.
.spec.configuration.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.configuration.valueFrom
ValueFromSource is a collection of value from sources, where the source of the value is taken from a secret
.spec.configuration.valueFrom[*]
ValueFromSource defines a value which is taken from a secret
.spec.configuration.valueFrom[*].context
Context is the context is the name of the terraform context where the value should be retrieved from
.spec.configuration.valueFrom[*].key
Key is the key in the secret which we should used for the value
.spec.configuration.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.configuration.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.configuration.valueFrom[*].secret
Secret is the name of the secret in the configuration namespace
.spec.configuration.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.configuration.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.configuration.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.configuration.writeConnectionSecretToRef.keys[*]
.spec.configuration.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.
.spec.dependencies
Dependencies is a collection of dependencies which this revision depends on such as a Provider, Terranetes version, or Revision
.spec.dependencies[*]
RevisionDependency defined a dependency for this revision. Currently we support Provider, Revision or Terranetes version
.spec.dependencies[*].context
Revision indicates this revision has a dependency on a context resource
.spec.dependencies[*].context.cloud
Cloud is the name of the cloud vendor we are dependent on, such as aws, azurerm, which the context resource is associated with
.spec.dependencies[*].context.name
Name is the name of the context resource we are dependent on
.spec.dependencies[*].provider
Provider indicates this revision has a dependency on a provider resource
.spec.dependencies[*].provider.cloud
Cloud is the name of the cloud vendor we are dependent on, such as aws, azurerm, The controller we ensure we have the provider installed before we can apply the configuration
.spec.dependencies[*].terranetes
Terranetes indicates this revision has a dependency on a terranetes controller
.spec.dependencies[*].terranetes.version
Version is used to specify the version of the terranetes resource we are dependent on. This format is based on Semantic Versioning 2.0.0 and can use ‘>=’, ‘>’, ‘<=’, and ‘<’
.spec.inputs
Inputs is a collection of inputs which this revision the consumer of this revision can or must provide. This is usually limited to contextual information such as a name for the database, the size required, a bucket name, or policy.
.spec.inputs[*]
RevisionInput is a user defined input for a revision, such as a database name or a cache size etc.
.spec.inputs[*].default
Default is the default value for this input, this is a map which must contain the field ‘value’ => ‘default value’. Default values can be any simple of complex type, such as string, int, bool, etc.
.spec.inputs[*].description
Description is a short description of the input and its purpose, capabilities, etc.
.spec.inputs[*].key
Key is the name of the variable when presented to the terraform module. If this field is not specified, the name will be used as the key instead
.spec.inputs[*].required
Required indicates whether this input is required or not by the revision
.spec.inputs[*].type
Type is the format of the input, such as string, int, bool, etc.
.spec.plan
Plan contains the information related to the name, version, description of the revision.
.spec.plan.categories
Categories is a list of categories which this revision is grouped by, such as database, cache, etc.
.spec.plan.categories[*]
.spec.plan.changeLog
ChangeLog provides a human readable list of changes for this revision
.spec.plan.description
Description is a short description of the revision and its purpose, capabilities, etc.
.spec.plan.name
Name is the name which this revision is grouped by, such as mysql, redis, etc. Multiple revisions can be grouped by the same name, presented as a list of revisions for a single plan name
.spec.plan.revision
Revision is the version of the revision, such as 1.0.0, 1.0.1, etc.
.status
RevisionStatus 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.inUse
InUse is the number of cloud resources which are currently using this revision
.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