Using security_groups instead of the correct vpc_security_group_ids on an instance within VPC results in instance recreation on each apply #1445
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
Terraform Version
Terraform v0.10.2
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
This dumps a load of PII from the AWS Provider. If it is really needed I can provide a redacted version
Panic Output
N/A
Expected Behavior
Error on the first apply for using
security_groups
with anaws_instance
assigned to anaws_subnet
within anaws_vpc
OR
Carry on being kind and figure out that the intention was to attach the
vpc_security_group_ids
as done on first apply. Maybe output a warning that the wrong argument is being used.Actual Behavior
On first
terraform apply
the VPC security groups are linked to the instance within the VPC subnet. Runningterraform apply
a second time (with no changes) results in the instance being recreatedSteps to Reproduce
terraform apply
terraform apply
Important Factoids
N/A
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
Similar to this: hashicorp/terraform#14416
The text was updated successfully, but these errors were encountered: