skywriter 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.travis.yml +8 -0
- data/CHANGES.md +5 -0
- data/Gemfile +4 -0
- data/LICENSE.md +22 -0
- data/README.md +139 -0
- data/Rakefile +7 -0
- data/lib/skywriter/function.rb +133 -0
- data/lib/skywriter/resource/auto_scaling/auto_scaling_group.rb +28 -0
- data/lib/skywriter/resource/auto_scaling/launch_configuration.rb +28 -0
- data/lib/skywriter/resource/auto_scaling/scaling_policy.rb +18 -0
- data/lib/skywriter/resource/auto_scaling/scheduled_action.rb +21 -0
- data/lib/skywriter/resource/auto_scaling/trigger.rb +26 -0
- data/lib/skywriter/resource/cloud_formation/authentication.rb +46 -0
- data/lib/skywriter/resource/cloud_formation/custom_resource.rb +17 -0
- data/lib/skywriter/resource/cloud_formation/stack.rb +15 -0
- data/lib/skywriter/resource/cloud_formation/wait_condition.rb +15 -0
- data/lib/skywriter/resource/cloud_formation/wait_condition_handle.rb +12 -0
- data/lib/skywriter/resource/cloud_front/distribution.rb +13 -0
- data/lib/skywriter/resource/cloud_watch/alarm.rb +27 -0
- data/lib/skywriter/resource/dynamo_db/table.rb +18 -0
- data/lib/skywriter/resource/ec2/customer_gateway.rb +16 -0
- data/lib/skywriter/resource/ec2/dhcp_options.rb +18 -0
- data/lib/skywriter/resource/ec2/eip.rb +14 -0
- data/lib/skywriter/resource/ec2/eip_association.rb +17 -0
- data/lib/skywriter/resource/ec2/instance.rb +34 -0
- data/lib/skywriter/resource/ec2/internet_gateway.rb +13 -0
- data/lib/skywriter/resource/ec2/network_acl.rb +14 -0
- data/lib/skywriter/resource/ec2/network_acl_entry.rb +20 -0
- data/lib/skywriter/resource/ec2/network_interface.rb +20 -0
- data/lib/skywriter/resource/ec2/network_interface_attachment.rb +16 -0
- data/lib/skywriter/resource/ec2/route.rb +17 -0
- data/lib/skywriter/resource/ec2/route_table.rb +14 -0
- data/lib/skywriter/resource/ec2/security_group.rb +17 -0
- data/lib/skywriter/resource/ec2/security_group_egress.rb +23 -0
- data/lib/skywriter/resource/ec2/security_group_ingress.rb +26 -0
- data/lib/skywriter/resource/ec2/subnet.rb +16 -0
- data/lib/skywriter/resource/ec2/subnet_network_acl_association.rb +14 -0
- data/lib/skywriter/resource/ec2/subnet_route_table_association.rb +14 -0
- data/lib/skywriter/resource/ec2/volume.rb +18 -0
- data/lib/skywriter/resource/ec2/volume_attachment.rb +15 -0
- data/lib/skywriter/resource/ec2/vpc.rb +17 -0
- data/lib/skywriter/resource/ec2/vpc_dhcp_options_association.rb +14 -0
- data/lib/skywriter/resource/ec2/vpc_gateway_attachment.rb +15 -0
- data/lib/skywriter/resource/ec2/vpn_connection.rb +17 -0
- data/lib/skywriter/resource/ec2/vpn_connection_route.rb +14 -0
- data/lib/skywriter/resource/ec2/vpn_gateway.rb +14 -0
- data/lib/skywriter/resource/ec2/vpn_gateway_route_propagation.rb +14 -0
- data/lib/skywriter/resource/elasti_cache/cache_cluster.rb +27 -0
- data/lib/skywriter/resource/elastic_beanstalk/application.rb +14 -0
- data/lib/skywriter/resource/elastic_beanstalk/application_version.rb +15 -0
- data/lib/skywriter/resource/elastic_beanstalk/configuration_template.rb +18 -0
- data/lib/skywriter/resource/elastic_beanstalk/environment.rb +21 -0
- data/lib/skywriter/resource/elastic_load_balancing/load_balancer.rb +25 -0
- data/lib/skywriter/resource/elasticache/parameter_group.rb +15 -0
- data/lib/skywriter/resource/elasticache/security_group.rb +13 -0
- data/lib/skywriter/resource/elasticache/security_group_ingress.rb +15 -0
- data/lib/skywriter/resource/elasticache/subnet_group.rb +14 -0
- data/lib/skywriter/resource/iam/access_key.rb +16 -0
- data/lib/skywriter/resource/iam/group.rb +15 -0
- data/lib/skywriter/resource/iam/instance_profile.rb +15 -0
- data/lib/skywriter/resource/iam/policy.rb +18 -0
- data/lib/skywriter/resource/iam/role.rb +13 -0
- data/lib/skywriter/resource/iam/user.rb +17 -0
- data/lib/skywriter/resource/iam/user_to_group_addition.rb +15 -0
- data/lib/skywriter/resource/logical_name_pointer.rb +11 -0
- data/lib/skywriter/resource/pointer.rb +23 -0
- data/lib/skywriter/resource/rds/db_instance.rb +37 -0
- data/lib/skywriter/resource/rds/db_parameter_group.rb +17 -0
- data/lib/skywriter/resource/rds/db_security_group.rb +17 -0
- data/lib/skywriter/resource/rds/db_security_group_ingress.rb +18 -0
- data/lib/skywriter/resource/rds/db_subnet_group.rb +16 -0
- data/lib/skywriter/resource/redshift/cluster.rb +37 -0
- data/lib/skywriter/resource/redshift/cluster_parameter_group.rb +16 -0
- data/lib/skywriter/resource/redshift/cluster_security_group.rb +14 -0
- data/lib/skywriter/resource/redshift/cluster_security_group_ingress.rb +17 -0
- data/lib/skywriter/resource/redshift/cluster_subnet_group.rb +15 -0
- data/lib/skywriter/resource/ref_pointer.rb +11 -0
- data/lib/skywriter/resource/route_53/record_set.rb +24 -0
- data/lib/skywriter/resource/route_53/record_set_group.rb +17 -0
- data/lib/skywriter/resource/s3/bucket.rb +17 -0
- data/lib/skywriter/resource/s3/bucket_policy.rb +15 -0
- data/lib/skywriter/resource/sdb/domain.rb +13 -0
- data/lib/skywriter/resource/sns/topic.rb +16 -0
- data/lib/skywriter/resource/sns/topic_policy.rb +15 -0
- data/lib/skywriter/resource/sqs/queue.rb +18 -0
- data/lib/skywriter/resource/sqs/queue_policy.rb +15 -0
- data/lib/skywriter/resource.rb +165 -0
- data/lib/skywriter/resource_property/README.md +64 -0
- data/lib/skywriter/resource_property/auto_scaling/block_device_mapping.rb +12 -0
- data/lib/skywriter/resource_property/auto_scaling/ebs_block_device.rb +17 -0
- data/lib/skywriter/resource_property/auto_scaling/notification_configuration.rb +11 -0
- data/lib/skywriter/resource_property/auto_scaling/tag.rb +15 -0
- data/lib/skywriter/resource_property/cloud_formation/resource_tag.rb +12 -0
- data/lib/skywriter/resource_property/cloud_front/cache_behavior.rb +14 -0
- data/lib/skywriter/resource_property/cloud_front/custom_origin.rb +11 -0
- data/lib/skywriter/resource_property/cloud_front/default_cache_behavior.rb +13 -0
- data/lib/skywriter/resource_property/cloud_front/distribution_config.rb +16 -0
- data/lib/skywriter/resource_property/cloud_front/forwarded_value.rb +13 -0
- data/lib/skywriter/resource_property/cloud_front/logging.rb +10 -0
- data/lib/skywriter/resource_property/cloud_front/origin.rb +12 -0
- data/lib/skywriter/resource_property/cloud_front/s3_origin.rb +9 -0
- data/lib/skywriter/resource_property/cloud_watch/metric_dimension.rb +10 -0
- data/lib/skywriter/resource_property/dynamo_db/attribute_definition.rb +12 -0
- data/lib/skywriter/resource_property/dynamo_db/global_secondary_index.rb +14 -0
- data/lib/skywriter/resource_property/dynamo_db/key_schema.rb +10 -0
- data/lib/skywriter/resource_property/dynamo_db/local_secondary_index.rb +13 -0
- data/lib/skywriter/resource_property/dynamo_db/projection.rb +12 -0
- data/lib/skywriter/resource_property/dynamo_db/provisioned_throughput.rb +10 -0
- data/lib/skywriter/resource_property/ec2/block_device_mapping.rb +12 -0
- data/lib/skywriter/resource_property/ec2/ebs_block_device.rb +15 -0
- data/lib/skywriter/resource_property/ec2/icmp.rb +10 -0
- data/lib/skywriter/resource_property/ec2/mount_point.rb +10 -0
- data/lib/skywriter/resource_property/ec2/network_interface.rb +18 -0
- data/lib/skywriter/resource_property/ec2/network_interface_association.rb +12 -0
- data/lib/skywriter/resource_property/ec2/network_interface_attachment.rb +10 -0
- data/lib/skywriter/resource_property/ec2/network_interface_group_item.rb +10 -0
- data/lib/skywriter/resource_property/ec2/network_interface_private_ip_specification.rb +10 -0
- data/lib/skywriter/resource_property/ec2/port_range.rb +10 -0
- data/lib/skywriter/resource_property/ec2/security_group_rule.rb +12 -0
- data/lib/skywriter/resource_property/ec2/tag.rb +10 -0
- data/lib/skywriter/resource_property/elastic_beanstalk/environment_tier.rb +11 -0
- data/lib/skywriter/resource_property/elastic_beanstalk/option_setting.rb +13 -0
- data/lib/skywriter/resource_property/elastic_beanstalk/source_bundle.rb +10 -0
- data/lib/skywriter/resource_property/elastic_beanstalk/source_configuration.rb +10 -0
- data/lib/skywriter/resource_property/elastic_load_balancing/app_cookie_stickiness_policy.rb +10 -0
- data/lib/skywriter/resource_property/elastic_load_balancing/health_check.rb +13 -0
- data/lib/skywriter/resource_property/elastic_load_balancing/lb_cookie_stickiness_policy.rb +10 -0
- data/lib/skywriter/resource_property/elastic_load_balancing/listener.rb +14 -0
- data/lib/skywriter/resource_property/elastic_load_balancing/policy.rb +13 -0
- data/lib/skywriter/resource_property/rds/security_group_rule.rb +12 -0
- data/lib/skywriter/resource_property/redshift/parameter.rb +10 -0
- data/lib/skywriter/resource_property/route53/alias_target.rb +10 -0
- data/lib/skywriter/resource_property/s3/website_configuration_policy.rb +16 -0
- data/lib/skywriter/resource_property/sns/subscription.rb +10 -0
- data/lib/skywriter/resource_property/sqs/redrive_policy.rb +10 -0
- data/lib/skywriter/resource_property.rb +57 -0
- data/lib/skywriter/template.rb +143 -0
- data/lib/skywriter/version.rb +3 -0
- data/lib/skywriter.rb +8 -0
- data/skywriter.gemspec +29 -0
- data/spec/skywriter/function_spec.rb +99 -0
- data/spec/skywriter/resource/cloud_formation/authentication_spec.rb +36 -0
- data/spec/skywriter/resource/cloud_formation/custom_resource_spec.rb +30 -0
- data/spec/skywriter/resource/logical_name_pointer_spec.rb +15 -0
- data/spec/skywriter/resource/ref_pointer_spec.rb +15 -0
- data/spec/skywriter/resource_property/ec2/security_group_rule_spec.rb +7 -0
- data/spec/skywriter/resource_property_spec.rb +153 -0
- data/spec/skywriter/resource_spec.rb +236 -0
- data/spec/skywriter/template_spec.rb +246 -0
- data/spec/spec_helper.rb +29 -0
- metadata +306 -0
@@ -0,0 +1,165 @@
|
|
1
|
+
module Skywriter
|
2
|
+
module Resource
|
3
|
+
module DSL
|
4
|
+
# Declare a Resource property
|
5
|
+
#
|
6
|
+
# @param name [Symbol] The property name as it exists in the AWS documentation
|
7
|
+
def property(name)
|
8
|
+
property_definitions << PropertyDefinition.new(name)
|
9
|
+
end
|
10
|
+
|
11
|
+
# A list of PropertyDefinition instances defined for this Resource
|
12
|
+
#
|
13
|
+
def property_definitions
|
14
|
+
@property_definitions ||= []
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def self.extended(base)
|
20
|
+
type_name = base.name.gsub("Skywriter::Resource", "AWS")
|
21
|
+
|
22
|
+
base.send(:define_method, :type) do
|
23
|
+
type_name
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class PropertyDefinition
|
28
|
+
attr_reader :name, :key
|
29
|
+
|
30
|
+
def initialize(name)
|
31
|
+
@name = name.to_s
|
32
|
+
@key = name.to_s.underscore.to_sym
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
attr_reader :logical_name
|
38
|
+
|
39
|
+
# @param [String] logical_name The logical name of this Resource. Will be
|
40
|
+
# used as the hash key in the 'Resources' hash
|
41
|
+
# @param [Hash] options Options hash. Valid values depend on the
|
42
|
+
# implementing class - see the AWS documentation at
|
43
|
+
# http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
|
44
|
+
# for details. Additionally, you can pass `:additional_dependencies` as
|
45
|
+
# described in the README. And `:deletion_policy`, `:metadata` and
|
46
|
+
# `:update_policy`.
|
47
|
+
#
|
48
|
+
def initialize(logical_name, options = {})
|
49
|
+
@logical_name = logical_name
|
50
|
+
|
51
|
+
@additional_dependencies = Set.new(Array(delete_liberally(options, :additional_dependencies)))
|
52
|
+
@deletion_policy = delete_liberally(options, :deletion_policy)
|
53
|
+
@metadata = delete_liberally(options, :metadata)
|
54
|
+
@update_policy = delete_liberally(options, :update_policy)
|
55
|
+
|
56
|
+
@options = options.freeze
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns a hash representing the Resource
|
60
|
+
#
|
61
|
+
# @return [Hash] A JSON-able hash
|
62
|
+
#
|
63
|
+
def as_json(*)
|
64
|
+
Thread.current[:skywriter_as_json_context] = self
|
65
|
+
|
66
|
+
{ logical_name =>
|
67
|
+
{
|
68
|
+
'Type' => type,
|
69
|
+
'Properties' => properties.as_json,
|
70
|
+
'DependsOn' => all_dependencies,
|
71
|
+
'Metadata' => metadata,
|
72
|
+
'DeletionPolicy' => deletion_policy,
|
73
|
+
'UpdatePolicy' => update_policy,
|
74
|
+
}.reject { |key, value| value.nil? }
|
75
|
+
}
|
76
|
+
ensure
|
77
|
+
Thread.current[:skywriter_as_json_context] = nil
|
78
|
+
end
|
79
|
+
|
80
|
+
# Returns a pointer to this Resource
|
81
|
+
#
|
82
|
+
# Pointers represent references to resources defined elsewhere in
|
83
|
+
# a template. In most cases pointers serialize to something like
|
84
|
+
#
|
85
|
+
# @example
|
86
|
+
# { "Ref" => "logical_name" }
|
87
|
+
#
|
88
|
+
# In some cases, you might need to refer to a resource using its
|
89
|
+
# logical name directly (as opposed to nested in a hash as shown),
|
90
|
+
# in which case you can tell `as_pointer` to point with the resource's
|
91
|
+
# logical name:
|
92
|
+
#
|
93
|
+
# @example
|
94
|
+
# resource.as_pointer(with: :logical_name)
|
95
|
+
#
|
96
|
+
# @param with [:ref, :logical_name] How this pointer should be
|
97
|
+
# rendered in JSON. Use `:ref` to generate {"Ref": "foo"},
|
98
|
+
# and `:logical_name` to generate "foo"
|
99
|
+
#
|
100
|
+
# @return [Skywriter::Resource::Pointer] A pointer to this resource
|
101
|
+
#
|
102
|
+
def as_pointer(options = {})
|
103
|
+
with = options[:with] || :ref
|
104
|
+
case with
|
105
|
+
when :ref
|
106
|
+
Skywriter::Resource::RefPointer.new(self)
|
107
|
+
when :logical_name
|
108
|
+
Skywriter::Resource::LogicalNamePointer.new(self)
|
109
|
+
else
|
110
|
+
raise ArgumentError, "Unrecognized 'with' value '#{with}'"
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# @api private
|
115
|
+
#
|
116
|
+
# @param dependency [Skywriter::Resource] A Resource upon which this resource depends.
|
117
|
+
#
|
118
|
+
def register_dependency(dependency)
|
119
|
+
magical_dependencies << dependency.logical_name
|
120
|
+
end
|
121
|
+
|
122
|
+
private
|
123
|
+
|
124
|
+
attr_reader :options, :additional_dependencies, :deletion_policy, :metadata,
|
125
|
+
:update_policy
|
126
|
+
|
127
|
+
def self.included(base)
|
128
|
+
base.extend(DSL)
|
129
|
+
end
|
130
|
+
|
131
|
+
def all_dependencies
|
132
|
+
(additional_dependencies + magical_dependencies).to_a
|
133
|
+
end
|
134
|
+
|
135
|
+
def delete_liberally(hash, key)
|
136
|
+
hash.delete(key.to_sym) ||
|
137
|
+
hash.delete(key.to_s) ||
|
138
|
+
hash.delete(key.to_s.camelcase) ||
|
139
|
+
hash.delete(key.to_s.camelcase.to_sym)
|
140
|
+
end
|
141
|
+
|
142
|
+
def magical_dependencies
|
143
|
+
@magical_dependencies ||= Set.new
|
144
|
+
end
|
145
|
+
|
146
|
+
def properties
|
147
|
+
@properties ||= property_definitions.each_with_object({}) do |property_definition, hash|
|
148
|
+
if (value = property_value(property_definition))
|
149
|
+
hash[property_definition.name] = value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
def property_value(property_definition)
|
155
|
+
options[property_definition.key.to_sym] ||
|
156
|
+
options[property_definition.key.to_s] ||
|
157
|
+
options[property_definition.name.to_sym] ||
|
158
|
+
options[property_definition.name.to_s]
|
159
|
+
end
|
160
|
+
|
161
|
+
def property_definitions
|
162
|
+
self.class.property_definitions
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# ResourceProperty Conversions
|
2
|
+
|
3
|
+
The AWS CloudFormation documentation uses inconsistent naming conventions
|
4
|
+
for Resource Properties. We've attempted to normalize these names, and have
|
5
|
+
provided the following mapping for reference.
|
6
|
+
|
7
|
+
Amazon Name | Skywalker Class | Naming Comments
|
8
|
+
----------- | --------------- | ---------------
|
9
|
+
AWS CloudFormation AutoScaling Block Device Mapping Property Type | |
|
10
|
+
AWS CloudFormation AutoScaling EBS Block Device Property Type | |
|
11
|
+
Auto Scaling NotificationConfiguration Property Type | |
|
12
|
+
Auto Scaling Tags Property Type | |
|
13
|
+
CloudFormation Stack Parameters Property Type | |
|
14
|
+
CloudFront CacheBehavior Type | |
|
15
|
+
CloudFront ForwardedValues Type | |
|
16
|
+
CloudFront CustomOrigin Type | *::CloudFront::CustomOrigin | dropped 'Type'
|
17
|
+
CloudFront DefaultCacheBehavior Type | *::CloudFront::DefaultCacheBehavior | dropped 'Type'
|
18
|
+
CloudFront DistributionConfig Type | *::CloudFront::DistributionConfig | dropped 'Type'
|
19
|
+
CloudFront Logging Type | *::CloudFront::Logging | dropped 'Type'
|
20
|
+
CloudFront Origin Type | *::CloudFront::Origin | dropped 'Type'
|
21
|
+
CloudFront S3Origin Type | *::CloudFront::S3Origin | dropped 'Type'
|
22
|
+
CloudWatch Metric Dimension Property Type | *::CloudWatch::MetricDimension | dropped 'Property Type'
|
23
|
+
DynamoDB Attribute Definitions | *::DynamoDB::AttributeDefinition |
|
24
|
+
DynamoDB Global Secondary Indexes | *::DynamoDB::GlobalSecondaryIndex | made singular
|
25
|
+
DynamoDB Key Schema | *::DynamoDB::KeySchema |
|
26
|
+
DynamoDB Local Secondary Indexes | *::DynamoDB::LocalSecondaryIndex | made singular
|
27
|
+
DynamoDB Projection Object | *::DynamoDB::Projection | dropped 'Object'
|
28
|
+
DynamoDB Provisioned Throughput | *::DynamoDB::ProvisionedThroughput |
|
29
|
+
AWS CloudFormation EC2 Block Device Mapping Property Type | *::EC2::BlockDeviceMapping | dropped 'Type'
|
30
|
+
AWS CloudFormation EC2 Block Device Property Type | *::EC2::EBSBlockDevice | dropped 'Type'
|
31
|
+
EC2 ICMP Property Type | *::EC2::ICMP | dropped 'Type'
|
32
|
+
EC2 MountPoint Property Type | *::EC2::MountPoint | dropped 'Type'
|
33
|
+
EC2 NetworkInterface Embedded Property Type | *::EC2::NetworkInterface | dropped 'Type'
|
34
|
+
EC2 Network Interface Association | *::EC2::NetworkInterfaceAssociation |
|
35
|
+
EC2 Network Interface Attachment | *::EC2::NetworkInterfaceAttachment |
|
36
|
+
EC2 Network Interface Group Item | *::EC2::NetworkInterfaceGroupItem |
|
37
|
+
EC2 Network Interface Private IP Specification | *::EC2::NetworkInterfacePrivateIPSpecification |
|
38
|
+
EC2 PortRange Property Type | *::EC2::PortRange | dropped 'Type'
|
39
|
+
EC2 Security Group Rule Property Type | *::EC2::SecurityGroupRule | dropped 'Type'
|
40
|
+
EC2 Tag | *::EC2::Tag |
|
41
|
+
AWS Elastic Beanstalk Environment Tier Property Type | *::ElasticBeanstalk::EnvironmentTier | dropped 'Property Type'
|
42
|
+
AWS Elastic Beanstalk OptionSettings Property Type | *::ElasticBeanstalk::OptionSetting | dropped 'Property Type', made singular
|
43
|
+
AWS Elastic Beanstalk SourceBundle Property Type | *::ElasticBeanstalk::SourceBundle | dropped 'Property Type'
|
44
|
+
AWS Elastic Beanstalk SourceConfiguration Property Type | *::ElasticBeanstalk::SourceConfiguration | dropped 'Property Type'
|
45
|
+
ElasticLoadBalancing AppCookieStickinessPolicy Type | *::ElasticLoadBalancing::AppCookieStickinessPolicy | dropped 'Type'
|
46
|
+
ElasticLoadBalancing HealthCheck Type | *::ElasticLoadBalancing::HealthCheck | dropped 'Type'
|
47
|
+
ElasticLoadBalancing LBCookieStickinessPolicy Type | *::ElasticLoadBalancing::LBCookieStickinessPolicy | dropped 'Type'
|
48
|
+
ElasticLoadBalancing Listener Property Type | *::ElasticLoadBalancing::Listener | dropped 'Property Type'
|
49
|
+
ElasticLoadBalancing Policy Type | *::ElasticLoadBalancing::Policy | dropped 'Type'
|
50
|
+
Name Type | |
|
51
|
+
Amazon Redshift Parameter Type | *::Redshift::Parameter | dropped 'Type'
|
52
|
+
AWS CloudFormation Resource Tags Type | *::CloudFormation::ResourceTag | dropped 'Type', made singular
|
53
|
+
RDS Security Group Rule | *::RDS::SecurityGroupRule |
|
54
|
+
Route 53 AliasTarget Property Type | *::Route53::AliasTarget | dropped 'Property Type'
|
55
|
+
AWS CloudFormation Website Configuration Property Type | *::S3::WebsiteConfiguration | dropped 'Property Type', inferred namespace
|
56
|
+
SNS Subscription Property Type | *::SNS::Subscription | dropped 'Property Type'
|
57
|
+
Amazon SQS RedrivePolicy | *::SQS::RedrivePolicy |
|
58
|
+
|
59
|
+
In general, Resource Property names have been stripped of `Type`, `Property Type` and
|
60
|
+
'Embedded Property Type', and product namespaces (ie `SQS`, `ElasticLoadBalancing`)
|
61
|
+
have been inferred from the documentation where possible. When a type is called out
|
62
|
+
as being an 'embedded property' of namespaced resource, that namespace has been adopted for
|
63
|
+
the Resource Property. In some cases plural forms have been made singular (where the
|
64
|
+
entity being described is singular).
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module AutoScaling
|
4
|
+
class EBSBlockDevice < Skywriter::ResourceProperty
|
5
|
+
property :DeleteOnTermination
|
6
|
+
property :Iops
|
7
|
+
property :SnapshotId
|
8
|
+
property :VolumeSize
|
9
|
+
property :VolumeType
|
10
|
+
end
|
11
|
+
|
12
|
+
BlockDevice = EBSBlockDevice
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module CloudFront
|
4
|
+
class CacheBehavior < Skywriter::ResourceProperty
|
5
|
+
property :TargetOriginId
|
6
|
+
property :ForwardedValues
|
7
|
+
property :TrustedSigners
|
8
|
+
property :ViewerProtocolPolicy
|
9
|
+
property :MinTTL
|
10
|
+
property :PathPattern
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module CloudFront
|
4
|
+
class DefaultCacheBehavior < Skywriter::ResourceProperty
|
5
|
+
property :TargetOriginId
|
6
|
+
property :ForwardedValues
|
7
|
+
property :TrustedSigners
|
8
|
+
property :ViewerProtocolPolicy
|
9
|
+
property :MinTTL
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module CloudFront
|
4
|
+
class DistributionConfig < Skywriter::ResourceProperty
|
5
|
+
property :Aliases
|
6
|
+
property :CacheBehaviors
|
7
|
+
property :Comment
|
8
|
+
property :DefaultCacheBehavior
|
9
|
+
property :DefaultRootObject
|
10
|
+
property :Enabled
|
11
|
+
property :Logging
|
12
|
+
property :Origins
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module DynamoDB
|
4
|
+
class GlobalSecondaryIndex < Skywriter::ResourceProperty
|
5
|
+
property :IndexName
|
6
|
+
property :KeySchema
|
7
|
+
property :Projection
|
8
|
+
property :ProvisionedThroughput
|
9
|
+
end
|
10
|
+
|
11
|
+
GlobalSecondaryIndexes = GlobalSecondaryIndex
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module DynamoDB
|
4
|
+
class LocalSecondaryIndex < Skywriter::ResourceProperty
|
5
|
+
property :IndexName
|
6
|
+
property :KeySchema
|
7
|
+
property :Projection
|
8
|
+
end
|
9
|
+
|
10
|
+
LocalSecondaryIndexes = LocalSecondaryIndex
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module EC2
|
4
|
+
class EBSBlockDevice < Skywriter::ResourceProperty
|
5
|
+
property :DeleteOnTermination
|
6
|
+
property :Iops
|
7
|
+
property :SnapshotId
|
8
|
+
property :VolumeSize
|
9
|
+
property :VolumeType
|
10
|
+
end
|
11
|
+
|
12
|
+
BlockDevice = EBSBlockDevice
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Skywriter
|
2
|
+
class ResourceProperty
|
3
|
+
module EC2
|
4
|
+
class NetworkInterface < Skywriter::ResourceProperty
|
5
|
+
property :AssociatePublicIpAddress
|
6
|
+
property :DeleteOnTermination
|
7
|
+
property :Description
|
8
|
+
property :DeviceIndex
|
9
|
+
property :GroupSet
|
10
|
+
property :NetworkInterfaceId
|
11
|
+
property :PrivateIpAddress
|
12
|
+
property :PrivateIpAddresses
|
13
|
+
property :SecondaryPrivateIpAddressCount
|
14
|
+
property :SubnetId
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|