Skip to content

Commit

Permalink
Merge pull request #185 from boltops-tools/expansion
Browse files Browse the repository at this point in the history
pass value through untouch when expand method not defined
  • Loading branch information
tongueroo authored Jan 4, 2022
2 parents e7ba9c7 + fb41a37 commit 8fde709
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/terraspace/plugin/expander/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ def strip(string)
.sub('TMP_KEEP_HTTP', '://') # restore :// IE: https:// or http://
end

def var_value(name)
name = name.sub(':','').downcase
value = send(name).to_s
def var_value(unexpanded)
name = unexpanded.sub(':','').downcase
if respond_to?(name)
value = send(name).to_s
else
return unexpanded
end
if name == "namespace" && Terraspace.config.layering.enable_names.expansion
value = friendly_name(value)
end
Expand Down

0 comments on commit 8fde709

Please sign in to comment.