cf_factory 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/cf_factory +9 -0
- data/examples/base_vpc.rb +9 -9
- data/examples/cloudfront_private.rb +23 -0
- data/examples/cloudinit_script_for_one_instance.rb +25 -25
- data/examples/cloudinit_script_with_autoscaling.rb +31 -31
- data/examples/dynamodb_table.rb +24 -0
- data/examples/elastic_beanstalk_example.rb +23 -0
- data/examples/elb_with_cloudfront.rb +34 -35
- data/examples/instance_with_eip.rb +13 -11
- data/examples/instance_with_yum.rb +13 -11
- data/examples/just_an_instance.rb +8 -6
- data/examples/nat_mutual_monitoring.rb +69 -0
- data/examples/play_with_region_and_zones.rb +11 -9
- data/examples/ra_web_hosting.rb +46 -44
- data/examples/s3_with_cloudfront.rb +11 -12
- data/examples/test_vpc.rb +27 -19
- data/lib/cf_factory/as/cf_as_group.rb +2 -0
- data/lib/cf_factory/as/cf_as_launch_config.rb +2 -0
- data/lib/cf_factory/as/cf_as_scaling_policy.rb +2 -0
- data/lib/cf_factory/base/cf_base.rb +5 -0
- data/lib/cf_factory/base/cf_ec2_tag.rb +2 -0
- data/lib/cf_factory/base/cf_generator.rb +2 -0
- data/lib/cf_factory/base/cf_helper.rb +2 -0
- data/lib/cf_factory/base/cf_inner.rb +27 -8
- data/lib/cf_factory/base/cf_main.rb +3 -1
- data/lib/cf_factory/base/cf_mapping.rb +3 -1
- data/lib/cf_factory/base/cf_named_inner.rb +1 -0
- data/lib/cf_factory/base/cf_output.rb +2 -0
- data/lib/cf_factory/base/cf_parameter.rb +2 -0
- data/lib/cf_factory/base/cf_script_reader.rb +3 -1
- data/lib/cf_factory/cloudformation/cf_cloud_formation_init.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_command.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_commands.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_config.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_file.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_files.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_inner.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_package.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_packages.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_cloudformation_sources.rb +2 -0
- data/lib/cf_factory/cloudformation/cf_init_script.rb +7 -0
- data/lib/cf_factory/cloudfront/cf_cache_behavior.rb +2 -0
- data/lib/cf_factory/cloudfront/cf_cache_behaviors.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_cloudfront_distribution.rb +2 -0
- data/lib/cf_factory/cloudfront/cf_custom_origin_config.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_default_cache_behavior.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_distribution_config.rb +4 -2
- data/lib/cf_factory/cloudfront/cf_forwarded_values.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_logging.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_origin.rb +3 -1
- data/lib/cf_factory/cloudfront/cf_s3_origin_config.rb +3 -1
- data/lib/cf_factory/cloudwatch/cf_cloud_watch_alarm.rb +2 -0
- data/lib/cf_factory/dynamo/cf_dynamo_table.rb +45 -0
- data/lib/cf_factory/eb/cd_eb_solution_stack.rb +28 -0
- data/lib/cf_factory/eb/cf_eb_application.rb +41 -0
- data/lib/cf_factory/eb/cf_eb_application_version.rb +24 -0
- data/lib/cf_factory/eb/cf_eb_configuration_template.rb +36 -0
- data/lib/cf_factory/eb/cf_eb_environment.rb +56 -0
- data/lib/cf_factory/eb/cf_eb_option_setting.rb +19 -0
- data/lib/cf_factory/ec2/cf_ebs_volume.rb +2 -0
- data/lib/cf_factory/ec2/cf_ec2_instance.rb +5 -1
- data/lib/cf_factory/ec2/cf_ec2_security_group.rb +2 -0
- data/lib/cf_factory/ec2/cf_ec2_security_group_egress.rb +3 -1
- data/lib/cf_factory/ec2/cf_ec2_security_group_ingress.rb +3 -1
- data/lib/cf_factory/ec2/cf_eip.rb +2 -0
- data/lib/cf_factory/ec2/cf_eip_association.rb +3 -1
- data/lib/cf_factory/elb/cf_app_cookie_stickiness_policy.rb +3 -1
- data/lib/cf_factory/elb/cf_elb.rb +3 -1
- data/lib/cf_factory/elb/cf_health_check.rb +3 -1
- data/lib/cf_factory/elb/cf_lb_cookie_stickiness_policy.rb +3 -1
- data/lib/cf_factory/elb/cf_listener.rb +3 -1
- data/lib/cf_factory/help/fixes.rb +1 -0
- data/lib/cf_factory/help/ip_mask.rb +2 -0
- data/lib/cf_factory/help/template_validation.rb +3 -1
- data/lib/cf_factory/iam/cf_iam_access_key.rb +3 -1
- data/lib/cf_factory/iam/cf_iam_group.rb +3 -1
- data/lib/cf_factory/iam/cf_iam_instance_profile.rb +3 -1
- data/lib/cf_factory/iam/cf_iam_policy.rb +2 -0
- data/lib/cf_factory/iam/cf_iam_role.rb +3 -1
- data/lib/cf_factory/iam/cf_iam_statement.rb +2 -0
- data/lib/cf_factory/iam/cf_iam_user.rb +3 -1
- data/lib/cf_factory/iam/cf_policy_document.rb +3 -1
- data/lib/cf_factory/modules/base_vpc.rb +2 -0
- data/lib/cf_factory/rds/cf_rds_instance.rb +3 -1
- data/lib/cf_factory/rds/cf_rds_security_group.rb +3 -1
- data/lib/cf_factory/rds/cf_rds_security_group_ingress.rb +3 -1
- data/lib/cf_factory/rds/cf_rds_subnet_group.rb +3 -1
- data/lib/cf_factory/route53/cf_elb_alias_target.rb +2 -0
- data/lib/cf_factory/route53/cf_record_set.rb +2 -0
- data/lib/cf_factory/route53/cf_route53_record_set.rb +2 -0
- data/lib/cf_factory/route53/cf_route53_record_set_group.rb +2 -0
- data/lib/cf_factory/s3/cf_s3_bucket.rb +2 -0
- data/lib/cf_factory/s3/cf_web_site_config.rb +3 -1
- data/lib/cf_factory/sqs/cf_sqs_queue.rb +3 -1
- data/lib/cf_factory/vpc/cf_attach_gateway.rb +3 -1
- data/lib/cf_factory/vpc/cf_internet_gateway.rb +2 -0
- data/lib/cf_factory/vpc/cf_network_acl.rb +3 -1
- data/lib/cf_factory/vpc/cf_network_acl_association.rb +3 -1
- data/lib/cf_factory/vpc/cf_network_acl_entry.rb +2 -0
- data/lib/cf_factory/vpc/cf_route.rb +3 -1
- data/lib/cf_factory/vpc/cf_route_table.rb +3 -1
- data/lib/cf_factory/vpc/cf_route_table_association.rb +3 -1
- data/lib/cf_factory/vpc/cf_subnet.rb +3 -1
- data/lib/cf_factory/vpc/cf_vpc.rb +3 -1
- data/lib/cf_factory.rb +2 -93
- metadata +39 -4
|
@@ -2,6 +2,7 @@ require 'cf_factory/base/cf_base'
|
|
|
2
2
|
require 'cf_factory/base/cf_inner'
|
|
3
3
|
require 'cf_factory/base/cf_helper'
|
|
4
4
|
|
|
5
|
+
module CfFactory
|
|
5
6
|
class CfCloudFormationPackage
|
|
6
7
|
include CfInner
|
|
7
8
|
|
|
@@ -32,3 +33,4 @@ class CfCloudFormationPackage
|
|
|
32
33
|
CfGenerator.indent(self.additional_indent, "\"#{@package_name}\" : #{@versions.inspect}")
|
|
33
34
|
end
|
|
34
35
|
end
|
|
36
|
+
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
module CfFactory
|
|
1
2
|
class CfInitScript
|
|
2
3
|
# Every parameter-string will be transformed into something like { "Ref" : "<parameter>" }
|
|
3
4
|
def initialize(script, parameter_array)
|
|
@@ -15,6 +16,11 @@ class CfInitScript
|
|
|
15
16
|
CfInitScript.new(basic_script(), [stack, resource_id, access_key, secret_key])
|
|
16
17
|
end
|
|
17
18
|
|
|
19
|
+
def self.create_from_text(file_path, params)
|
|
20
|
+
contents = File.open(file_path).read
|
|
21
|
+
CfInitScript.new(contents,params)
|
|
22
|
+
end
|
|
23
|
+
|
|
18
24
|
private
|
|
19
25
|
|
|
20
26
|
def validate
|
|
@@ -71,3 +77,4 @@ def self.basic_script_with_update
|
|
|
71
77
|
end
|
|
72
78
|
|
|
73
79
|
end
|
|
80
|
+
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'cf_factory/base/cf_inner'
|
|
2
2
|
|
|
3
|
+
module CfFactory
|
|
3
4
|
class CfCustomOriginConfig
|
|
4
5
|
PROTOCOL_VALUES = ["http-only","match-viewer"]
|
|
5
6
|
include CfInner
|
|
@@ -34,4 +35,5 @@ class CfCustomOriginConfig
|
|
|
34
35
|
raise Exception.new("protocol must be within #{PROTOCOL_VALUES}") unless PROTOCOL_VALUES.include?(@protocol)
|
|
35
36
|
end
|
|
36
37
|
|
|
37
|
-
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'cf_factory/base/cf_inner'
|
|
2
2
|
|
|
3
|
+
module CfFactory
|
|
3
4
|
class CfDistributionConfig
|
|
4
5
|
include CfInner
|
|
5
6
|
|
|
@@ -20,12 +21,13 @@ class CfDistributionConfig
|
|
|
20
21
|
def get_cf_attributes
|
|
21
22
|
result = {}
|
|
22
23
|
result["Origins"] = CfHelper.generate_inner_array(@origins)
|
|
23
|
-
result["DefaultCacheBehavior"] = @default_cache_behaviour.generate
|
|
24
|
+
result["DefaultCacheBehavior"] = @default_cache_behaviour.generate unless @default_cache_behaviour.nil?
|
|
24
25
|
result["Enabled"] = @enabled
|
|
25
26
|
result["Logging"] = @logging.generate unless @logging.nil?
|
|
26
27
|
result["Aliases"] = @aliases.inspect unless @aliases.nil?
|
|
27
|
-
result["CacheBehaviors"] = CfHelper.generate_inner_array(@cache_behaviors)
|
|
28
|
+
result["CacheBehaviors"] = CfHelper.generate_inner_array(@cache_behaviors) unless @cache_bahaviors.nil?
|
|
28
29
|
result
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_base'
|
|
2
|
+
module CfFactory
|
|
3
|
+
class CfDynamoTable
|
|
4
|
+
include CfBase
|
|
5
|
+
|
|
6
|
+
def initialize(name, read_capacity_units, write_capacity_units, hash_key_name, hash_key_type, range_key_name = nil, range_key_type = nil)
|
|
7
|
+
@name = name
|
|
8
|
+
@hash_key_name = hash_key_name
|
|
9
|
+
@hash_key_type = hash_key_type
|
|
10
|
+
@range_key_name = range_key_name
|
|
11
|
+
@range_key_type = range_key_type
|
|
12
|
+
@read_capacity_units = read_capacity_units
|
|
13
|
+
@write_capacity_units = write_capacity_units
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def set_deletion_policy(deletion_policy)
|
|
17
|
+
@deletion_policy = deletion_policy
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def get_cf_type
|
|
21
|
+
"AWS::DynamoDB::Table"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def get_cf_attributes
|
|
25
|
+
result = super
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def get_cf_properties
|
|
29
|
+
result = {}
|
|
30
|
+
if @range_key_name then
|
|
31
|
+
result["KeySchema"] = {
|
|
32
|
+
"HashKeyElement" => { "AttributeName" => @hash_key_name, "AttributeType" => @hash_key_type },
|
|
33
|
+
"RangeKeyElement" => { "AttributeName" => @range_key_name, "AttributeType" => @range_key_type}
|
|
34
|
+
}
|
|
35
|
+
else
|
|
36
|
+
result["KeySchema"] = {
|
|
37
|
+
"HashKeyElement" => { "AttributeName" => @hash_key_name, "AttributeType" => @hash_key_type }
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
result["ProvisionedThroughput"] = { "ReadCapacityUnits" => @read_capacity_units, "WriteCapacityUnits" => @write_capacity_units }
|
|
41
|
+
result
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module CfEbSolutionStack
|
|
2
|
+
|
|
3
|
+
SUPPORTED_STACK_NAMES = {
|
|
4
|
+
s32php54: "32bit Amazon Linux running PHP 5.4",
|
|
5
|
+
s64php54: "64bit Amazon Linux running PHP 5.4",
|
|
6
|
+
s32php53: "32bit Amazon Linux running PHP 5.3",
|
|
7
|
+
s64php53: "64bit Amazon Linux running PHP 5.3",
|
|
8
|
+
s64iis75: "64bit Windows Server 2008 R2 running IIS 7.5",
|
|
9
|
+
s64iis80: "64bit Windows Server 2012 running IIS 8",
|
|
10
|
+
s32tomcat7: "32bit Amazon Linux running Tomcat 7",
|
|
11
|
+
s64tomcat7: "64bit Amazon Linux running Tomcat 7",
|
|
12
|
+
s32tomcat6: "32bit Amazon Linux running Tomcat 6",
|
|
13
|
+
s64tomcat6: "64bit Amazon Linux running Tomcat 6",
|
|
14
|
+
s32python: "32bit Amazon Linux running Python",
|
|
15
|
+
s64python: "64bit Amazon Linux running Python",
|
|
16
|
+
s32ruby187: "32bit Amazon Linux running Ruby 1.8.7",
|
|
17
|
+
s64ruby187: "64bit Amazon Linux running Ruby 1.8.7",
|
|
18
|
+
s32ruby193: "32bit Amazon Linux running Ruby 1.9.3",
|
|
19
|
+
s64ruby193: "64bit Amazon Linux running Ruby 1.9.3"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def is_valid_stack?(stack_id)
|
|
24
|
+
SUPPORTED_STACK_NAMES.has_key?(stack_id)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_base'
|
|
2
|
+
require 'cf_factory/base/cf_helper'
|
|
3
|
+
|
|
4
|
+
module CfFactory
|
|
5
|
+
class CfEbApplication
|
|
6
|
+
include CfBase
|
|
7
|
+
|
|
8
|
+
def initialize(name, description, application_versions, configuration_templates)
|
|
9
|
+
@name = name
|
|
10
|
+
@description = description
|
|
11
|
+
@application_versions = application_versions
|
|
12
|
+
@configuration_templates = configuration_templates
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def set_tags(tag_list)
|
|
16
|
+
@tag_list = tag_list
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def set_deletion_policy(deletion_policy)
|
|
20
|
+
@deletion_policy = deletion_policy
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def get_cf_type
|
|
24
|
+
"AWS::ElasticBeanstalk::Application"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def get_cf_attributes
|
|
28
|
+
super
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def get_cf_properties
|
|
32
|
+
result = {}
|
|
33
|
+
result["ApplicationVersions"] = CfHelper.generate_inner_array(@application_versions)
|
|
34
|
+
result["ConfigurationTemplates"] = CfHelper.generate_inner_array(@configuration_templates)
|
|
35
|
+
result["Description"] = @description
|
|
36
|
+
result
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_inner'
|
|
2
|
+
|
|
3
|
+
module CfFactory
|
|
4
|
+
class CfEbApplicationVersion
|
|
5
|
+
include CfInner
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def initialize(description, source_bundle_bucket, source_bundle_key, version_label)
|
|
9
|
+
|
|
10
|
+
@description = description
|
|
11
|
+
@source_bundle_bucket = source_bundle_bucket
|
|
12
|
+
@source_bundle_key = source_bundle_key
|
|
13
|
+
@version_label = version_label
|
|
14
|
+
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def get_cf_attributes
|
|
18
|
+
{ "Description" => @description,
|
|
19
|
+
"SourceBundle" => { "S3Bucket" => @source_bundle_bucket, "S3Key" => @source_bundle_key },
|
|
20
|
+
"VersionLabel" => @version_label }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_inner'
|
|
2
|
+
|
|
3
|
+
module CfFactory
|
|
4
|
+
class CfEbConfigurationTemplate
|
|
5
|
+
include CfInner
|
|
6
|
+
include CfEbSolutionStack
|
|
7
|
+
def initialize(template_name, description, option_settings, solution_stack_name)
|
|
8
|
+
@template_name = template_name
|
|
9
|
+
@description = description
|
|
10
|
+
@option_settings = option_settings
|
|
11
|
+
@solution_stack_name = solution_stack_name
|
|
12
|
+
validate
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def get_cf_attributes
|
|
16
|
+
{ "TemplateName" => @template_name,
|
|
17
|
+
"Description" => @description,
|
|
18
|
+
"OptionSettings" => "[" + (@option_settings.map {|opt| opt.generate}).join(',') + "]",
|
|
19
|
+
"SolutionStackName" => SUPPORTED_STACK_NAMES[@solution_stack_name]
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def generate_ref
|
|
24
|
+
"{ \"Ref\" : \"#{@template_name}\" }"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def get_template_name
|
|
28
|
+
@template_name
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def validate
|
|
32
|
+
raise Exception.new("stack name not supported: #{@solution_stack_name}") unless is_valid_stack?(@solution_stack_name)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_base'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
module CfFactory
|
|
6
|
+
class CfEbEnvironment
|
|
7
|
+
include CfBase
|
|
8
|
+
include CfEbSolutionStack
|
|
9
|
+
|
|
10
|
+
def initialize(name, application_name, cname_prefix, description, option_settings, options_to_remove,
|
|
11
|
+
solution_stack_name, template_name, version_label)
|
|
12
|
+
@name = name
|
|
13
|
+
@application_name = application_name
|
|
14
|
+
@cname_prefix = cname_prefix
|
|
15
|
+
@description = description
|
|
16
|
+
@option_settings = option_settings
|
|
17
|
+
@options_to_remove = options_to_remove
|
|
18
|
+
@solution_stack_name = solution_stack_name
|
|
19
|
+
@template_name = template_name
|
|
20
|
+
@version_label = version_label
|
|
21
|
+
|
|
22
|
+
validate
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def get_cf_type
|
|
27
|
+
"AWS::ElasticBeanstalk::Environment"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def get_cf_attributes
|
|
31
|
+
super
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def get_cf_properties
|
|
35
|
+
result = {}
|
|
36
|
+
result["ApplicationName"] = @application_name
|
|
37
|
+
result["Description"] = @description
|
|
38
|
+
result["TemplateName"] = @template_name
|
|
39
|
+
result["VersionLabel"] = @version_label
|
|
40
|
+
result["SolutionStackName"] = SUPPORTED_STACK_NAMES[@solution_stack_name] unless @solution_stack_name.nil?
|
|
41
|
+
result["CNAMEPrefix"] = @cname_prefix unless @cname_prefix.nil?
|
|
42
|
+
result["OptionSettings"] = @option_settings unless @option_settings.nil?
|
|
43
|
+
result["OptionsToRemove"] = @options_to_remove unless @options_to_remove.nil?
|
|
44
|
+
result
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def validate
|
|
48
|
+
if not @solution_stack_name.nil?
|
|
49
|
+
raise Exception.new("stack name not supported: #{@solution_stack_name}") unless is_valid_stack?(@solution_stack_name)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
require 'cf_factory/base/cf_inner'
|
|
2
|
+
|
|
3
|
+
module CfFactory
|
|
4
|
+
class CfEbOptionSetting
|
|
5
|
+
include CfInner
|
|
6
|
+
def initialize(namespace, option_name, value)
|
|
7
|
+
@namespace=namespace
|
|
8
|
+
@option_name = option_name
|
|
9
|
+
@value = value
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def get_cf_attributes
|
|
13
|
+
{ "Namespace" => @namespace,
|
|
14
|
+
"OptionName" => @option_name,
|
|
15
|
+
"Value" => @value
|
|
16
|
+
}
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'cf_factory/base/cf_base'
|
|
2
|
+
module CfFactory
|
|
2
3
|
class CfEc2Instance
|
|
3
4
|
SUPPORTED_TYPES = ["t1.micro","m1.small","m1.medium","m1.large","m1.xlarge",
|
|
4
5
|
"m2.xlarge","m2.2xlarge","m2.4xlarge","m3.xlarge","m3.2xlarge","c1.medium", "c1.xlarge",
|
|
@@ -56,7 +57,10 @@ class CfEc2Instance
|
|
|
56
57
|
private
|
|
57
58
|
|
|
58
59
|
def validate
|
|
59
|
-
|
|
60
|
+
unless @instance_type.include?("Ref")
|
|
61
|
+
raise Exception.new("instance type not supported #{@instance_type}") unless SUPPORTED_TYPES.include?(@instance_type)
|
|
62
|
+
end
|
|
60
63
|
end
|
|
61
64
|
|
|
62
65
|
end
|
|
66
|
+
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'cf_factory/base/cf_inner'
|
|
2
2
|
|
|
3
|
+
module CfFactory
|
|
3
4
|
class CfAppCookieStickinessPolicy
|
|
4
5
|
include CfInner
|
|
5
6
|
|
|
@@ -12,4 +13,5 @@ class CfAppCookieStickinessPolicy
|
|
|
12
13
|
{"CookieName" => @cookie_name, "PolicyName" => @policy_name}
|
|
13
14
|
end
|
|
14
15
|
|
|
15
|
-
end
|
|
16
|
+
end
|
|
17
|
+
end
|