Commit 89698f92 authored by Daisuke Fujita's avatar Daisuke Fujita

Merge pull request #135 from k1LoW/support-profile

Support `--profile` option
parents d67c1c4b 562d9560
......@@ -3,6 +3,7 @@ module Terraforming
class_option :merge, type: :string, desc: "tfstate file to merge"
class_option :overwrite, type: :boolean, desc: "Overwrite existng tfstate"
class_option :tfstate, type: :boolean, desc: "Generate tfstate"
class_option :profile, type: :string, desc: "AWS credentials profile"
desc "asg", "AutoScaling Group"
def asg
......@@ -142,6 +143,7 @@ module Terraforming
def execute(klass, options)
Aws.config[:credentials] = options[:profile]) if options[:profile]
result = options[:tfstate] ? tfstate(klass, options[:merge]) : tf(klass)
if options[:tfstate] && options[:merge] && options[:overwrite]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment