-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yml
29 lines (27 loc) · 851 Bytes
/
api.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
#For custom domain on API
Resources:
Domain:
Type: AWS::ApiGateway::DomainName
Condition: ProdStagingEnv
Properties:
DomainName: ${self:custom.system.apiDomain.${opt:stage, 'dev'}}
EndpointConfiguration:
Types:
- EDGE
CertificateArn: 'arn:aws:acm:REGION:ACCOUNT:certificate/CERTIFICATE'
ApiGatewayDeployment:
Type: "AWS::ApiGateway::Deployment"
Condition: ProdStagingEnv
DependsOn: Domain
Properties:
Description: "Environment"
RestApiId: { Ref: ApiGatewayRestApi }
StageName: "dev"
BasePathMapping:
Type: AWS::ApiGateway::BasePathMapping
Condition: ProdStagingEnv
DependsOn: ApiGatewayDeployment
Properties:
DomainName: ${self:custom.system.apiDomain.${opt:stage, 'dev'}}
RestApiId: { Ref: ApiGatewayRestApi }
Stage: "dev"