Magento-2-aws-cluster-terraform icon indicating copy to clipboard operation
Magento-2-aws-cluster-terraform copied to clipboard

Imagebuilder doesn't support instance metadata on builds

Open youanden opened this issue 2 years ago • 1 comments

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}"
    }

youanden avatar Apr 03 '22 04:04 youanden

yes this was planned to update

magenx avatar Apr 03 '22 06:04 magenx