-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cbd702
commit 754c28f
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# when a command fails, bash exits instead of continuing with the rest of the script | ||
set -o errexit | ||
# make the script fail, when accessing an unset variable | ||
set -o nounset | ||
# pipeline command is treated as failed, even if one command in the pipeline fails | ||
set -o pipefail | ||
# enable debug mode, by running your script as TRACE=1 | ||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi | ||
|
||
source "$(dirname "$0")/common.sh" | ||
|
||
# we assume gcloud to be downloaded and initialized | ||
# gcloud init | ||
# gcloud auth application-default login | ||
|
||
if bucket_exists "$SEED_PROJECT"; then | ||
tf init -backend-config="bucket=$SEED_PROJECT" | ||
else | ||
echo "Missing bucket '$SEED_PROJECT'; cannot initialize backend" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC1091 | ||
# when a command fails, bash exits instead of continuing with the rest of the script | ||
set -o errexit | ||
# make the script fail, when accessing an unset variable | ||
set -o nounset | ||
# pipeline command is treated as failed, even if one command in the pipeline fails | ||
set -o pipefail | ||
# enable debug mode, by running your script as TRACE=1 | ||
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi | ||
|
||
source "$(dirname "$0")/common.sh" | ||
|
||
terraform plan \ | ||
-var "billing_account_id=$BILLING_ACCOUNT" \ | ||
-var "seed_sa_email=$SA_EMAIL" \ | ||
-var "github_admin_token=$GITHUB_ADMIN_TOKEN" \ | ||
-var "github_api_label_token=$GITHUB_API_LABEL_TOKEN" \ | ||
-var "project_postfix=$POSTFIX" \ | ||
-var "workload_identity_provider_name=$PROVIDER_ID" \ | ||
-var "workload_identity_pool_id=$WORKLOAD_IDENTITY_POOL" \ | ||
-var "codacy_api_token=$CODACY_API_TOKEN" \ | ||
-var "docker_registry_username=$DOCKER_REGISTRY_USERNAME" \ | ||
-var "docker_registry_token=$DOCKER_REGISTRY_TOKEN" |