terraform-azurerm-caf
terraform-azurerm-caf copied to clipboard
fix(combined_objects): replace try() with lookup()
Issue-id
PR Checklist
- [ ] I have added example(s) inside the [./examples/] folder
- [ ] I have added the example(s) to the integration test list for normal (~30 minutes) or long runner >30 minutes
- [x] I have checked the coding conventions as per the wiki
- [x] I have checked to ensure there aren't other open Pull Requests for the same update/change?
Description
try() tends to introduce inconsistencies when building the resource graph, leading to replacements of resources due to changes in reference maps ( e.g. https://github.com/aztfmod/terraform-azurerm-caf/issues/965 ).
This is covering a edge case, when referencing remote_objects from within the same terraform run.
In our particular scenario, we are giving in managed identities into remote_objects for use in AKS, which are previously created due to an known issue https://github.com/aztfmod/terraform-azurerm-caf/issues/928. When now adding another managed_identity into the remote_objects, we are experiencing a similar force replacement issue as mentioned.
Does this introduce a breaking change
- [ ] YES
- [x] NO