Skip to content

Commit

Permalink
add condition to authorizer to not use in pr environments
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Feb 5, 2024
1 parent 648f1e6 commit 78d15ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ functions:

third_party_api_authorizer:
handler: src/handlers/third_party_API_authorizer.main
condition: IsDevValProd

otel:
handler: src/handlers/otel_proxy.main
events:
Expand Down Expand Up @@ -254,6 +256,11 @@ functions:
- arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-18-1:1

resources:
Conditions:
IsDevValProd: !Or
- !Equals ['${sls:stage}', 'main']
- !Equals ['${sls:stage}', 'val']
- !Equals ['${sls:stage}', 'prod']
Resources:
ApiGwWebAclAssociation:
Type: AWS::WAFv2::WebACLAssociation
Expand Down

0 comments on commit 78d15ad

Please sign in to comment.