Skip to content

Improved dependency application in exported HCL #625

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gerrytan
Copy link
Member

@gerrytan gerrytan commented May 27, 2025

This PR improves dependency application in the exported HCL by refactoring the deduplication logic and respecting transitive dependency when selecting implicit / depends_on strategy.

Given the below dependency graph:

flowchart LR
  A --"rg_name"--> R["Res. group"]
  B --"a_id"--> A
  B --"rg_name"-->R
Loading

The exported HCL of A will have a depends_on to the resource group as per current behaviour, but B now only have implicit azurerm_a_resource.res-1.id TF address reference. The logic now understands that the transitive dependency to the Res. group is implied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant