-
Notifications
You must be signed in to change notification settings - Fork 2
/
tes.json
79 lines (70 loc) · 2.21 KB
/
tes.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation Sample Template vpc_single_instance_in_subnet.template: Sample template showing how to create a VPC and add an EC2 instance with an Elastic IP address and a security group. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters": {
"InstanceType": {
"Description": "WebServer EC2 instance type",
"Type": "String",
"Default": "m1.medium",
"ConstraintDescription": "must be a valid EC2 instance type."
},
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "String",
"Default": "dfad"
},
"ImageID": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "String",
"Default": "ami-12345"
},
"InstanceSecurityGroup": {
"Description": " The IP address range that can be used to SSH to the EC2 instances",
"Type": "AWS::EC2::SecurityGroup::Id",
"Default": "sg-12345"
},
"SubnetId": {
"Description": " The IP address range that can be used to SSH to the EC2 instances",
"Type": "AWS::EC2::Subnet::Id",
"Default": "subnet-12345"
}
},
"Resources": {
"testInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"ImageId": {
"Ref": "ImageID"
},
"SecurityGroupIds": [{
"Ref": "InstanceSecurityGroup"
}],
"SubnetId": {
"Ref": "SubnetId"
},
"InstanceType": {
"Ref": "InstanceType"
},
"KeyName": {
"Ref": "KeyName"
},
"UserData": {
"Fn::Base64": {
"Fn::Join": ["", [
"#!/bin/bash -v\n",
"curl -o /tmp/bootchef.sh http://35.163.69.37/bootchef.sh\n",
"chmod +x /tmp/bootchef.sh\n",
"/bin/bash /tmp/bootchef.sh\n",
"/opt/aws/bin/cfn-signal -e 0 -r \"ChefClient setup complete\" '", {
"Ref": "WaitHandle"
}, "'\n"
]]
}
}
}
},
"WaitHandle": {
"Type": "AWS::CloudFormation::WaitConditionHandle"
}
}
}