-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
56 lines (49 loc) · 1.4 KB
/
template.yml
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Continuous Development Environment
Parameters:
BaseDomain:
Description: Base domain for the app
Type: String
CertificateArn:
Description: Certificate ARN
Type: String
Cloud9InstanceType:
Description: Cloud9 EC2 Instance Type
Type: String
Default: m5.large
RoleSSO:
Description: Federation Role Name
Type: String
User:
Description: Federated User email address
Type: String
Resources:
VpcStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: ./library/vpc.yml
Parameters:
Cidr: 10.0.0.0/16
Subnets: !Join
- ','
- - 10.0.1.0/24
- 10.0.2.0/24
LoadBalancerStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: ./library/load-balancer.yml
Parameters:
Vpc: !GetAtt VpcStack.Outputs.Vpc
Subnets: !GetAtt VpcStack.Outputs.Subnets
CertificateArn: !Ref CertificateArn
BaseDomain: !Ref BaseDomain
DevelopmentEnvironment:
Type: AWS::Cloud9::EnvironmentEC2
DependsOn: VpcStack
Properties:
AutomaticStopTimeMinutes: 30
InstanceType: !Ref Cloud9InstanceType
Name: !Ref AWS::StackName
SubnetId: !GetAtt VpcStack.Outputs.Subnet1
OwnerArn: !Sub 'arn:aws:sts::${AWS::AccountId}:assumed-role/${RoleSSO}/${User}'