provider/aws: Add support for ENI as Instance Primary Network Interface #12694
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an implementation of issue 2998.
I am aware to two other open PRs that attempt to address this issue, 10516 and 10244.
The PR changes the network_interface_id parameter of an aws_instance resource to be an optional parameter that conflicts with the following parameters: vpc_security_group_ids, subnet_id and associate_public_ip_address. This follows the same patterns as the two PR mentioned above.
Additionally, the network_interface_id parameter is configured with “ForceNew=true” as the primary network interface of an AWS instance can’t be changed without recreating the instance.
A new acceptance test case (TestAccAWSInstance_withNetworkInterface) is also included in the PR. It checks that specified network interface is attached to created instance and the network interface is changed (by recreating the instance) should the network_interface_id parameter be changed.
I run the acceptance tests for AWSInstance as follows:
Please note that the TestAccAWSInstance_multipleRegions test fails. This failure occurs without the PR being applied to the master branch.
From my analysis the commit that introduced this regression is 1eb9a2d.
Thank you for considering this PR.