Commit f541b05f authored by Daisuke Fujita's avatar Daisuke Fujita

Add sn subcommand

parent 4b9f8adc
......@@ -48,6 +48,12 @@ module Terraforming
execute(Terraforming::Resource::SecurityGroup, options)
end
desc "sn", "Subnet"
option :tfstate, type: :boolean
def sn
execute(Terraforming::Resource::Subnet, options)
end
desc "vpc", "VPC"
option :tfstate, type: :boolean
def vpc
......
......@@ -130,6 +130,22 @@ module Terraforming
end
end
describe "sn" do
context "without --tfstate" do
it "should export SecurityGroup tf" do
expect(Terraforming::Resource::Subnet).to receive(:tf)
described_class.new.invoke(:sn, [], {})
end
end
context "with --tfstate" do
it "should export SecurityGroup tfstate" do
expect(Terraforming::Resource::Subnet).to receive(:tfstate)
described_class.new.invoke(:sn, [], { tfstate: true })
end
end
end
describe "vpc" do
context "without --tfstate" do
it "should export VPC 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