Modifying cidr_blocks of resource aws_security_group_rule should not force a new resource #14966
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
proposal
Proposes new design or functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
Community Note
Description
If sometimes we modify the cidr_blocks to add addtional cidr, terraform will destroy then create the resource, not add resource. This behavior will have the following issues:
1.We have sentinel policy combined with workspace auto approve. If sentinel check there is only add operation, no change or destroy. It will pass and workspace auto approve. This will not work for this scenario although we just add a cidr. In aws console, it just like add another sg rule entry which I think should make it add
2.AWS will destroy previously sg rule entry and recreate all entry at once, it may influence newly created connection although tf do the delete then create very quickly
The following is what I discussed with terraform enterprise support and he suggest I open an issue here.
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: