AWS Image Builder Component
This page shows how to write Terraform and CloudFormation for Image Builder Component and write them securely.
aws_imagebuilder_component (Terraform)
The Component in Image Builder can be configured in Terraform with the resource name aws_imagebuilder_component. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_imagebuilder_component" "build_componment" {
data = var.data
name = var.name
platform = var.platform
version = var.version
description = var.description
resource "aws_imagebuilder_component" "fail" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
resource "aws_imagebuilder_component" "fail" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
resource "aws_imagebuilder_component" "fail" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
resource "aws_imagebuilder_component" "fail" {
data = yamlencode({
phases = [{
name = "build"
steps = [{
action = "ExecuteBash"
Parameters
-
arnoptional computed - string -
change_descriptionoptional - string -
dataoptional computed - string -
date_createdoptional computed - string -
descriptionoptional - string -
encryptedoptional computed - bool -
idoptional computed - string -
kms_key_idoptional - string -
namerequired - string -
owneroptional computed - string -
platformrequired - string -
supported_os_versionsoptional - set of string -
tagsoptional - map from string to string -
typeoptional computed - string -
urioptional - string -
versionrequired - string
Explanation in Terraform Registry
Manages an Image Builder Component.
AWS::ImageBuilder::Component (CloudFormation)
The Component in ImageBuilder can be configured in CloudFormation with the resource name AWS::ImageBuilder::Component. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
Namerequired - String -
Versionrequired - String -
Descriptionoptional - String -
ChangeDescriptionoptional - String -
Platformrequired - String -
Dataoptional - String -
KmsKeyIdoptional - String -
Tagsoptional - Map -
Urioptional - String -
SupportedOsVersionsoptional - List
Explanation in CloudFormation Registry
Components are orchestration documents that define a sequence of steps for downloading, installing, and configuring software packages or for defining tests to run on software packages. They also define validation and security hardening steps. A component is defined using a YAML document format. For more information, see Using Documents in Image Builder.
Frequently asked questions
What is AWS Image Builder Component?
AWS Image Builder Component is a resource for Image Builder of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Image Builder Component?
For Terraform, the johngraham660/terraform-aws-ec2imagebuilder, bridgecrewio/checkov and bridgecrewio/checkov source code examples are useful. See the Terraform Example section for further details.