-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
41 lines (34 loc) · 1 KB
/
template.yaml
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
Transform: AWS::Serverless-2016-10-31
Description: Root stack
Parameters:
Stage:
Type: String
Default: "dev"
AllowedValues:
- dev
- staging
- prod
Resources:
VpcStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: templates/vpc.yaml
# Application:
# Type: AWS::Serverless::Application
# Properties:
# Location: template.yaml
ApplicationStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: templates/application.yaml
Parameters:
Stage: !Ref Stage
VpcId: !GetAtt VpcStack.Outputs.CustomVPCId
SubnetId1: !GetAtt VpcStack.Outputs.PrivateSubnet1Id
SubnetId2: !GetAtt VpcStack.Outputs.PrivateSubnet2Id
RouteTableId: !GetAtt VpcStack.Outputs.PrivateRouteTableId
SecurityGroupId: !GetAtt VpcStack.Outputs.CustomSecurityGroupId
Outputs:
EndpointUrl:
Value: !GetAtt ApplicationStack.Outputs.Url