-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix issues with missing context when enabled=false (#13)
Co-authored-by: mariusz.wojakowski <[email protected]>
- Loading branch information
1 parent
55cca69
commit 61b48f6
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
locals { | ||
# Get a name from the descriptor. If not available, use default naming convention. | ||
# Trim and replace function are used to avoid bare delimiters on both ends of the name and situation of adjacent delimiters. | ||
name_from_descriptor = trim(replace( | ||
name_from_descriptor = local.enabled ? trim(replace( | ||
lookup(module.this.descriptors, "module-resource-name", module.this.id), "/${module.this.delimiter}${module.this.delimiter}+/", module.this.delimiter | ||
), module.this.delimiter) | ||
), module.this.delimiter) : null | ||
|
||
enabled = module.this.enabled | ||
} |