forked from manikantagaddam/terraform
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathcloudinstance.json
More file actions
45 lines (38 loc) · 953 Bytes
/
cloudinstance.json
File metadata and controls
45 lines (38 loc) · 953 Bytes
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
{
"AWSTemplateFormatVersion":"2010-09-09",
"Description":"creating instances using cloud formation in aws",
"Parameters":
{
"keypair": {
"Description": "keypair",
"Type":"AWS::EC2::KeyPair::KeyName"
},
"imageid":
{
"Type":"AWS::EC2::Image::Id"
}
},
"Resources" :
{
"cloudinstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"KeyName": { "Ref": "keypair" },
"ImageId": {"Ref" : "imageid" },
"InstanceType": "t2.micro",
"SecurityGroupIds" : ["sg-0e9c5c6c633efd80b"],
"UserData":{
"Fn::Base64":{
"Fn::Join":[
"",
[
"#!bin/bash -ex",
"sudo apt-get update",
"sudo apt-get install nginx -y"
] ]
}
}
}
}
}
}