https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell
Terraform module that creates EC2 Image Builder components with CloudFormation
https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell
Last synced: 7 months ago
JSON representation
Terraform module that creates EC2 Image Builder components with CloudFormation
- Host: GitHub
- URL: https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell
- Owner: rhythmictech
- License: mit
- Created: 2020-07-01T16:07:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T22:00:46.000Z (almost 3 years ago)
- Last Synced: 2025-02-25T22:46:13.811Z (12 months ago)
- Language: HCL
- Size: 36.1 KB
- Stars: 1
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# terraform-aws-imagebuilder-component-shell
Terraform module that creates EC2 Image Builder components
[](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell/actions?query=workflow%3Atflint+event%3Apush+branch%3Amain)
[](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amain)
[](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amain)
[](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amain)
[](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-shell/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amain)

## Example
```hcl
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](#requirement\_terraform) | >= 0.14 |
| [aws](#requirement\_aws) | >= 4.22.0 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 4.55.0 |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_imagebuilder_component.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/imagebuilder_component) | resource |
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [change\_description](#input\_change\_description) | description of changes since last version | `string` | `null` | no |
| [commands](#input\_commands) | List of strings. Each string is a shell command | `list(string)` | n/a | yes |
| [component\_version](#input\_component\_version) | Version of the component | `string` | n/a | yes |
| [create](#input\_create) | A flag to disable creation of the component | `bool` | `true` | no |
| [data\_uri](#input\_data\_uri) | Use this to override the component document with one at a particular URL endpoint | `string` | `null` | no |
| [description](#input\_description) | description of component | `string` | `null` | no |
| [kms\_key\_id](#input\_kms\_key\_id) | KMS key to use for encryption | `string` | `null` | no |
| [name](#input\_name) | name to use for component | `string` | n/a | yes |
| [phase](#input\_phase) | The Image Builder phase this component is in, either 'build' or 'test'. | `string` | `"build"` | no |
| [platform](#input\_platform) | platform of component (Linux or Windows) | `string` | `"Linux"` | no |
| [supported\_os\_versions](#input\_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](#input\_tags) | map of tags to use for CFN stack and component | `map(string)` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| [component\_arn](#output\_component\_arn) | ARN of the EC2 Image Builder Component |
| [latest\_minor\_version\_arn](#output\_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