Skip to content

Commit ae9971c

Browse files
committed
fixing image recipe again
1 parent 37c7c82 commit ae9971c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313
*.pem
1414

1515
*test.yml
16+
17+
.terraform.lock.hcl

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ locals {
44
region = data.aws_region.current.name
55
update_component = var.update ? (var.platform == "Linux" ? ["arn:aws:imagebuilder:${local.region}:aws:component/update-linux/x.x.x"] : ["arn:aws:imagebuilder:${local.region}:aws:component/update-windows/x.x.x"]) : []
66
component_arns = concat(local.update_component, var.component_arns)
7+
latest_image_arn = replace(replace(aws_imagebuilder_image_recipe.this.arn, "//[0-9]+.[0-9]+.[0-9]+$/", "/x.x.x"), ":image-recipe/", ":image/")
78
}
89

910
resource "aws_imagebuilder_image_recipe" "this" {

outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
output "latest_image_arn" {
22
description = "ARN of the wildcard representing the latest EC2 Image Builder Image"
3-
value = replace(aws_imagebuilder_image_recipe.this.arn, "//[0-9]+.[0-9]+.[0-9]+$/", "/x.x.x")
3+
value = local.latest_image_arn
44
}
55

66
output "recipe_arn" {

0 commit comments

Comments
 (0)