lib/cfgen.rb
def prepare_vpc(vpc, vpc_name, vpc_ip)
      vpc_new = deep_copy(vpc)
      vpc_old = deep_copy(vpc['Resources']['myVPC'])

      #assign the values accordingly
      vpc_new['Resources'][vpc_name] = vpc_old
      vpc_new['Resources'][vpc_name]["Properties"]["CidrBlock"] = vpc_ip
      vpc_new['Resources'].delete("myVPC")
      vpc_new
    end
#this method prepares the vpc from template
this method prepares the vpc from template
this method prepares the vpc from template
def prepare_vpc(vpc, vpc_name, vpc_ip)
      vpc_new = deep_copy(vpc)
      vpc_old = deep_copy(vpc['Resources']['myVPC'])
      vpc_new['Resources'][vpc_name] = vpc_old
      vpc_new['Resources'][vpc_name]["Properties"]["CidrBlock"] = vpc_ip
      vpc_new['Resources'].delete("myVPC")
      vpc_new
    end
def prepare_vpc ( vpc , vpc_name , vpc_ip ) vpc_new = deep_copy ( vpc ) vpc_old = deep_copy ( vpc [ 'Resources' ] [ 'myVPC' ] ) vpc_new [ 'Resources' ] [ vpc_name ] = vpc_old vpc_new [ 'Resources' ] [ vpc_name ] [ "Properties" ] [ "CidrBlock" ] = vpc_ip vpc_new [ 'Resources' ] . delete ( "myVPC" ) vpc_new end
this method prepares the vpc from template
this method prepares the vpc from template
#assign the values accordingly
vpc
vpc_name
vpc_ip