Commit 6ca62461 authored by Daisuke Fujita's avatar Daisuke Fujita

Add CLI for IAM policy

parent 7027b77d
......@@ -42,6 +42,12 @@ module Terraforming
execute(Terraforming::Resource::IAMGroupPolicy, options)
end
desc "iamp", "IAM Policy"
option :tfstate, type: :boolean
def iamp
execute(Terraforming::Resource::IAMPolicy, options)
end
desc "iamu", "IAM User"
option :tfstate, type: :boolean
def iamu
......
......@@ -114,6 +114,22 @@ module Terraforming
end
end
describe "iamp" do
context "without --tfstate" do
it "should export IAM policy tf" do
expect(Terraforming::Resource::IAMPolicy).to receive(:tf)
described_class.new.invoke(:iamp, [], {})
end
end
context "with --tfstate" do
it "should export IAM policy tfstate" do
expect(Terraforming::Resource::IAMPolicy).to receive(:tfstate)
described_class.new.invoke(:iamp, [], { tfstate: true })
end
end
end
describe "iamu" do
context "without --tfstate" do
it "should export IAM user 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