Skip to main content

Revision

Revision is the schema for a revision

Full name:
revisions.terraform.appvia.io
Group:
terraform.appvia.io
Singular name:
revision
Plural name:
revisions
Scope:
Cluster
Versions:
v1alpha1

Version v1alpha1

Properties

.apiVersion

string

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

string

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

object

.spec

object

RevisionSpec defines the desired state of a configuration plan revision

.spec.configuration

objectRequired

Configuration is the configuration which this revision is providing to the consumer.

.spec.configuration.auth

object

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

string

name is unique within a namespace to reference a secret resource.

.spec.configuration.auth.namespace

string

namespace defines the space within which the secret name must be unique.

.spec.configuration.enableAutoApproval

boolean

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

boolean

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

stringRequired

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

object

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

stringRequired

Name is the name of the plan this configuration is associated with

.spec.configuration.plan.revision

stringRequired

Revision is the revision of the plan this configuration is associated with

.spec.configuration.providerRef

object

ProviderRef is the reference to the provider which should be used to execute this configuration.

.spec.configuration.providerRef.name

stringRequired

Name is the name of the provider which contains the credentials to use for this configuration.

.spec.configuration.providerRef.namespace

string

Namespace is the namespace of the provider itself.

.spec.configuration.terraformVersion

string

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

array

ValueFromSource is a collection of value from sources, where the source of the value is taken from a secret

.spec.configuration.valueFrom[*]

object

ValueFromSource defines a value which is taken from a secret

.spec.configuration.valueFrom[*].context

string

Context is the context is the name of the terraform context where the value should be retrieved from

.spec.configuration.valueFrom[*].key

stringRequired

Key is the key in the secret which we should used for the value

.spec.configuration.valueFrom[*].name

string

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

boolean

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

string

Secret is the name of the secret in the configuration namespace

.spec.configuration.variables

object

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

object

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

array

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[*]

string

.spec.configuration.writeConnectionSecretToRef.name

stringRequired

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

array

Dependencies is a collection of dependencies which this revision depends on such as a Provider, Terranetes version, or Revision

.spec.dependencies[*]

object

RevisionDependency defined a dependency for this revision. Currently we support Provider, Revision or Terranetes version

.spec.dependencies[*].context

object

Revision indicates this revision has a dependency on a context resource

.spec.dependencies[*].context.cloud

string

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

stringRequired

Name is the name of the context resource we are dependent on

.spec.dependencies[*].provider

object

Provider indicates this revision has a dependency on a provider resource

.spec.dependencies[*].provider.cloud

stringRequired

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

object

Terranetes indicates this revision has a dependency on a terranetes controller

.spec.dependencies[*].terranetes.version

stringRequired

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

array

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[*]

object

RevisionInput is a user defined input for a revision, such as a database name or a cache size etc.

.spec.inputs[*].default

object

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

stringRequired

Description is a short description of the input and its purpose, capabilities, etc.

.spec.inputs[*].key

string

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

boolean

Required indicates whether this input is required or not by the revision

.spec.inputs[*].type

string

Type is the format of the input, such as string, int, bool, etc.

.spec.plan

objectRequired

Plan contains the information related to the name, version, description of the revision.

.spec.plan.categories

array

Categories is a list of categories which this revision is grouped by, such as database, cache, etc.

.spec.plan.categories[*]

string

.spec.plan.changeLog

string

ChangeLog provides a human readable list of changes for this revision

.spec.plan.description

stringRequired

Description is a short description of the revision and its purpose, capabilities, etc.

.spec.plan.name

stringRequired

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

stringRequired

Revision is the version of the revision, such as 1.0.0, 1.0.1, etc.

.status

object

RevisionStatus defines the observed state of a terraform

.status.conditions

array

Conditions represents the observations of the resource’s current state.

.status.conditions[*]

object

Condition is the current observed condition of some aspect of a resource

.status.conditions[*].detail

string

Detail is any additional human-readable detail to understand this condition, for example, the full underlying error which caused an issue

.status.conditions[*].lastTransitionTime

string

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

string

Message is a human readable message indicating details about the transition. This may be an empty string.

.status.conditions[*].name

stringRequired

Name is a human-readable name for this condition.

.status.conditions[*].observedGeneration

integer

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

stringRequired

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

stringRequired

Status of the condition, one of True, False, Unknown.

.status.conditions[*].type

stringRequired

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

integer

InUse is the number of cloud resources which are currently using this revision

.status.lastReconcile

object

LastReconcile describes the generation and time of the last reconciliation

.status.lastReconcile.generation

integer

Generation is the generation reconciled on the last reconciliation

.status.lastReconcile.time

string

Time is the last time the resource was reconciled

.status.lastSuccess

object

LastSuccess descibes the generation and time of the last reconciliation which resulted in a Success status

.status.lastSuccess.generation

integer

Generation is the generation reconciled on the last reconciliation

.status.lastSuccess.time

string

Time is the last time the resource was reconciled