-
Notifications
You must be signed in to change notification settings - Fork 6
/
template.yml
94 lines (79 loc) · 2.7 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
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
85
86
87
88
89
90
91
92
93
94
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
The infrastructure of the 100DaysOfCloud website.
##### ## ##### ## # # ####
# # # # # # # # ## ## #
# # # # # # # # # ## # ####
##### ###### ##### ###### # # #
# # # # # # # # # # #
# # # # # # # # # ####
Parameters:
AppName:
Description: The name of the project. It will be used to name and tag resources.
Type: String
Default: "hdoc"
# ClientDomains:
# Description: Array of domains allowed to use the Cognito User Pool.
# Type: CommaDelimitedList
Stage:
Description: The stage of the deployment, eg. prod, staging, dev
Type: String
Default: dev
AllowedValues:
- dev
- staging
- prod
### WARNING
# For every resource and output, CodeBuild's Role has to have permissions to it
##### ###### #### #### # # ##### #### ###### ####
# # # # # # # # # # # # # #
# # ##### #### # # # # # # # ##### ####
##### # # # # # # ##### # # #
# # # # # # # # # # # # # # # #
# # ###### #### #### #### # # #### ###### ####
Resources:
UsersTable:
Type: AWS::Serverless::SimpleTable
Properties:
PrimaryKey:
Name: github_username
Type: String
# # ###### #### ##### ###### #####
## # # # # # # #
# # # ##### #### # ##### # #
# # # # # # # # #
# ## # # # # # # #
# # ###### #### # ###### #####
#### ##### ## #### # # ####
# # # # # # # # #
#### # # # # #### ####
# # ###### # # # #
# # # # # # # # # # #
#### # # # #### # # ####
Frontend:
Type: AWS::Serverless::Application
Properties:
Location: ./sam/frontend.template.yml
Parameters:
AppName: !Ref AppName
Stage: !Ref Stage
APIs:
Type: AWS::Serverless::Application
Properties:
Location: ./sam/api.template.yml
Parameters:
UsersTable: !Ref UsersTable
AppName: !Ref AppName
### Only deploy later when creating the Cognito pool is needed
# Cognito:
# Type: AWS::Serverless::Application
# Properties:
# Location: './sam/cognito.template.yml'
# Parameters:
# ClientDomains: !Ref ClientDomains
Outputs:
APIURL:
Description: The root URL of the main APIs
Value: !GetAtt APIs.Outputs.APIEndpoint