Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.4K
Views
Error de Terraform "Su consulta no arrojó resultados"

Tengo debajo del archivo bom-asg.tf.

 data "aws_ami" "bom-ami" { most_recent = true filter { name = "tag:ami_name" values = ["${var.environment}-bom-ami"] } owners = ["****"] } resource "aws_security_group" "bom-sg" { name_prefix = "${var.environment}-bom-asg-sg" vpc_id = "${var.vpc_id}" .....

No puedo ejecutar correctamente los comandos de actualización y planificación. Estoy obteniendo los siguientes errores.

 terraform plan --var-file=environment-parity.tfvars -target=bom-asg.tf --out apply.out Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage. ------------------------------------------------------------------------ No changes. Infrastructure is up-to-date. This means that Terraform did not detect any differences between your configuration and real physical resources that exist. As a result, no actions need to be performed.

Pero cuando ejecuto actualizar. Estoy recibiendo el siguiente error.

 terraform refresh --var-file=environment-parity.tfvars data.template_file.es_access_policy_search: Refreshing state... data.aws_ami.nginx-ami: Refreshing state... data.aws_ami.php-search-ami: Refreshing state... data.aws_ami.ng-ami: Refreshing state... data.aws_ami.mysql-ami: Refreshing state... data.aws_ami.frontend-search-ami: Refreshing state... data.aws_ami.bom-ami: Refreshing state... data.aws_ami.lg-ami: Refreshing state... data.aws_ami.rabbitmq-search-ami: Refreshing state... data.aws_ami.ngas-ng-drupal-ami: Refreshing state... data.aws_ami.mongodb-ami: Refreshing state... Error: Error refreshing state: 1 error(s) occurred: * data.aws_ami.bom-ami: 1 error(s) occurred: * data.aws_ami.bom-ami: data.aws_ami.bom-ami: Your query returned no results. Please change your search criteria and try again.

¿Puedes ayudarme?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

La fuente de datos de Terraform es para acceder a un recurso existente, no para crear uno.

 data "aws_ami" "bom-ami"

Como en la documentación, la AMI ya debe existir.

  • Fuente de datos: aws_ami

Utilice esta fuente de datos para obtener el ID de una AMI registrada para su uso en otros recursos.

Si está creando una AMI a partir de una instantánea de EBS tomada de una instancia EC2 (por ejemplo, Amazon Linux EC2), entonces:

  • Recurso: aws_ami

Tenga en cuenta la diferencia entre datos y recursos .

Para crear una imagen AMI personalizada, considere también Hashicorp packer .

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!