Sha256: 1999b44ca9f6a679a9d80b32b1bceb1f0ef5fc9eaa7424ec5b68b7b6cfcb1830
Contents?: true
Size: 418 Bytes
Versions: 6
Compression:
Stored size: 418 Bytes
Contents
#! /usr/bin/env ruby require 'cloud_shaped' require 'yaml' class BucketMaker def initialize(n_buckets = 1) @n_buckets = n_buckets end def template CloudShaped.template do |t| 1.upto(@n_buckets) do |i| t.def_resource "bucket#{i}", "AWS::S3::Bucket" do |b| b["BucketName"] = "my-bucket-#{i}" end end end end end puts YAML.dump(BucketMaker.new(3).template)
Version data entries
6 entries across 6 versions & 1 rubygems