-
Notifications
You must be signed in to change notification settings - Fork 229
/
Copy pathsc-cloud9.json
84 lines (82 loc) · 2.52 KB
/
sc-cloud9.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
80
81
82
83
84
{
"Description": "AWS Cloud9 IDE (fdp-1qj64b3c2)",
"Metadata": {
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
"default": "Cloud9 Environment"
},
"Parameters": [
"EnvironmentName",
"InstanceType",
"HibernateMinutes"
]
},
{
"Label": {
"default": "Linked Git Repo"
},
"Parameters": [
"LinkedRepoPath",
"LinkedRepoCloneUrl"
]
}
]
}
},
"Parameters": {
"EnvironmentName": {
"Type": "String",
"Default":"IAC sample IDE",
"Description":"Name of the Cloud9 environment"
},
"LinkedRepoPath": {
"Type": "String",
"Default":"",
"Description":"Instance's local path for the repo you wish to clone"
},
"LinkedRepoCloneUrl": {
"Type": "String",
"Default":"",
"Description":"Name of the repo you wish to include in the IDE"
},
"InstanceType": {
"Type": "String",
"Default":"t2.micro",
"AllowedValues": ["t2.micro","t2.medium"]
},
"HibernateMinutes" :{
"Type": "Number",
"Default":60,
"Description": "Minutes until instance hibernates after last use"
}
},
"Resources": {
"cloud9ide": {
"Type" : "AWS::Cloud9::EnvironmentEC2",
"Properties" : {
"AutomaticStopTimeMinutes" : {"Ref": "HibernateMinutes"},
"Description" : "Sample Cloud9 IDE from Service Catalog reference architecture",
"InstanceType" : {"Ref": "InstanceType"},
"Name" : {"Ref":"EnvironmentName"},
"Repositories" : [
{
"PathComponent" : "/aws-service-catalog-reference-architectures",
"RepositoryUrl" : "https://github.com/aws-samples/aws-service-catalog-reference-architectures.git"
},
{
"PathComponent" : {"Ref":"LinkedRepoPath"},
"RepositoryUrl" : {"Ref":"LinkedRepoCloneUrl"}
}
]
}
}
},
"Outputs": {
"Cloud9Url":{
"Value": { "Fn::Sub" : [ "http://${AWS::Region}.console.aws.amazon.com/cloud9/ide/${cloud9env}",
{ "cloud9env": { "Fn::Select" : [ 6, { "Fn::Split" : [ ":", {"Fn::GetAtt":["cloud9ide","Arn"] }]} ]} }
]}}
}
}