lib/cfgen.rb
# This method loads all of the json template files and parse it
This method loads all of the json template files and parse it
This method loads all of the json template files and parse it
def load_templates
      vpc_json = File.read('./templates/json/vpc.json')
      subnet_json = File.read('./templates/json/subnet.json')
      bucket_json = File.read('./templates/json/s3bucket.json')
      parameters_json = File.read('./templates/json/parameters.json')
      ec2_json = File.read('./templates/json/ec2.json')
      @vpc = JSON.parse(vpc_json)
      @subnet = JSON.parse(subnet_json)
      @bucket = JSON.parse(bucket_json)
      @parameters = JSON.parse(parameters_json)
      @ec2 = JSON.parse(ec2_json)
    end
def load_templates vpc_json = File . read ( './templates/json/vpc.json' ) subnet_json = File . read ( './templates/json/subnet.json' ) bucket_json = File . read ( './templates/json/s3bucket.json' ) parameters_json = File . read ( './templates/json/parameters.json' ) ec2_json = File . read ( './templates/json/ec2.json' ) @vpc = JSON . parse ( vpc_json ) @subnet = JSON . parse ( subnet_json ) @bucket = JSON . parse ( bucket_json ) @parameters = JSON . parse ( parameters_json ) @ec2 = JSON . parse ( ec2_json ) end
This method loads all of the json template files and parse it
This method loads all of the json template files and parse it
# read json templates #parse