aws_launch_template ignores device_index=0 #4475
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Milestone
Community Note
Terraform Version
Affected Resource(s)
aws_launch_template
Terraform Configuration Files
Expected Behavior
Terraform should submit the device index (0) to AWS.
Actual Behavior
Terraform ignores zero device index. AWS will then complain:
You must use a valid fully formed launch template. Each network interface requires a device index.
Steps to Reproduce
Important Factoids
By deleting the default VPC, AWS will complain
No default VPC for this user
. So I specifiednetwork_interfaces
like above and got the problem described above.I quick fixed the issue in
aws/resource_aws_launch_template.go
:I removed
&& v != 0
and when I first destroyed the resource, it got created correctly on next apply. But updates don't work, probably another comparison that needs fixing.The text was updated successfully, but these errors were encountered: