You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate dept-seed-project does not have a GCP existing project conflict - either add random suffix or add increment on gcloud projects create command
#43
Open
fmichaelobrien opened this issue
Jul 25, 2022
· 1 comment
Handle both reentrant behaviour - where the user reran the bootstrap sh script - and the fact that the project may already exist in the GCP project namespace
fix would be to add a random suffix - like we do for the guardrails project - but this would complicate reentrant behaviour - better to just move terraform init/apply into the sh script
PROJ_EXISTS=$(gcloud projects list --filter ${seed_project_id})
if [ -z "$PROJ_EXISTS" ]
then
gcloud projects create "${seed_project_id}" --organization=${org_id} --quiet
# handle project id already exists collision
else
echo "${seed_project_id} project already exists and will be reused to provision resources"
fi
The text was updated successfully, but these errors were encountered:
Handle both reentrant behaviour - where the user reran the bootstrap sh script - and the fact that the project may already exist in the GCP project namespace
fix would be to add a random suffix - like we do for the guardrails project - but this would complicate reentrant behaviour - better to just move terraform init/apply into the sh script
https://github.com/canada-ca/accelerators_accelerateurs-gcp/blob/main/deployment-templates/Terraform/guardrails/0-bootstrap/bootstrap.sh#L101
The text was updated successfully, but these errors were encountered: