-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Index issue while removing object in between of list #245
Comments
Agree with @kapil1699 |
In my opinion, the solution of this problem will be to switch the ingress / egress rules to a for_each system instead of using a list. However, this means that a part of the module should be updated to support this new pattern. |
@SolidSly You are right. We will have to do such an update and major rewrite of this module in the upcoming months. We already did it in some other modules under the I am going to close this issue for now. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Issue: I havr created SG with 4 inbound rules. variables for inbound rules is list in module.
Now if I am removing 1st inbound rule from list the terraform is saying tha it is going to destroy and create replacement.
Because now 2nd inbound rule comes to 1st in list that is the reason terraform is throwing that error.
How we can avoid this and remove safly without touching othet inbound rules.
Note: I have 100+ inbound rule if I remove in between from list then it could create big problem of recreation.
I found one solution of using terraform state mv but moving each time by running 100+ command seems tedious.
Please suggest.
The text was updated successfully, but these errors were encountered: