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
-
arn
optional computed - string -
change_description
optional - string -
data
optional computed - string -
date_created
optional computed - string -
description
optional - string -
encrypted
optional computed - bool -
id
optional computed - string -
kms_key_id
optional - string -
name
required - string -
owner
optional computed - string -
platform
required - string -
supported_os_versions
optional - set of string -
tags
optional - map from string to string -
type
optional computed - string -
uri
optional - string -
version
required - 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
-
Name
required - String -
Version
required - String -
Description
optional - String -
ChangeDescription
optional - String -
Platform
required - String -
Data
optional - String -
KmsKeyId
optional - String -
Tags
optional - Map -
Uri
optional - String -
SupportedOsVersions
optional - 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.