Closed ashleygould closed 3 years ago
this is some really ugly code in config/initializers/config.rb. it relies on the hostname to obtain the SSM_ROOT_PATH.
def load_uc3_config(name:, return_key: nil) myenv = Socket.gethostname.match?(/uc3-.*-/) ? Socket.gethostname.gsub(/uc3-.*-/, '') : 'stg' resolver = Uc3Ssm::ConfigResolver.new( def_value: 'NOT_APPLICABLE', region: ENV.key?('AWS_REGION') ? ENV['AWS_REGION'] : 'us-west-2', ssm_root_path: ENV.key?('SSM_ROOT_PATH') ? ENV['SSM_ROOT_PATH'] : "/uc3/mrt/#{myenv}/"
needs a cleaner way to handle situations when SSM_ROOT_PATH is not present in ENV. Ether raise and exception or define a set of default values in a :ssm_defaults dictionary.
:ssm_defaults
I reposted this issue in mrt-doc
this is some really ugly code in config/initializers/config.rb. it relies on the hostname to obtain the SSM_ROOT_PATH.
needs a cleaner way to handle situations when SSM_ROOT_PATH is not present in ENV. Ether raise and exception or define a set of default values in a
:ssm_defaults
dictionary.