terraform-azurerm-caf icon indicating copy to clipboard operation
terraform-azurerm-caf copied to clipboard

fix(combined_objects): replace try() with lookup()

Open sschne opened this issue 7 months ago • 0 comments

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

Testing

sschne avatar Jul 05 '24 08:07 sschne