diff --git a/deployment/README.md b/deployment/README.md index e010cc85..f95cee5d 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -14,13 +14,5 @@ Deploying these examples requires installation of: ## Deploying -First authenticate via `gcloud` as a principle with sufficient ACLs for -the project: -```bash -gcloud auth application-default login -``` - -Terraforming the project can be done by: - 1. `cd` to the relevant `live` directory for the environment to deploy/change - 2. Run `terragrunt apply` +See individual `live` subdirectories. diff --git a/deployment/live/example-gcp/README.md b/deployment/live/example-gcp/README.md new file mode 100644 index 00000000..cb3394fc --- /dev/null +++ b/deployment/live/example-gcp/README.md @@ -0,0 +1,24 @@ +## Deployment + +First authenticate via `gcloud` as a principle with sufficient ACLs for +the project: +```bash +gcloud auth application-default login +``` + +Set your GCP project ID with: +```bash +export GOOGLE_PROJECT={VALUE} +``` + +Optionally, customize the GCP region (defaults to "us-central1"), +and bucket name prefix (defaults to "example-gcp"): +```bash +export GOOGLE_REGION={VALUE} +export TESSERA_BASE_NAME={VALUE} +``` + +Terraforming the project can be done by: + 1. `cd` to the relevant `live` directory for the environment to deploy/change + 2. Run `terragrunt apply` + diff --git a/deployment/live/example-gcp/terragrunt.hcl b/deployment/live/example-gcp/terragrunt.hcl index 46fcce6e..3ec9d58a 100644 --- a/deployment/live/example-gcp/terragrunt.hcl +++ b/deployment/live/example-gcp/terragrunt.hcl @@ -3,9 +3,9 @@ terraform { } locals { - project_id = "trillian-tessera" - location = "us-central1" - base_name = "example-gcp" + project_id = get_env("GOOGLE_PROJECT", "trillian-tessera") + location = get_env("GOOGLE_REGION", "us-central1") + base_name = get_env("TESSERA_BASE_NAME", "example-gcp") } inputs = merge(