terraform-aws-transit-gateway
terraform-aws-transit-gateway copied to clipboard
fix: Change count for for_each on ram_principal_association due resource recreation
Description
Change count for for_each on aws_ram_principal_association due resource recreation.
Motivation and Context
In order to avoid recreation of the resource aws_ram_principal_association everytime that a principal is removed or inserted in the middle of the list, it's necessary to change count for for_each loop.
Breaking Changes
The meta-argument count use indices to organize the list, for instance aws_ram_principal_association.this["0"].
The meta-argument for_eachuses "key, value" to organize it, for instance aws_ram_principal_association.this["01234567890123"] where 01234567890123 will be the principal account ID for this case.
So due these differences it will cause a recreation of all existing aws_ram_principal_association resources and the people who use RAM for share the TGW will need to run terraform state mv in order to avoid this recreation.
How Has This Been Tested?
It has been tested using the module with input share_tgw = true by analysing the plan and outputs after apply.
- [ ] I have updated at least one of the
examples/*to demonstrate and validate my change(s) - [ ] I have tested and validated these changes using one or more of the provided
examples/*projects
- [x] I have executed
pre-commit run -aon my pull request
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
Folks! could you review this PR? I think it's a good improvement...
can we remove the stale label?
@antonbabenko @bryantbiggs Please, could you review this PR?
This is a breaking change and it has some fundamental issues with regards to the use of
for_each
Yes, it is! I described this breaking change into the PR description and I've tested this change...
What kind of issues we can expect different from what has been described into PR?
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
Just to remove stale label...
Maybe an approach could be to write a local module for the association and then use for_each to instantiate many instances of the module?
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
keep alive
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
Any chance to have this done? (keep alive)
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
@ebarros29 @bryantbiggs is this MR destined to be closed?
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
ka
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
Sadly inactivity seems to be a big issue in this project. Combined with PRs/issues being automatically closed after two weeks of no activity, probably many valuable contributions get lost (keep alive)
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
keep alive
Sorry guys, It has been busy days since my last comment π«
Actually I don't know if it's worth to go ahead with this PR, since we have this huge refactor #113 already marked as wip...
Sorry guys, It has been busy days since my last comment π«
Actually I don't know if it's worth to go ahead with this PR, since we have this huge refactor #113 already marked as
wip...
If it manages this issue then it should be ok to close this PR. Otherwise I'd go ahead and the refactor will pick the fix from this PR as well.
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
"Keep alive" post
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
"Keep alive" post
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
"Keep alive" post
This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days
"Keep alive" post