Skip to content

[Section 4.19 - Terraform Intermediário] - Data Sources #145

Closed Answered by chgasparoto
bernardesleao asked this question in Q&A
Discussion options

You must be logged in to vote

@bernardesleao você está tentando rodar uma imagem não compatível com a arquitetura de processor da máquina selecionada. Você vai precisar adicionar um filtro no seu bloco de data source para trazer as compatíveis.

Exemplo:

data "aws_ami" "ubuntu" {
  owners      = ["amazon"]
  most_recent = true
  name_regex  = "ubuntu"

  filter {
    name   = "architecture"
    values = ["i386", "x86_64"]
  }
}

Referências:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#filter
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html#options

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bernardesleao
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants