Magento-2-aws-cluster-terraform
Magento-2-aws-cluster-terraform copied to clipboard
Imagebuilder doesn't support instance metadata on builds
I traced this to the terraform aws provider not supporting metadata and added a ticket: https://github.com/hashicorp/terraform-provider-aws/issues/24006
But after manually updating in GUI and building images, the same thing happens. When I looked at the build server that was created, it had "Access to tags in instance metadata" disabled.
I think it's best to refactor to use parameters in imagebuilder.
To the build.yml:
parameters:
- PARAMETERSTORE_NAME:
type: string
description: Project name
- INSTANCE_NAME:
type: string
description: Instance name (e.g. admin/frontend)
#...
PARAMETERSTORE_NAME={{ PARAMETERSTORE_NAME }}
_INSTANCE_NAME={{ INSTANCE_NAME }}
To the imagebuilder.tf:
parameter {
name = "PARAMETERSTORE_NAME"
value = "${local.project}-env"
}
parameter {
name = "INSTANCE_NAME"
value = "${each.key}"
}
yes this was planned to update