Open jcrawshaw20 opened 4 years ago
Specifying both network interface and subnet is not supported by AWS. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html
Specifying both network interface and subnet is not supported by AWS. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html
Could you please highlight, where it is mentioned..
@dilshans2k Please see the SubnetId parameter.
SubnetId The ID of the subnet to launch the instance into.
If you specify a network interface, you must specify any subnets as part of the network interface.
Type: String
Required: No
It could be clearer by adding " and you must not use this parameter." but that is what it is trying to say. Having both would be redundant and possibly in conflict. There is no need for both.
There are other reports that this is not allowed:
https://github.com/aws/aws-sdk-php/issues/231
Network interfaces and an instance-level subnet ID may not be specified on the same request
Community Note
Terraform Version
terraform: v0.12.24 provider.aws: v2.62.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Error: "network_interface": conflicts with subnet_id
Expected Behavior
Ec2 instance starts up with 2 network interfaces
Actual Behavior
Instance isn't created with that error message
Steps to Reproduce
terraform apply
Important Factoids
References
0000