diff --git a/README.md b/README.md index f3bd620..6cfaf0a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ _Brief Description of MODULE:_ * _What it does_ -* _What techonlogies it uses_ +* _What technologies it uses_ > **Warning**: > _When using "Invicton-Labs/deepmerge/null" module - pin `tflint` version to `v0.41.0` in [pre-commit.yaml](.github/workflows/pre-commit.yml) to avoid failing `tflint` checks_ diff --git a/locals.tf b/locals.tf index c457489..ea255b8 100644 --- a/locals.tf +++ b/locals.tf @@ -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 }