aws-must-templates 0.1.2
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.
- checksums.yaml +7 -0
- data/README.md +390 -0
- data/lib/aws-must-templates.rb +2 -0
- data/lib/tasks/cross-ref.rb +78 -0
- data/lib/tasks/suite.rake +292 -0
- data/lib/test-suites/test_suites.rb +115 -0
- data/mustache/commonCfnSignal.mustache +34 -0
- data/mustache/commonCreationPolicy.mustache +33 -0
- data/mustache/commonDependsOn.mustache +25 -0
- data/mustache/commonInstanceType.mustache +27 -0
- data/mustache/commonKeyValue.mustache +28 -0
- data/mustache/commonStackRef.mustache +23 -0
- data/mustache/commonValue.mustache +34 -0
- data/mustache/initializeCFinit.mustache +27 -0
- data/mustache/initializeCFtools.mustache +27 -0
- data/mustache/initializeCfnInitHupFiles.mustache +85 -0
- data/mustache/initializeInstallAwsCli.mustache +32 -0
- data/mustache/initializeInstallChef.mustache +37 -0
- data/mustache/initializeProvisionChefZero.mustache +36 -0
- data/mustache/initializeStartCfnHup.mustache +25 -0
- data/mustache/mapping.mustache +27 -0
- data/mustache/mappingSubnetConfig.mustache +27 -0
- data/mustache/mappings.mustache +71 -0
- data/mustache/output.mustache +38 -0
- data/mustache/parameter.mustache +35 -0
- data/mustache/resource.mustache +51 -0
- data/mustache/resourceInstance.mustache +52 -0
- data/mustache/resourceInstanceInitialize.mustache +120 -0
- data/mustache/resourceInstanceMetadata.mustache +65 -0
- data/mustache/resourceInstanceProfile.mustache +34 -0
- data/mustache/resourceInternetGateway.mustache +87 -0
- data/mustache/resourcePolicy.mustache +50 -0
- data/mustache/resourceProvisionChef.mustache +38 -0
- data/mustache/resourceRole.mustache +40 -0
- data/mustache/resourceS3Bucket.mustache +39 -0
- data/mustache/resourceSecurityGroup.mustache +46 -0
- data/mustache/resourceStack.mustache +45 -0
- data/mustache/resourceSubnet.mustache +41 -0
- data/mustache/resourceUser.mustache +58 -0
- data/mustache/resourceVPC.mustache +44 -0
- data/mustache/resourceWait.mustache +39 -0
- data/mustache/resources.mustache +65 -0
- data/mustache/root.mustache +244 -0
- data/mustache/tag.mustache +27 -0
- data/pics/test-suites.jpg +0 -0
- metadata +146 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
## <a id="resourceInstanceMetadata.mustache"></a>resourceInstanceMetadata.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
The Metadata attribute enables you to associate structured data with a
|
9
|
+
resource. By adding a Metadata attribute to a resource, you can add
|
10
|
+
data in JSON format to the resource declaration.
|
11
|
+
|
12
|
+
**Attributes**:
|
13
|
+
|
14
|
+
* `Initialize`: array of
|
15
|
+
* `StartCfnHup`: see [initializeCfnInitHupFiles](#initializeCfnInitHupFiles.mustache)
|
16
|
+
|
17
|
+
+++close+++
|
18
|
+
|
19
|
+
}}
|
20
|
+
{{! +++fold-on+++ }}
|
21
|
+
|
22
|
+
{{! NOTICE: check for 'resourceInstanceInitialize.mustache' for using
|
23
|
+
'#Initialize' array to setup `UserData` -script }}
|
24
|
+
|
25
|
+
{{# Initialize.length }}
|
26
|
+
"AWS::CloudFormation::Init":{
|
27
|
+
"config" : {
|
28
|
+
"packages" : {
|
29
|
+
},
|
30
|
+
"groups" : {
|
31
|
+
},
|
32
|
+
"users" : {
|
33
|
+
},
|
34
|
+
"sources" : {
|
35
|
+
},
|
36
|
+
"files" : {
|
37
|
+
"/tmp/cfn-init.txt": {
|
38
|
+
"content":{
|
39
|
+
"Fn::Join":["", [ "Installed in cfn-init", "\n" ]]
|
40
|
+
}
|
41
|
+
, "mode":"000444"
|
42
|
+
, "owner":"root"
|
43
|
+
, "group":"root"
|
44
|
+
}
|
45
|
+
{{# Initialize }}{{# StartCfnHup }}, {{> initializeCfnInitHupFiles }}{{/ StartCfnHup }}{{/ Initialize }}
|
46
|
+
},
|
47
|
+
"commands" : {
|
48
|
+
},
|
49
|
+
"services" : {
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
} {{! AWS::CloudFormation::Init" }}
|
54
|
+
{{/ Initialize.length }}
|
55
|
+
|
56
|
+
{{! Add a metadata field, which, when updated, triggers cfn-hup. c.f. initializeCfnInitHupFiles }}
|
57
|
+
{{# Initialize }}{{# StartCfnHup }}
|
58
|
+
, "CfnHup": "updating this field causes cfn-hup to trigger"
|
59
|
+
{{/ StartCfnHup }}{{/ Initialize }}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
+++start+++
|
4
|
+
|
5
|
+
|
6
|
+
## <a id="resourceInstanceProfile.mustache"></a>resourceInstanceProfile.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
a container for an IAM role and enables you to pass role information to an Amazon EC2 instance when the instance starts
|
9
|
+
|
10
|
+
**Attributes**: context= `./resources/Instance`
|
11
|
+
|
12
|
+
* `Name`: name of the InstanceProfile to create
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
+++close+++
|
17
|
+
|
18
|
+
}}
|
19
|
+
|
20
|
+
{{! +++fold-on+++ }}
|
21
|
+
|
22
|
+
|
23
|
+
"{{Name}}" : {
|
24
|
+
"Type" : "AWS::IAM::InstanceProfile",
|
25
|
+
"Properties" : {
|
26
|
+
"Path" : "/",
|
27
|
+
"Roles" : [{{# Roles}}{ "Ref": "{{Ref}}"}{{_comma}}{{/ Roles}} ]
|
28
|
+
}
|
29
|
+
},
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="resourceInternetGateway.mustache"></a>resourceInternetGateway.mustache <a class='navigator' href='#top'>[top]</a>
|
8
|
+
|
9
|
+
Creates a new Internet gateway in your AWS account. After creating the
|
10
|
+
Internet gateway, attach it to a VPC, and create/attach a routetable
|
11
|
+
to `Vpc`, and add a routetable entry entry to enable internet
|
12
|
+
access on `Vpc` && `Subnet`
|
13
|
+
|
14
|
+
**Attributes**: context= `./resources/InstanceSecurityGroup`
|
15
|
+
|
16
|
+
* `Name` : of the Internet Gateway
|
17
|
+
* `Vpc`: reference to VPC where to atttace
|
18
|
+
* `Subnet`: reference to VPC where to attach route to InternetGateway
|
19
|
+
* `Tags`: (optional) as [commonKeyValue.mustache](#commonKeyValue.mustache)
|
20
|
+
|
21
|
+
|
22
|
+
+++close+++
|
23
|
+
|
24
|
+
}}
|
25
|
+
|
26
|
+
{{! +++fold-on+++ }}
|
27
|
+
|
28
|
+
|
29
|
+
{{! Create internet gateway }}
|
30
|
+
"{{Name}}" : {
|
31
|
+
"Type" : "AWS::EC2::InternetGateway",
|
32
|
+
"Properties" : {
|
33
|
+
"Tags" : [ {{# Tags }}{{> commonKeyValue }}{{_comma}}{{/ Tags }}]
|
34
|
+
}
|
35
|
+
},
|
36
|
+
|
37
|
+
{{! Attache the internet gateway created to VPC }}
|
38
|
+
"Attach{{Vpc}}" : {
|
39
|
+
"Type" : "AWS::EC2::VPCGatewayAttachment",
|
40
|
+
"Properties" : {
|
41
|
+
"VpcId" : { "Ref" : "{{Vpc}}" },
|
42
|
+
"InternetGatewayId" : { "Ref" : "{{Name}}" }
|
43
|
+
}
|
44
|
+
},
|
45
|
+
|
46
|
+
|
47
|
+
{{! Create a route table for VPC }}
|
48
|
+
|
49
|
+
"RouteTable{{Vpc}}" : {
|
50
|
+
"Type" : "AWS::EC2::RouteTable",
|
51
|
+
"Properties" : {
|
52
|
+
"VpcId" : { "Ref" : "{{ Vpc }}" },
|
53
|
+
"Tags" : [
|
54
|
+
{"Key": "Name", "Value" : "RouteTable{{Vpc}}" }
|
55
|
+
, {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} }
|
56
|
+
]
|
57
|
+
}
|
58
|
+
},
|
59
|
+
|
60
|
+
|
61
|
+
{{! Add a route to internet gateway created }}
|
62
|
+
|
63
|
+
"Route{{Vpc}}" : {
|
64
|
+
"Type" : "AWS::EC2::Route",
|
65
|
+
"DependsOn" : "Attach{{Vpc}}",
|
66
|
+
"Properties" : {
|
67
|
+
"RouteTableId" : { "Ref" : "RouteTable{{Vpc}}" }
|
68
|
+
, "DestinationCidrBlock" : "0.0.0.0/0"
|
69
|
+
, "GatewayId" : { "Ref" : "{{Name}}" }
|
70
|
+
}
|
71
|
+
},
|
72
|
+
|
73
|
+
{{! Associates a subnet with a route table. }}
|
74
|
+
|
75
|
+
"RouteTableAssociation{{Subnet}}" : {
|
76
|
+
"Type" : "AWS::EC2::SubnetRouteTableAssociation"
|
77
|
+
, "Properties" : {
|
78
|
+
"SubnetId" : { "Ref" : "{{Subnet}}" }
|
79
|
+
, "RouteTableId" : { "Ref" : "RouteTable{{Vpc}}" }
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
{{_comma}}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
+++start+++
|
4
|
+
|
5
|
+
|
6
|
+
## <a id="resourcePolicy.mustache"></a>resourcePolicy.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
To assign permissions to a user, group, role, or resource, you create
|
9
|
+
a policy, which is a document that explicitly lists permissions.
|
10
|
+
|
11
|
+
**Attributes**: context= `./resources/Policy`
|
12
|
+
|
13
|
+
* `Name`: name of the Role to create
|
14
|
+
* `Statements` array of
|
15
|
+
* `Effect`: Allow/Deny
|
16
|
+
* `Actions`: list of actions for the policy
|
17
|
+
* `Resource`: array of [commonValues](#commonValue.mustache) concatenated to create resource reference
|
18
|
+
|
19
|
+
|
20
|
+
+++close+++
|
21
|
+
|
22
|
+
}}
|
23
|
+
|
24
|
+
{{! +++fold-on+++ }}
|
25
|
+
|
26
|
+
"{{Name}}" : {
|
27
|
+
"Type" : "AWS::IAM::Policy",
|
28
|
+
"Properties" : {
|
29
|
+
"PolicyName" : "{{Name}}",
|
30
|
+
"Roles" : [ { "Ref" : "{{RoleRef}}" } ],
|
31
|
+
"PolicyDocument" : {
|
32
|
+
"Statement" : [
|
33
|
+
{{# Statements }}
|
34
|
+
{
|
35
|
+
"Effect" : "{{Effect}}",
|
36
|
+
"Action" : [ {{{Actions}}} ],
|
37
|
+
"Resource" :
|
38
|
+
{{^ Resource.length }} "{{ Resource }}" {{/ Resource.length }}
|
39
|
+
{{# Resource.length }} { "Fn::Join" : [ "", [ {{/ Resource.length }}
|
40
|
+
{{# Resource }}{{> commonValue }}{{ _comma }} {{/ Resource}}
|
41
|
+
{{# Resource.length }}] ] } {{/ Resource.length }}
|
42
|
+
}{{_comma}}
|
43
|
+
{{/ Statements }}
|
44
|
+
]
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}{{_comma}}
|
48
|
+
|
49
|
+
|
50
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="initializeProvisionChef.mustache"></a>initializeProvisionChef.mustache<a class='navigator' href='#top'> [top]</a>
|
8
|
+
|
9
|
+
UserData -script to provision Chef
|
10
|
+
|
11
|
+
**Attributes**: context= `./resources/Instance/InstallChef`
|
12
|
+
|
13
|
+
* `Node`: Chef node to provision
|
14
|
+
* `ChefZeroHost` : host where ChefZero can be accessed
|
15
|
+
|
16
|
+
|
17
|
+
+++close+++
|
18
|
+
|
19
|
+
}}
|
20
|
+
|
21
|
+
{{! +++fold-on+++ }}
|
22
|
+
|
23
|
+
|
24
|
+
, "NODE={{Node}}\n"
|
25
|
+
{{#ChefZeroHost}}
|
26
|
+
, "CHEF_ZERO_HOST='", {{> commonValue }}, "'\n"
|
27
|
+
{{/ChefZeroHost}}
|
28
|
+
, "CHEF_ZERO_HOST=$(echo $CHEF_ZERO_HOST)\n" {{! Removes new-line, which Ref -contruct creates }}
|
29
|
+
, "echo $(date): Create directory /etc/chef - to store client.pem Q\n"
|
30
|
+
, "[ -d /etc/chef ] || sudo mkdir /etc/chef \n"
|
31
|
+
, "echo $(date): Generating /tmp/fake.pem \n"
|
32
|
+
, "openssl genrsa -passout pass:'' -out /tmp/fake.pem 2048\n"
|
33
|
+
, "echo $(date): start chef provision on node $NODE \n"
|
34
|
+
, "sudo chef-client --validation_key /tmp/fake.pem --server http://$CHEF_ZERO_HOST:8889 --node-name $NODE --log_level info\n"
|
35
|
+
, "echo $(date): chef provisioned node $NODE successfully \n"
|
36
|
+
|
37
|
+
|
38
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
+++start+++
|
4
|
+
|
5
|
+
|
6
|
+
## <a id="resourceRole.mustache"></a>resourceRole.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
AWS Identity and Access Management (IAM) role.
|
9
|
+
|
10
|
+
**Attributes**: context= `./resources/Instance`
|
11
|
+
|
12
|
+
* `Name`: name of the Role to create
|
13
|
+
* `Resource`: resources you allow the action on
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
+++close+++
|
18
|
+
|
19
|
+
}}
|
20
|
+
|
21
|
+
{{! +++fold-on+++ }}
|
22
|
+
|
23
|
+
|
24
|
+
"{{Name}}" : {
|
25
|
+
"Type" : "AWS::IAM::Role"
|
26
|
+
, "Properties" : {
|
27
|
+
"Path" : "/",
|
28
|
+
"AssumeRolePolicyDocument" : {
|
29
|
+
"Statement" : [ {
|
30
|
+
"Effect" : "Allow",
|
31
|
+
"Principal" : {
|
32
|
+
"Service" : [ "ec2.amazonaws.com" ]
|
33
|
+
},
|
34
|
+
"Action" : [ "sts:AssumeRole" ]
|
35
|
+
} ]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}{{_comma}}
|
39
|
+
|
40
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
+++start+++
|
4
|
+
|
5
|
+
|
6
|
+
## <a id="resourceS3Bucket.mustache"></a>resourceS3Bucket.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
Create an S3 Bucket.
|
9
|
+
|
10
|
+
**Attributes**: context= `./resources/Instance`
|
11
|
+
|
12
|
+
* `Name`: name of the S3 resource to create
|
13
|
+
* `BucketName`: A name for the bucket. If you don't specify a name,
|
14
|
+
AWS CloudFormation generates a unique physical ID and uses that ID
|
15
|
+
for the bucket name.
|
16
|
+
* `DeletionPolicy`: attribute you can preserve or (in some cases) backup
|
17
|
+
a resource when its stack is deleted. Valid values `Delete`,
|
18
|
+
`Retain` (default), `Snapshot`
|
19
|
+
|
20
|
+
+++close+++
|
21
|
+
|
22
|
+
}}
|
23
|
+
|
24
|
+
{{! +++fold-on+++ }}
|
25
|
+
|
26
|
+
|
27
|
+
"{{Name}}" : {
|
28
|
+
"Type" : "AWS::S3::Bucket"
|
29
|
+
{{> commonCreationPolicy }}
|
30
|
+
, "DeletionPolicy" : "{{# DeletionPolicy }}{{DeletionPolicy}}{{/ DeletionPolicy}}{{^ DeletionPolicy }}Retain{{/ DeletionPolicy}}"
|
31
|
+
, "Properties" : {
|
32
|
+
{{# BucketName }} "BucketName" : "{{BucketName}}" {{/ BucketName }}
|
33
|
+
{{!
|
34
|
+
,"LifecycleConfiguration": { "Rules" : [ ] }
|
35
|
+
}}
|
36
|
+
}
|
37
|
+
}{{_comma}}
|
38
|
+
|
39
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="resourceSecurityGroup.mustache"></a>resourceSecurityGroup.mustache <a class='navigator' href='#top'>[top]</a>
|
8
|
+
|
9
|
+
Create an EC2 Security Group
|
10
|
+
|
11
|
+
**Attributes**: context= `./resources/SecurityGroup`
|
12
|
+
|
13
|
+
* `Name` : of the security group
|
14
|
+
* `VpcId`: The Reference name physical ID of the VPC. given as commonValue, [commonValue.mustache](#commonValue.mustache)
|
15
|
+
* `SecurityGroupIngress`: Arrays in a SecurityGroupIngr
|
16
|
+
* `IpProtocol`: default tcp
|
17
|
+
* `FromPort`: default to `Port`
|
18
|
+
* `ToPort`: defaults to `Port`
|
19
|
+
* CidrIp given as commonValue, [commonValue.mustache](#commonValue.mustache)
|
20
|
+
|
21
|
+
|
22
|
+
+++close+++
|
23
|
+
|
24
|
+
}}
|
25
|
+
|
26
|
+
{{! +++fold-on+++ }}
|
27
|
+
|
28
|
+
"{{Name}}" : {
|
29
|
+
"Type" : "AWS::EC2::SecurityGroup",
|
30
|
+
"Properties" : {
|
31
|
+
"GroupDescription" : "Enable SSH access via port 22"
|
32
|
+
{{# VpcId }}, "VpcId": {{> commonValue }} {{/ VpcId }}
|
33
|
+
, "SecurityGroupIngress" : [
|
34
|
+
{{# SecurityGroupIngress }}
|
35
|
+
{
|
36
|
+
"IpProtocol" : {{#IpProtocol}}"{{IpProtocol}}"{{/IpProtocol}}{{^IpProtocol}}"tcp"{{/IpProtocol}},
|
37
|
+
"FromPort" : "{{#FromPort}}{{FromPort}}{{/FromPort}}{{^FromPort}}{{Port}}{{/FromPort}}",
|
38
|
+
"ToPort" : "{{#ToPort}}{{ToPort}}{{/ToPort}}{{^ToPort}}{{Port}}{{/ToPort}}",
|
39
|
+
"CidrIp" : {{> commonValue }}
|
40
|
+
} {{_comma}}
|
41
|
+
{{/ SecurityGroupIngress }}
|
42
|
+
]
|
43
|
+
}
|
44
|
+
}{{_comma}}
|
45
|
+
|
46
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
+++start+++
|
4
|
+
|
5
|
+
|
6
|
+
## <a id="resourceStack.mustache"></a>resourceStack.mustache<a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
Nests a stack as a resource in a top-level template.
|
9
|
+
|
10
|
+
**Attributes**: context= `./resources/Policy`
|
11
|
+
|
12
|
+
* `Name`: resource name given to the nested stack
|
13
|
+
* `TemplateFile`: local path used to create `TemplateUrl` for AWS::CloudFormation::Stack
|
14
|
+
* `DependsOn`: With the DependsOn attribute you can specify that the
|
15
|
+
creation of a specific resource follows another
|
16
|
+
* `Parameters` Array of sub documents
|
17
|
+
`Key`
|
18
|
+
`Value`
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
+++close+++
|
23
|
+
|
24
|
+
}}
|
25
|
+
|
26
|
+
{{! +++fold-on+++ }}
|
27
|
+
|
28
|
+
"{{Name}}" : {
|
29
|
+
"Type" : "AWS::CloudFormation::Stack"
|
30
|
+
{{> commonDependsOn }}
|
31
|
+
, "Properties" : {
|
32
|
+
"TemplateURL": "{{TemplateURL}}"
|
33
|
+
, "Parameters" : {
|
34
|
+
{{# Parameters }}
|
35
|
+
"{{Key}}" : {{> commonValue }}{{_comma}}
|
36
|
+
{{/ Parameters }}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}{{_comma}}
|
40
|
+
|
41
|
+
|
42
|
+
{{! +++fold-off+++ }}
|
43
|
+
|
44
|
+
|
45
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="resourceSubnet.mustache"></a>resourceSubnet.mustache <a class='navigator' href='#top'>[top]</a>
|
8
|
+
|
9
|
+
Creates a subnet in an existing VPC.
|
10
|
+
|
11
|
+
**Attributes**:
|
12
|
+
|
13
|
+
* `Name` : of the VPC resource
|
14
|
+
* `CidrBlock` or as [commonKeyValue.mustache](#commonKeyValue.mustache)
|
15
|
+
* `VpcId`: resource name of VPC
|
16
|
+
* `MapPublicIpOnLaunch`: Indicates whether instances that are
|
17
|
+
launched in this subnet receive a public IP address. By default,
|
18
|
+
the value is `false`.
|
19
|
+
* `Tags`: (optional) as [commonKeyValue.mustache](#commonKeyValue.mustache)
|
20
|
+
|
21
|
+
|
22
|
+
+++close+++
|
23
|
+
|
24
|
+
}}
|
25
|
+
|
26
|
+
{{! +++fold-on+++ }}
|
27
|
+
|
28
|
+
|
29
|
+
"{{Name}}" : {
|
30
|
+
"Type" : "AWS::EC2::Subnet"
|
31
|
+
{{> commonDependsOn }}
|
32
|
+
, "Properties" : {
|
33
|
+
"CidrBlock" : "{{CidrBlock}}"
|
34
|
+
, "Tags" : [ {{# Tags }}{{> commonKeyValue }}{{_comma}}{{/ Tags }}]
|
35
|
+
, "MapPublicIpOnLaunch" : {{^MapPublicIpOnLaunch}}false{{/ MapPublicIpOnLaunch}}{{# MapPublicIpOnLaunch}}{{MapPublicIpOnLaunch}}{{/ MapPublicIpOnLaunch}}
|
36
|
+
, "VpcId" : { "Ref" : "{{VpcId}}" }
|
37
|
+
}
|
38
|
+
}{{_comma}}
|
39
|
+
|
40
|
+
|
41
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
## <a id="resourceUser.mustache"></a>resourceUser.mustache <a class='navigator' href='#top'>[top]</a>
|
7
|
+
|
8
|
+
Creates User and AccessKey resources. User resource is associated with a fixed policy.
|
9
|
+
|
10
|
+
|
11
|
+
**Attributes**:
|
12
|
+
|
13
|
+
* `Name`: of the user resource, derives
|
14
|
+
* `KeyName`: also AccessKey resource for `Name` user
|
15
|
+
|
16
|
+
+++close+++
|
17
|
+
|
18
|
+
}}
|
19
|
+
|
20
|
+
{{! +++fold-on+++ }}
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
"{{Name}}":{
|
25
|
+
"Type":"AWS::IAM::User",
|
26
|
+
"Properties":{
|
27
|
+
"Path":"/",
|
28
|
+
"Policies":[
|
29
|
+
{
|
30
|
+
"PolicyName":"root",
|
31
|
+
"PolicyDocument":{
|
32
|
+
"Statement":[
|
33
|
+
{
|
34
|
+
"Effect":"Allow",
|
35
|
+
"Action":"cloudformation:DescribeStackResource",
|
36
|
+
"Resource":"*"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
]
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
{{# KeyName }}
|
46
|
+
, "{{KeyName}}":{
|
47
|
+
"Type":"AWS::IAM::AccessKey",
|
48
|
+
"Properties":{
|
49
|
+
"UserName":{
|
50
|
+
"Ref":"{{Name}}"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
{{/ KeyName }}
|
55
|
+
|
56
|
+
{{_comma}}
|
57
|
+
|
58
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="resourceVPC.mustache"></a>resourceVPC.mustache <a class='navigator' href='#top'>[top]</a>
|
8
|
+
|
9
|
+
Creates a Virtual Private Cloud (VPC) with the CIDR block that you specify.
|
10
|
+
|
11
|
+
**Attributes**: context= `./resources/InstanceSecurityGroup`
|
12
|
+
|
13
|
+
* `Name` : of the VPC resource
|
14
|
+
* `CidrBlock` or as [commonKeyValue.mustache](#commonKeyValue.mustache)
|
15
|
+
* `EnableDnsSupport`: (= **true**) Specifies whether DNS resolution
|
16
|
+
is supported for the VPC. If this attribute is true, the Amazon
|
17
|
+
DNS server resolves DNS hostnames for your instances to their
|
18
|
+
corresponding IP addresses; otherwise, it does not.
|
19
|
+
* `EnableDnsHostnames`: (= **true**) Specifies whether the
|
20
|
+
instances launched in the VPC get DNS hostnames. If this
|
21
|
+
attribute is true, instances in the VPC get DNS hostnames;
|
22
|
+
otherwise, they do not. You can only set EnableDnsHostnames to
|
23
|
+
true if you also set the EnableDnsSupport attribute to true.
|
24
|
+
* `Tags`: (optional) as [commonKeyValue.mustache](#commonKeyValue.mustache)
|
25
|
+
|
26
|
+
|
27
|
+
+++close+++
|
28
|
+
|
29
|
+
}}
|
30
|
+
|
31
|
+
{{! +++fold-on+++ }}
|
32
|
+
|
33
|
+
|
34
|
+
"{{Name}}" : {
|
35
|
+
"Type" : "AWS::EC2::VPC",
|
36
|
+
"Properties" : {
|
37
|
+
"CidrBlock" : "{{ CidrBlock }}"
|
38
|
+
, "EnableDnsSupport": true
|
39
|
+
, "EnableDnsHostnames": true
|
40
|
+
, "Tags" : [ {{# Tags }}{{> commonKeyValue }}{{_comma}}{{/ Tags }}]
|
41
|
+
}
|
42
|
+
}{{_comma}}
|
43
|
+
|
44
|
+
{{! +++fold-off+++ }}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{{!
|
2
|
+
|
3
|
+
|
4
|
+
+++start+++
|
5
|
+
|
6
|
+
|
7
|
+
## <a id="resourceWait.mustache"></a>resourceWait.mustache<a class='navigator' href='#top'> [top]</a>
|
8
|
+
|
9
|
+
Creates a WaitHandle, and a WaitCondition on a resource `DependsOn`.
|
10
|
+
|
11
|
+
**Attributes**:
|
12
|
+
|
13
|
+
* `Name`:
|
14
|
+
* `DependsOn`: Resource on which depents
|
15
|
+
* `Timeout`: The length of time (in seconds) to wait for the number of
|
16
|
+
signals that the Count property specifies.
|
17
|
+
|
18
|
+
+++close+++
|
19
|
+
|
20
|
+
}}
|
21
|
+
|
22
|
+
{{! +++fold-on+++ }}
|
23
|
+
|
24
|
+
|
25
|
+
"{{Name}}" : {
|
26
|
+
"Type" : "AWS::CloudFormation::WaitConditionHandle"
|
27
|
+
},
|
28
|
+
|
29
|
+
"{{Name}}Condition" : {
|
30
|
+
"Type" : "AWS::CloudFormation::WaitCondition"
|
31
|
+
{{> commonDependsOn }}
|
32
|
+
, "Properties" : {
|
33
|
+
"Handle" : { "Ref" : "{{Name}}" }
|
34
|
+
, "Timeout" : "{{Timeout}}"
|
35
|
+
}
|
36
|
+
}{{_comma}}
|
37
|
+
|
38
|
+
|
39
|
+
{{! +++fold-off+++ }}
|