Description of changes:
This pull request primarily focuses on improving the deployment scripts and cloud formation templates to support multiple branches in the application deployment process. The changes allow the use of different branch names instead of hardcoding the main branch. The most significant changes include the addition of a new parameter for branch name in deployment scripts and templates, and the modification of the Amplify branch name and tags to use the new parameter.
Changes to deployment scripts:
deployment/cognito.sh: Added a default value for BRANCH_NAME if it's not set and used it to construct amplifyDomain. Also, changed the details.json file reference to a variable. [1][2]
deployment/deploy.sh: Similar to cognito.sh, added a default value for BRANCH_NAME if it's not set and used it in several places including the git push command and cloud formation deploy command parameters. [1][2][3][4][5]
deployment/integration.sh: Added a default value for BRANCH_NAME if it's not set and used it to construct amplifyDomain. [1][2]
deployment/template.yml: Added a new parameter branchName with a default value of main and used it in multiple places including AmplifyBranch properties and TriggerBuildLambda tags. [1][2][3][4]
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: https://github.com/aws-samples/iam-identity-center-team/issues/247
Description of changes: This pull request primarily focuses on improving the deployment scripts and cloud formation templates to support multiple branches in the application deployment process. The changes allow the use of different branch names instead of hardcoding the main branch. The most significant changes include the addition of a new parameter for branch name in deployment scripts and templates, and the modification of the Amplify branch name and tags to use the new parameter.
Changes to deployment scripts:
deployment/cognito.sh
: Added a default value forBRANCH_NAME
if it's not set and used it to constructamplifyDomain
. Also, changed thedetails.json
file reference to a variable. [1] [2]deployment/deploy.sh
: Similar tocognito.sh
, added a default value forBRANCH_NAME
if it's not set and used it in several places including the git push command and cloud formation deploy command parameters. [1] [2] [3] [4] [5]deployment/integration.sh
: Added a default value forBRANCH_NAME
if it's not set and used it to constructamplifyDomain
. [1] [2]Changes to CloudFormation templates:
amplify/backend/custom/cloudtrailLake/cloudtrailLake-cloudformation-template.json
: Removed a condition from theCreateEventDataStore
function.amplify/backend/custom/s3bucketSecurity/s3bucketSecurity-cloudformation-template.json
: Added anEnvironment
section to include theBACKEND_ENV
variable and updated theZipFile
section to use theos
module to get theBACKEND_ENV
value.deployment/template.yml
: Added a new parameterbranchName
with a default value ofmain
and used it in multiple places includingAmplifyBranch
properties andTriggerBuildLambda
tags. [1] [2] [3] [4]By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.