module ConfigurationHelper

Constants

YAML_FILE

Public Class Methods

get_yaml_region() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 10
def self.get_yaml_region
  ConfigurationHelper.load_yaml_file['DEV']['REGION']
end
load_yaml_file() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 6
def self.load_yaml_file
  YAML.load_file(YAML_FILE)
end

Public Instance Methods

get_yaml_destination_cidr_block() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 88
def get_yaml_destination_cidr_block
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['DESTINATION_CIDR_BLOCK']
end
get_yaml_ec2_config() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 92
def get_yaml_ec2_config
  ConfigurationHelper.load_yaml_file['DEV']['EC2']
end
get_yaml_ec2_instances() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 96
def get_yaml_ec2_instances
  ConfigurationHelper.load_yaml_file['DEV']['EC2']['INSTANCES']
end
get_yaml_internet_gateway() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 67
def get_yaml_internet_gateway
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['INTERNET_GATEWAY']
end
get_yaml_stack_name() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 14
def get_yaml_stack_name
  ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['STACK_NAME']
end
get_yaml_stack_tag_value() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 18
def get_yaml_stack_tag_value
  ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TAG_VALUE']
end
get_yaml_subnet_cidr_block() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 76
def get_yaml_subnet_cidr_block
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['SUBNET_CIDR_BLOCK']
end
get_yaml_subnet_cidr_block_private() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 84
def get_yaml_subnet_cidr_block_private
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['SUBNET_CIDR_BLOCK_PRIVATE']
end
get_yaml_subnet_cidr_block_public() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 80
def get_yaml_subnet_cidr_block_public
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['SUBNET_CIDR_BLOCK_PUBLIC']
end
get_yaml_template_file(type) click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 34
def get_yaml_template_file(type)
  case type
    when :ONE_AZ_ONE_PUB
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_01']
    when :ONE_AZ_TWO_PUB
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_02']
    when :ONE_AZ_ONE_PUB_PRI
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_03']
    when :TWO_AZ_TWO_PRI
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_04']
    when :TWO_AZ_TWO_PUB
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_05']
    when :TWO_AZ_ONE_PUB_RPI
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_06']
    when :TWO_AZ_TWO_PUB_PRI
      return ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_FILE_TYPE_07']
    else
      return raise
  end
end
get_yaml_template_path() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 22
def get_yaml_template_path
  ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_PATH']
end
get_yaml_vpc_cidr_block() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 72
def get_yaml_vpc_cidr_block
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['VPC_CIDR_BLOCK']
end
get_yaml_vpc_route_tables() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 63
def get_yaml_vpc_route_tables
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['ROUTE_TABLES']
end
get_yaml_vpc_subnets() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 59
def get_yaml_vpc_subnets
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['SUBNETS']
end
get_yaml_vpc_tags() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 55
def get_yaml_vpc_tags
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['VPC_TAGS']
end
get_yaml_vpn_info() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 100
def get_yaml_vpn_info
  ConfigurationHelper.load_yaml_file['DEV']['VPC']['VPN']
end
get_yaml_zas() click to toggle source
# File lib/etude_for_aws/helpers/configuration_helper.rb, line 26
def get_yaml_zas
  azs = []
  azs << ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_PARAMS_AZ1']
  azs << ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_PARAMS_AZ2']
  azs << ConfigurationHelper.load_yaml_file['DEV']['CFM']['VPC']['TEMPLATE_PARAMS_AZ3']
  azs
end