Skip to content

Commit

Permalink
Remove 'zone' parameter (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybell authored Feb 6, 2024
1 parent 343661a commit d7d7585
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 40 deletions.
13 changes: 4 additions & 9 deletions terraform/cloud-functions/distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,12 @@ Autoscaler infrastructure, with the exception of Cloud Scheduler, lives.
gcloud config set project "${AUTOSCALER_PROJECT_ID}"
```

4. Choose the [region and zone][region-and-zone] and
4. Choose the [region][region-and-zone] and
[App Engine Location][app-engine-location] where the Autoscaler
infrastructure will be located.

```sh
export AUTOSCALER_REGION=us-central1
export AUTOSCALER_ZONE=us-central1-c
export AUTOSCALER_APP_ENGINE_LOCATION=us-central
```

Expand Down Expand Up @@ -182,13 +181,12 @@ Autoscaler infrastructure, with the exception of Cloud Scheduler, lives.

### Deploying the Autoscaler

1. Set the project ID, region, zone and App Engine location in the
1. Set the project ID, region, and App Engine location in the
corresponding Terraform environment variables

```sh
export TF_VAR_project_id="${AUTOSCALER_PROJECT_ID}"
export TF_VAR_region="${AUTOSCALER_REGION}"
export TF_VAR_zone="${AUTOSCALER_ZONE}"
export TF_VAR_location="${AUTOSCALER_APP_ENGINE_LOCATION}"
```

Expand Down Expand Up @@ -231,13 +229,12 @@ topic and function in the project where the Spanner instances live.
gcloud config set project "${APP_PROJECT_ID}"
```

4. Choose the [region and zone][region-and-zone] and
4. Choose the [region][region-and-zone] and
[App Engine Location][app-engine-location] where the Application project
will be located.

```sh
export APP_REGION=us-central1
export APP_ZONE=us-central1-c
export APP_APP_ENGINE_LOCATION=us-central
```

Expand Down Expand Up @@ -265,13 +262,12 @@ topic and function in the project where the Spanner instances live.

### Deploy the Application infrastructure

1. Set the project ID, region, zone and App Engine location in the
1. Set the project ID, region, and App Engine location in the
corresponding Terraform environment variables

```sh
export TF_VAR_project_id="${APP_PROJECT_ID}"
export TF_VAR_region="${APP_REGION}"
export TF_VAR_zone="${APP_ZONE}"
export TF_VAR_location="${APP_APP_ENGINE_LOCATION}"
```

Expand Down Expand Up @@ -377,7 +373,6 @@ topic and function in the project where the Spanner instances live.
export TF_VAR_project_id="${AUTOSCALER_PROJECT_ID}"
export TF_VAR_region="${AUTOSCALER_REGION}"
export TF_VAR_zone="${AUTOSCALER_ZONE}"
export TF_VAR_location="${AUTOSCALER_APP_ENGINE_LOCATION}"
```
Expand Down
1 change: 0 additions & 1 deletion terraform/cloud-functions/distributed/app-project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ terraform {
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}

data "terraform_remote_state" "autoscaler" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ variable "region" {
type = string
}

variable "zone" {
type = string
}

variable "spanner_name" {
type = string
default = "autoscale-test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ terraform {
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}

resource "google_service_account" "poller_sa" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ variable "region" {
type = string
}

variable "zone" {
type = string
}

variable "forwarder_sa_emails" {
type = list(string)
// Example ["serviceAccount:[email protected]"]
Expand Down
6 changes: 2 additions & 4 deletions terraform/cloud-functions/per-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ In this section you prepare your project for deployment.
gcloud config set project "${PROJECT_ID}"
```

4. Choose the [region and zone][region-and-zone] and
4. Choose the [region][region-and-zone] and
[App Engine Location][app-engine-location] where the Autoscaler
infrastructure will be located.

```sh
export REGION=us-central1
export ZONE=us-central1-c
export APP_ENGINE_LOCATION=us-central
```

Expand Down Expand Up @@ -177,13 +176,12 @@ In this section you prepare your project for deployment.

## Deploying the Autoscaler

1. Set the project ID, region and zone in the corresponding Terraform
1. Set the project ID and region in the corresponding Terraform
environment variables

```sh
export TF_VAR_project_id="${PROJECT_ID}"
export TF_VAR_region="${REGION}"
export TF_VAR_zone="${ZONE}"
```

2. If you want to create a new Spanner instance for testing the Autoscaler, set
Expand Down
1 change: 0 additions & 1 deletion terraform/cloud-functions/per-project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ terraform {
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}

resource "google_service_account" "poller_sa" {
Expand Down
4 changes: 0 additions & 4 deletions terraform/cloud-functions/per-project/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ variable "region" {
type = string
}

variable "zone" {
type = string
}

variable "spanner_name" {
type = string
default = "autoscale-test"
Expand Down
2 changes: 0 additions & 2 deletions terraform/gke/decoupled/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ terraform {
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}

provider "google-beta" {
project = var.project_id
region = var.region
zone = var.zone
}

resource "google_service_account" "poller_sa" {
Expand Down
4 changes: 0 additions & 4 deletions terraform/gke/decoupled/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ variable "region" {
type = string
}

variable "zone" {
type = string
}

variable "spanner_name" {
type = string
default = "autoscale-test"
Expand Down
2 changes: 0 additions & 2 deletions terraform/gke/unified/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ terraform {
provider "google" {
project = var.project_id
region = var.region
zone = var.zone
}

provider "google-beta" {
project = var.project_id
region = var.region
zone = var.zone
}

resource "google_service_account" "autoscaler_sa" {
Expand Down
4 changes: 0 additions & 4 deletions terraform/gke/unified/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ variable "region" {
type = string
}

variable "zone" {
type = string
}

variable "spanner_name" {
type = string
default = "autoscale-test"
Expand Down

0 comments on commit d7d7585

Please sign in to comment.