Commit 64d86ec4 authored by Daisuke Fujita's avatar Daisuke Fujita

Add CLI command for IAM role

parent eab94ae9
......@@ -48,6 +48,12 @@ module Terraforming
execute(Terraforming::Resource::IAMPolicy, options)
end
desc "iamr", "IAM Role"
option :tfstate, type: :boolean
def iamr
execute(Terraforming::Resource::IAMRole, options)
end
desc "iamu", "IAM User"
option :tfstate, type: :boolean
def iamu
......
......@@ -130,6 +130,22 @@ module Terraforming
end
end
describe "iamr" do
context "without --tfstate" do
it "should export IAMRole tf" do
expect(Terraforming::Resource::IAMRole).to receive(:tf)
described_class.new.invoke(:iamr, [], {})
end
end
context "with --tfstate" do
it "should export IAMRole tfstate" do
expect(Terraforming::Resource::IAMRole).to receive(:tfstate)
described_class.new.invoke(:iamr, [], { tfstate: true })
end
end
end
describe "iamu" do
context "without --tfstate" do
it "should export IAMUser tf" do
......
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