- Notifications
You must be signed in to change notification settings - Fork5
Create an EC2 Image Builder Recipe with Cloudformation
License
NotificationsYou must be signed in to change notification settings
rhythmictech/terraform-aws-imagebuilder-recipe
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Creates EC2 Image Builder recipes
Here's what using the module will look like
module"test_recipe" {source="rhythmictech/imagebuilder-recipe/aws"version="~> 0.2.0"description="Testing recipe"name="test-recipe"parent_image="arn:aws:imagebuilder:us-east-1:aws:image/amazon-linux-2-x86/x.x.x"recipe_version="1.0.0"tags=local.tagsupdate=truecomponent_arns=[module.test_component.component_arn,"arn:aws:imagebuilder:us-east-1:aws:component/simple-boot-test-linux/1.0.0/1","arn:aws:imagebuilder:us-east-1:aws:component/reboot-test-linux/1.0.0/1" ]}
Creates EC2 Image Builder recipes
In our experience we haven't needed to provide parameters to the components we include in an Image Builder recipe, so the easiest use case has been to simply include a list of ARNs (component_arns variable). If you need to provide parameters, you can use the separate component_parameters map, e.g.
component_arns=[module.test_component.component_arn,"arn:aws:imagebuilder:us-east-1:aws:component/simple-boot-test-linux/1.0.0/1","arn:aws:imagebuilder:us-east-1:aws:component/reboot-test-linux/1.0.0/1" ]component_parameters=[ { module.test_component.component_arn= [ {"param1" ="value1"}, {"param2" ="value2"} ], }, {"arn:aws:imagebuilder:us-east-1:aws:component/simple-boot-test-linux/1.0.0/1"= [ {"param1" ="value1"} ], } ]
| Name | Version |
|---|---|
| terraform | >= 0.12.2 |
| aws | >= 2.44 |
| Name | Version |
|---|---|
| aws | 4.49.0 |
No modules.
| Name | Type |
|---|---|
| aws_imagebuilder_image_recipe.this | resource |
| aws_region.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| block_device_mappings | List of Maps of EBS volumes to mount See examples for further usage tips. | list(any) | null | no |
| cloudformation_timeout | How long to wait (in minutes) for CFN to apply before giving up | number | 10 | no |
| component_arns | List of component ARNs to use in recipe. Order matters | list(string) | n/a | yes |
| component_parameters | A map of component arns (as specified in component_arns) that contains a list of maps of parameters (each parameter contains a name and a value) to apply to the component | map(list(map(string))) | {} | no |
| description | description of component | string | null | no |
| name | name to use for component | string | n/a | yes |
| parent_image | Image that the recipe should start with. SemVers is ok (and encouraged) | string | n/a | yes |
| platform | Platform of Recipe (Linux orWindows) | string | "Linux" | no |
| recipe_version | Version of the recipe | string | n/a | yes |
| systems_manager_agent_uninstall_after_build | Boolean value for whether or not the systems manager agent should be uninstall from the image after it is built | bool | false | no |
| tags | Map of tags to use for CFN stack and component | map(string) | {} | no |
| update | Whether recipe should include theupdate-$platform recipe before running other components | bool | true | no |
| user_data_base64 | Base64 Encoded user-data to provide when spinning up the build instance. | string | null | no |
| working_directory | Working directory to use in the build instance. ImageBuilder uses /tmp by default on Linux, which can be an issue when working with CIS-hardened images. | string | null | no |
| Name | Description |
|---|---|
| latest_image_arn | ARN of the wildcard representing the latest EC2 Image Builder Image |
| recipe_arn | ARN of the EC2 Image Builder Recipe |
- pre-commit.com/
- terraform.io/
- github.com/tfutils/tfenv
- github.com/segmentio/terraform-docs
About
Create an EC2 Image Builder Recipe with Cloudformation
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.