Skip to content

Commit d1d876b

Browse files
Merge pull request #4859 from linuxfoundation/unicron-fix-serverless-env-vars-fallback-prod
Unicron fix serverless env vars fallback prod
2 parents 64ffbfb + e19df47 commit d1d876b

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

cla-backend-go/serverless.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ provider:
223223
AUTH0_DOMAIN: ${file(./env.json):auth0-domain, ssm:/cla-auth0-domain-${opt:stage}}
224224
AUTH0_CLIENT_ID: ${file(./env.json):auth0-clientId, ssm:/cla-auth0-clientId-${opt:stage}}
225225
AUTH0_USERNAME_CLAIM: ${file(./env.json):auth0-username-claim, ssm:/cla-auth0-username-claim-${opt:stage}}
226-
AUTH0_USERNAME_CLAIM_CLI: ${file(./env.json):auth0-username-cli-claim, ssm:/cla-auth0-username-claim-cli-${opt:stage}}
227-
AUTH0_EMAIL_CLAIM_CLI: ${file(./env.json):auth0-email-cli-claim, ssm:/cla-auth0-email-claim-cli-${opt:stage}}
228-
AUTH0_NAME_CLAIM_CLI: ${file(./env.json):auth0-name-cli-claim, ssm:/cla-auth0-name-claim-cli-${opt:stage}}
226+
AUTH0_USERNAME_CLAIM_CLI: ${file(./env.json):auth0-username-cli-claim, ssm:/cla-auth0-username-claim-cli-${opt:stage}, env:AUTH0_USERNAME_CLAIM_CLI, ''}
227+
AUTH0_EMAIL_CLAIM_CLI: ${file(./env.json):auth0-email-cli-claim, ssm:/cla-auth0-email-claim-cli-${opt:stage}, env:AUTH0_EMAIL_CLAIM_CLI, ''}
228+
AUTH0_NAME_CLAIM_CLI: ${file(./env.json):auth0-name-cli-claim, ssm:/cla-auth0-name-claim-cli-${opt:stage}, env:AUTH0_NAME_CLAIM_CLI, ''}
229229
AUTH0_ALGORITHM: ${file(./env.json):auth0-algorithm, ssm:/cla-auth0-algorithm-${opt:stage}}
230230
SF_INSTANCE_URL: ${file(./env.json):sf-instance-url, ssm:/cla-sf-instance-url-${opt:stage}}
231231
SF_CLIENT_ID: ${file(./env.json):sf-client-id, ssm:/cla-sf-consumer-key-${opt:stage}}

cla-backend/serverless.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,9 @@ provider:
312312
AUTH0_DOMAIN: ${file(./env.json):auth0-domain, ssm:/cla-auth0-domain-${sls:stage}}
313313
AUTH0_CLIENT_ID: ${file(./env.json):auth0-clientId, ssm:/cla-auth0-clientId-${sls:stage}}
314314
AUTH0_USERNAME_CLAIM: ${file(./env.json):auth0-username-claim, ssm:/cla-auth0-username-claim-${sls:stage}}
315-
AUTH0_USERNAME_CLAIM_CLI: ${file(./env.json):auth0-username-cli-claim, ssm:/cla-auth0-username-claim-cli-${sls:stage}}
316-
AUTH0_EMAIL_CLAIM_CLI: ${file(./env.json):auth0-email-cli-claim, ssm:/cla-auth0-email-claim-cli-${sls:stage}}
317-
AUTH0_NAME_CLAIM_CLI: ${file(./env.json):auth0-name-cli-claim, ssm:/cla-auth0-name-claim-cli-${sls:stage}}
315+
AUTH0_USERNAME_CLAIM_CLI: ${file(./env.json):auth0-username-cli-claim, ssm:/cla-auth0-username-claim-cli-${sls:stage}, env:AUTH0_USERNAME_CLAIM_CLI, ''}
316+
AUTH0_EMAIL_CLAIM_CLI: ${file(./env.json):auth0-email-cli-claim, ssm:/cla-auth0-email-claim-cli-${sls:stage}, env:AUTH0_EMAIL_CLAIM_CLI, ''}
317+
AUTH0_NAME_CLAIM_CLI: ${file(./env.json):auth0-name-cli-claim, ssm:/cla-auth0-name-claim-cli-${sls:stage}, env:AUTH0_NAME_CLAIM_CLI, ''}
318318
AUTH0_ALGORITHM: ${file(./env.json):auth0-algorithm, ssm:/cla-auth0-algorithm-${sls:stage}}
319319
SF_INSTANCE_URL: ${file(./env.json):sf-instance-url, ssm:/cla-sf-instance-url-${sls:stage}}
320320
SF_CLIENT_ID: ${file(./env.json):sf-client-id, ssm:/cla-sf-consumer-key-${sls:stage}}

utils/set_prod_claims.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# This is needed for V3 CLA Auth0 setup
3+
aws --profile lfproduct-prod --region us-east-1 ssm put-parameter --name "/cla-auth0-username-claim-cli-prod" --value "http://lfx.prod/claims/username" --type "String" --overwrite
4+
aws --profile lfproduct-prod --region us-east-1 ssm put-parameter --name "/cla-auth0-email-claim-cli-prod" --value "http://lfx.prod/claims/email" --type "String" --overwrite
5+
aws --profile lfproduct-prod --region us-east-1 ssm put-parameter --name "/cla-auth0-name-claim-cli-prod" --value "http://lfx.prod/claims/username" --type "String" --overwrite
6+
aws --profile lfproduct-prod --region us-east-2 ssm put-parameter --name "/cla-auth0-username-claim-cli-prod" --value "http://lfx.prod/claims/username" --type "String" --overwrite
7+
aws --profile lfproduct-prod --region us-east-2 ssm put-parameter --name "/cla-auth0-email-claim-cli-prod" --value "http://lfx.prod/claims/email" --type "String" --overwrite
8+
aws --profile lfproduct-prod --region us-east-2 ssm put-parameter --name "/cla-auth0-name-claim-cli-prod" --value "http://lfx.prod/claims/username" --type "String" --overwrite
9+
./utils/get_prod_claims.sh

0 commit comments

Comments
 (0)