cycloidio / terracognita

Reads from existing public and private cloud providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
MIT License
2.17k stars 163 forks source link

aws: conflic between name/id on aws_instance from launch_template #340

Closed talset closed 1 year ago

talset commented 1 year ago

General information:

Describe the bug:

when importing aws_instance created from a launch_template, both id and name are imported. But according to the doc, only one should be present https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#launch-template-specification

we should only write one (id?)

Log message

│ Error: Invalid combination of arguments
│ 
│   with module.tf.aws_instance.lueim,
│   on module-tf/ec2_elastic_compute_cloud.tf line 1232, in resource "aws_instance" "lueim":
│ 1232:     name = var.aws_instance_lueim_launch_template_0_name
│ 
│ "launch_template.0.name": only one of `launch_template.0.id,launch_template.0.name` can be specified, but `launch_template.0.id,launch_template.0.name` were specified.

Additional context