module Terraspace::Compiler::Dsl::Syntax::Mod::Backend

Public Instance Methods

backend(name, props={}) click to toggle source
# File lib/terraspace/compiler/dsl/syntax/mod/backend.rb, line 3
def backend(name, props={})
  terraform = @structure[:terraform] ||= {}
  backend = terraform[:backend] ||= {}
  expansion_all!(name, props)
  backend[name] = props
end
backend_expand(backend_name, string) click to toggle source

DEPRECATED: Will be removed in future release

# File lib/terraspace/compiler/dsl/syntax/mod/backend.rb, line 26
def backend_expand(backend_name, string)
  logger.info "DEPRECATED backend_expand: instead use expansion(string)"
  Terraspace::Compiler::Expander.new(@mod, backend_name).expansion(string)
end
expansion(string, opts={}) click to toggle source

Can set opts to explicitly use an specific backend. Example:

opts = {backend: s3}

Else Terraspace autodetects the backend installed.

# File lib/terraspace/compiler/dsl/syntax/mod/backend.rb, line 20
def expansion(string, opts={})
  expander = Terraspace::Compiler::Expander.autodetect(@mod, opts)
  expander.expansion(string)
end
expansion_all!(backend_name, props={}) click to toggle source
# File lib/terraspace/compiler/dsl/syntax/mod/backend.rb, line 10
def expansion_all!(backend_name, props={})
  Terraspace::Compiler::Expander.new(@mod, backend_name).expand(props)
end