-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_launch_template: fix network interface device_index of 0 being ignored #23767
aws_launch_template: fix network interface device_index of 0 being ignored #23767
Conversation
0 is a legal device index, moreover a launchtemplate requires a network interface with a device index of 0 to be functional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…estAccEC2LaunchTemplate_networkInterface'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccEC2LaunchTemplate_networkInterface PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -run='TestAccEC2LaunchTemplate_networkInterface' -timeout 180m
=== RUN TestAccEC2LaunchTemplate_networkInterface
=== PAUSE TestAccEC2LaunchTemplate_networkInterface
=== RUN TestAccEC2LaunchTemplate_networkInterfaceAddresses
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceAddresses
=== RUN TestAccEC2LaunchTemplate_networkInterfaceType
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceType
=== RUN TestAccEC2LaunchTemplate_networkInterfaceCardIndex
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceCardIndex
=== RUN TestAccEC2LaunchTemplate_networkInterfaceIPv4PrefixCount
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceIPv4PrefixCount
=== RUN TestAccEC2LaunchTemplate_networkInterfaceIPv4Prefixes
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceIPv4Prefixes
=== RUN TestAccEC2LaunchTemplate_networkInterfaceIPv6PrefixCount
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceIPv6PrefixCount
=== RUN TestAccEC2LaunchTemplate_networkInterfaceIPv6Prefixes
=== PAUSE TestAccEC2LaunchTemplate_networkInterfaceIPv6Prefixes
=== CONT TestAccEC2LaunchTemplate_networkInterface
=== CONT TestAccEC2LaunchTemplate_networkInterfaceIPv4PrefixCount
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv4PrefixCount (15.70s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceType
--- PASS: TestAccEC2LaunchTemplate_networkInterface (22.27s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceCardIndex
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceType (14.14s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceIPv6PrefixCount
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceCardIndex (15.17s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceIPv6Prefixes
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv6PrefixCount (14.61s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceIPv4Prefixes
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv6Prefixes (14.60s)
=== CONT TestAccEC2LaunchTemplate_networkInterfaceAddresses
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceIPv4Prefixes (14.78s)
--- PASS: TestAccEC2LaunchTemplate_networkInterfaceAddresses (22.32s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 78.226s
@fcheung Thanks for the contribution 🎉 👏 and sorry that you hit this problem. |
@ewbankkit Do you have an estimated time for the |
This functionality has been released in v4.7.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
0 is a legal device index, moreover a launchtemplate requires a network interface with a device index of 0 to be functional
Community Note
Closes #23766
Output from acceptance testing:
I tried to write a failing test (adding
resource.TestCheckResourceAttr(resourceName, "network_interfaces.0.device_index", "0")
) but that test seemed to pass even without the change in this pr