lib/cfgen.rb
def prepare_s3(bucket)
      bucket_new = deep_copy(bucket)
      bucket_old = deep_copy(bucket['Resources']['EncryptedS3Bucket'])
      bucket_name = "bucket#{rand(1...999)}-${AWS::StackName}-${AWS::AccountId}"

      #assign the values accordingly
      bucket_new['Resources']["EncryptedS3Bucket"]["Properties"]["BucketName"]["Fn::Sub"] = bucket_name
      bucket_new['Resources'].delete("myVPC")
      bucket_new
    end
#this method prepares the s3 from template
this method prepares the s3 from template
this method prepares the s3 from template
def prepare_s3(bucket)
      bucket_new = deep_copy(bucket)
      bucket_old = deep_copy(bucket['Resources']['EncryptedS3Bucket'])
      bucket_name = "bucket#{rand(1...999)}-${AWS::StackName}-${AWS::AccountId}"
      bucket_new['Resources']["EncryptedS3Bucket"]["Properties"]["BucketName"]["Fn::Sub"] = bucket_name
      bucket_new['Resources'].delete("myVPC")
      bucket_new
    end
def prepare_s3 ( bucket ) bucket_new = deep_copy ( bucket ) bucket_old = deep_copy ( bucket [ 'Resources' ] [ 'EncryptedS3Bucket' ] ) bucket_name = "bucket#{rand(1...999)}-${AWS::StackName}-${AWS::AccountId}" bucket_new [ 'Resources' ] [ "EncryptedS3Bucket" ] [ "Properties" ] [ "BucketName" ] [ "Fn::Sub" ] = bucket_name bucket_new [ 'Resources' ] . delete ( "myVPC" ) bucket_new end
this method prepares the s3 from template
this method prepares the s3 from template
#assign the values accordingly
bucket