Class: CFM::Configuration

Inherits:
Object
  • Object
show all
Includes:
CertificationHelper, ConfigurationHelper
Defined in:
lib/etude_for_aws/cfm/configuration.rb

Direct Known Subclasses

ConfigurationStub

Constant Summary

Constants included from ConfigurationHelper

ConfigurationHelper::YAML_FILE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ConfigurationHelper

#get_yaml_destination_cidr_block, #get_yaml_ec2_config, #get_yaml_ec2_instances, #get_yaml_internet_gateway, get_yaml_region, #get_yaml_stack_name, #get_yaml_stack_tag_value, #get_yaml_subnet_cidr_block, #get_yaml_subnet_cidr_block_private, #get_yaml_subnet_cidr_block_public, #get_yaml_template_file, #get_yaml_template_path, #get_yaml_vpc_cidr_block, #get_yaml_vpc_route_tables, #get_yaml_vpc_subnets, #get_yaml_vpc_tags, #get_yaml_vpn_info, #get_yaml_zas, load_yaml_file

Methods included from CertificationHelper

#aws_certificate

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
23
# File 'lib/etude_for_aws/cfm/configuration.rb', line 16

def initialize
  aws_certificate
  @yaml = ConfigurationHelper.load_yaml_file
  @stack_name = get_yaml_stack_name
  @stack_tag_value = get_yaml_stack_tag_value
  @template_path = get_yaml_template_path
  @azs = get_yaml_zas
end

Instance Attribute Details

#azsObject

Returns the value of attribute azs.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def azs
  @azs
end

#parametersObject

Returns the value of attribute parameters.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def parameters
  @parameters
end

#stack_idObject

Returns the value of attribute stack_id.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def stack_id
  @stack_id
end

#stack_nameObject

Returns the value of attribute stack_name.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def stack_name
  @stack_name
end

#stack_tag_valueObject

Returns the value of attribute stack_tag_value.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def stack_tag_value
  @stack_tag_value
end

#templateObject

Returns the value of attribute template.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def template
  @template
end

#template_pathObject

Returns the value of attribute template_path.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def template_path
  @template_path
end

#vpc_idObject

Returns the value of attribute vpc_id.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def vpc_id
  @vpc_id
end

#yamlObject

Returns the value of attribute yaml.



6
7
8
# File 'lib/etude_for_aws/cfm/configuration.rb', line 6

def yaml
  @yaml
end

Instance Method Details

#create_clientObject



29
30
31
# File 'lib/etude_for_aws/cfm/configuration.rb', line 29

def create_client
  Aws::CloudFormation::Client.new
end

#get_template_file(type) ⇒ Object



25
26
27
# File 'lib/etude_for_aws/cfm/configuration.rb', line 25

def get_template_file(type)
  get_yaml_template_file(type)
end