lib/terraspace/plugin/expander/interface.rb in terraspace-0.5.12 vs lib/terraspace/plugin/expander/interface.rb in terraspace-0.6.0
- old
+ new
@@ -5,10 +5,11 @@
# So the aws provider implements the region and account methods.
#
module Terraspace::Plugin::Expander
module Interface
include Terraspace::Plugin::InferProvider
+ include Terraspace::Plugin::Expander::Friendly
delegate :build_dir, :type_dir, :type, to: :mod
attr_reader :mod
def initialize(mod)
@@ -66,10 +67,14 @@
.sub(%r{/+$},'') # only remove trailing / or else /home/ec2-user => home/ec2-user
end
def var_value(name)
name = name.sub(':','').downcase
- send(name)
+ value = send(name)
+ if name == "namespace" && Terraspace.config.layering.enable_names.cache_dir
+ value = friendly_name(value)
+ end
+ value
end
def mod_name
@mod.name
end