-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.sh.template
75 lines (52 loc) · 4.66 KB
/
env.sh.template
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
#!/usr/bin/env bash
## TODO: copy this file into env.sh with your settings
export AWS_SDK_LOAD_CONFIG=1 # allows the SDK to load from config. see https://github.com/aws/aws-sdk-js/pull/1391
## ====================================================================================================================
## 1. the CloudFormation stack name, e.g. "MyAppName"
## ====================================================================================================================
export STACK_NAME=ExternalIdPDemo
## ====================================================================================================================
## 2. explicitly define the account you intend to deploy into
## for the simplicity of running the demo, it takes the current profile's account and region
## in production make sure you explicitly define these via the CI/CD environment variables as a safety mechanism
## ====================================================================================================================
export STACK_ACCOUNT=$(aws sts get-caller-identity --query "Account" --output text)
export STACK_REGION=$(aws configure get region)
## ====================================================================================================================
## 3. change to any unused domain name, default to a combination that is be unique per account+region
## ====================================================================================================================
export COGNITO_DOMAIN_NAME=auth-${STACK_ACCOUNT}-${STACK_REGION}
## ====================================================================================================================
## 4. set the frontend app URL (used as the CORS origin and Cognito callback URLs)
## choose one of the following options and comment out the others:
## ====================================================================================================================
## --------------------------------------------------------------------------------------------------------------------
## a. local mode: use this for development (the UI is not deployed and served locally)
## --------------------------------------------------------------------------------------------------------------------
export APP_URL=http://localhost:3000
## --------------------------------------------------------------------------------------------------------------------
## b. s3 mode: for development / demo purposes only. the UI will be deployed directly to s3
## the APP_URL will be setup automatically based on the created bucket (will use a random name based on the stack name)
## --------------------------------------------------------------------------------------------------------------------
# export APP_FRONTEND_DEPLOY_MODE=s3
## --------------------------------------------------------------------------------------------------------------------
## c. cloudfront mode: the UI will be deployed to a private s3 bucket with a cloudfront distribution
## if not provided, the APP_URL will be determined automatically (the distribution URL)
## if you will be using a custom domain, explicitly set the APP_URL to the root of the app (e.g. https://example.com)
## --------------------------------------------------------------------------------------------------------------------
# export APP_FRONTEND_DEPLOY_MODE=cloudfront
## export APP_URL=<keep commented out to use the cloudfront distribution, or set a value if you setup a custom domain>
## ====================================================================================================================
## 5. optional - for IdP integration
## ====================================================================================================================
## the name you want for the Identity Provider
# export IDENTITY_PROVIDER_NAME=IdP
## the IdPs SAML metadata URL, or the actual XML string
# export IDENTITY_PROVIDER_METADATA=<https://example.com/metadata.xml or $(cat path/to/metadata.xml)>
## ====================================================================================================================
## 6. other optional configuration
## ====================================================================================================================
# export GROUPS_ATTRIBUTE_NAME=<the custom attribute that will contain the groups from SAML, default is "groups">
# export ADMINS_GROUP_NAME=<the LDAP group name for admins for the app, default is "pet-app-admins">
# export USERS_GROUP_NAME=<the LDAP group name for regular users for the app, default is "pet-app-users">
# export LAMBDA_MEMORY=<you can set your memory in 64MB increments from 128MB to 3008MB. default is "128">