Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imagebuilder doesn't support instance metadata on builds #30

Open
youanden opened this issue Apr 3, 2022 · 1 comment
Open

Imagebuilder doesn't support instance metadata on builds #30

youanden opened this issue Apr 3, 2022 · 1 comment

Comments

@youanden
Copy link

youanden commented Apr 3, 2022

I traced this to the terraform aws provider not supporting metadata and added a ticket:
hashicorp/terraform-provider-aws#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 youanden changed the title Terraform/Imagebuilder doesn't support metadata yet Imagebuilder doesn't support instance metadata on builds Apr 3, 2022
@magenx
Copy link
Owner

magenx commented Apr 3, 2022

yes this was planned to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants