lib/terraforming/resource/s3.rb in terraforming-0.1.3 vs lib/terraforming/resource/s3.rb in terraforming-0.1.4
- old
+ new
@@ -5,25 +5,25 @@
def self.tf(client: Aws::S3::Client.new)
self.new(client).tf
end
- def self.tfstate(client: Aws::S3::Client.new, tfstate_base: nil)
- self.new(client).tfstate(tfstate_base)
+ def self.tfstate(client: Aws::S3::Client.new)
+ self.new(client).tfstate
end
def initialize(client)
@client = client
end
def tf
apply_template(@client, "tf/s3")
end
- def tfstate(tfstate_base)
- resources = buckets.inject({}) do |result, bucket|
- result["aws_s3_bucket.#{module_name_of(bucket)}"] = {
+ def tfstate
+ buckets.inject({}) do |resources, bucket|
+ resources["aws_s3_bucket.#{module_name_of(bucket)}"] = {
"type" => "aws_s3_bucket",
"primary" => {
"id" => bucket.name,
"attributes" => {
"acl" => "private",
@@ -31,13 +31,11 @@
"id" => bucket.name
}
}
}
- result
+ resources
end
-
- generate_tfstate(resources, tfstate_base)
end
private
def buckets