You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use resource_id directly for coder_metadata association
Previously, coder_metadata resources would associate with the wrong
Terraform resource because the implementation relied on graph traversal
instead of using the explicit resource_id attribute.
This fix:
- Builds a map from resource IDs to their labels for direct lookup
- Uses the resource_id attribute to find the target resource directly
- Falls back to graph traversal only if resource_id lookup fails
- Adds logging when resource_id is not found in the state
This ensures that metadata is correctly associated with the intended
resource, even when there are complex dependencies in the Terraform
configuration.
Fixes the issue where coder_metadata would incorrectly associate with
resources it references in its values rather than the resource specified
in resource_id.
0 commit comments