Skip to content

rhythmictech/terraform-aws-imagebuilder-component-shell

Repository files navigation

terraform-aws-imagebuilder-component-shell

Terraform module that creates EC2 Image Builder components

tflint tfsec yamllint misspell pre-commit-check follow on Twitter

Example

module "test_shell_component" {
  source  = "rhythmictech/imagebuilder-component-shell/aws"
  version = "~> 0.1.0"

  component_version = "1.0.0"
  description       = "Testing component"
  name              = "testing-component"
  commands          = ["echo 'Testing Component'"]
  tags              = local.tags
}

About

This module allows creation of a Shell commands component for use in EC2 Image Builder recipes.

Requirements

Name Version
terraform >= 0.14
aws >= 4.22.0

Providers

Name Version
aws 4.55.0

Modules

No modules.

Resources

Name Type
aws_imagebuilder_component.this resource
aws_caller_identity.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
change_description description of changes since last version string null no
commands List of strings. Each string is a shell command list(string) n/a yes
component_version Version of the component string n/a yes
create A flag to disable creation of the component bool true no
data_uri Use this to override the component document with one at a particular URL endpoint string null no
description description of component string null no
kms_key_id KMS key to use for encryption string null no
name name to use for component string n/a yes
phase The Image Builder phase this component is in, either 'build' or 'test'. string "build" no
platform platform of component (Linux or Windows) string "Linux" no
supported_os_versions A set of operating system versions supported by the component. If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation. set(string) null no
tags map of tags to use for CFN stack and component map(string) {} no

Outputs

Name Description
component_arn ARN of the EC2 Image Builder Component
latest_minor_version_arn ARN of the EC2 Image Builder Component

The Giants underneath this module

  • pre-commit.com/
  • terraform.io/
  • github.com/tfutils/tfenv
  • github.com/segmentio/terraform-docs