class Idlc::Deploy::Config

def configure_tfstatev8(bucket, sub_bucket, working_directory)

def configure_tfstatev8(bucket, sub_bucket, working_directory)
  args = []
  args << '-backend=s3'
  args << '-backend-config="acl=private"'
  args << "-backend-config=\"bucket=#{bucket}\""
  args << '-backend-config="encrypt=true"'
  args << "-backend-config=\"key=#{sub_bucket}/terraform.tfstate\""
  args << "-backend-config=\"region=#{@region}\""
  Terraform::Binary.remote("config #{args.join(' ')}")
  Terraform::Binary.get("-update #{working_directory}")
end