Resource: awsImagebuilderComponent
Manages an Image Builder Component.
Example Usage
Inline Data Document
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.imagebuilderComponent.ImagebuilderComponent(this, "example", {
data: '${yamlencode({\n phases = [{\n name = "build"\n steps = [{\n action = "ExecuteBash"\n inputs = {\n commands = ["echo \'hello world\'"]\n }\n name = "example"\n onFailure = "Continue"\n }]\n }]\n schemaVersion = 1.0\n })}',
name: "example",
platform: "Linux",
version: "1.0.0",
});
URI Document
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.imagebuilderComponent.ImagebuilderComponent(this, "example", {
name: "example",
platform: "Linux",
uri: "s3://${aws_s3_object.example.bucket}/${aws_s3_object.example.key}",
version: "1.0.0",
});
Argument Reference
The following arguments are required:
name
- (Required) Name of the component.platform
- (Required) Platform of the component.version
- (Required) Version of the component.
The following attributes are optional:
changeDescription
- (Optional) Change description of the component.data
- (Optional) Inline YAML string with data of the component. Exactly one ofdata
anduri
can be specified. Terraform will only perform drift detection of its value when present in a configuration.description
- (Optional) Description of the component.kmsKeyId
- (Optional) Amazon Resource Name (ARN) of the Key Management Service (KMS) Key used to encrypt the component.skipDestroy
- (Optional) Whether to retain the old version when the resource is destroyed or replacement is necessary. Defaults tofalse
.supportedOsVersions
- (Optional) Set of Operating Systems (OS) supported by the component.tags
- (Optional) Key-value map of resource tags for the component. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.uri
- (Optional) S3 URI with data of the component. Exactly one ofdata
anduri
can be specified.
\~> NOTE: Updating data
or uri
requires specifying a new version
. This causes replacement of the resource. The skipDestroy
argument can be used to retain the old version.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- (Required) Amazon Resource Name (ARN) of the component.dateCreated
- Date the component was created.encrypted
- Encryption status of the component.owner
- Owner of the component.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.type
- Type of the component.
Import
awsImagebuilderComponents
resources can be imported by using the Amazon Resource Name (ARN), e.g.,
$ terraform import aws_imagebuilder_component.example arn:aws:imagebuilder:us-east-1:123456789012:component/example/1.0.0/1
Certain resource arguments, such as uri
, cannot be read via the API and imported into Terraform. Terraform will display a difference for these arguments the first run after import if declared in the Terraform configuration for an imported resource.