module Terraform::Aws::Remote_S3

Support AWS S3 remote state backend

Private Instance Methods

config_opts_s3() click to toggle source
# File lib/terraform_dsl/aws/remote_s3.rb, line 13
def config_opts_s3
  config = "-backend-config='key=#{@stack.stack_id}' "
  config += @stack.remote['s3'].map { |k, v| "-backend-config='#{k}=#{v}'" }.join(' ')
  config
end
options_for_s3(command) click to toggle source
# File lib/terraform_dsl/aws/remote_s3.rb, line 7
def options_for_s3(command)
  options = ''
  options = "-backend=s3 #{config_opts_s3}" if command == :config
  "terraform remote #{command} #{options}"
end