Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: terraform-google-modules/terraform-example-foundation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.0
Choose a base ref
...
head repository: terraform-google-modules/terraform-example-foundation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.1
Choose a head ref
  • 6 commits
  • 25 files changed
  • 4 contributors

Commits on Oct 11, 2021

  1. Verified

    This commit was signed with the committer’s verified signature.
    IvanGoncharov Ivan Goncharov
    Copy the full SHA
    b67e62a View commit details

Commits on Oct 14, 2021

  1. chore: docs changing "master" to "main" (#538)

    * chore: changing "master" to "main" for non-Jenkins portion of
    instructions. Issue 486
    
    * chore: removed trailing whitespace
    
    * chore: reverting change so it can be fixed with code change
    mark1000 authored Oct 14, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    08b6d28 View commit details
  2. Copy the full SHA
    e193a6d View commit details

Commits on Oct 15, 2021

  1. chore: issue 487. clarify "named" branches vs. others (#553)

    * chore: issue 487. Adding info on named branches.
    
    * chore: issue 487. Testing comment.
    
    * chore: issue 487. Updating rest of readmes.
    
    * chore: per morgante's comment
    
    * chore: changing to "named environment branch" everywhere
    mark1000 authored Oct 15, 2021
    Copy the full SHA
    da6f860 View commit details
  2. Copy the full SHA
    993331f View commit details

Commits on Nov 9, 2021

  1. chore: release 2.3.1 (#568)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Nov 9, 2021
    Copy the full SHA
    2f3e229 View commit details
2 changes: 1 addition & 1 deletion 0-bootstrap/versions.tf
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:bootstrap/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:bootstrap/v2.3.1"
}

}
12 changes: 9 additions & 3 deletions 1-org/README.md
Original file line number Diff line number Diff line change
@@ -131,7 +131,10 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
1. Clone the repo.
```
gcloud source repos clone gcp-org --project=YOUR_CLOUD_BUILD_PROJECT_ID
```
The message `warning: You appear to have cloned an empty repository.` is
normal and can be ignored.
1. Navigate into the repo and change to a non-production branch. All subsequent
steps assume you are running them from the gcp-environments directory. If
you run them from another directory, adjust your copy paths accordingly.
@@ -166,12 +169,15 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
git add .
git commit -m 'Your message'
```
1. Push your plan branch to trigger a plan. For this command, the branch `plan` is not a special one. Any branch which name is different from `development`, `non-production` or `production` will trigger a Terraform plan.
1. Push your plan branch to trigger a plan for all environments. Because the
_plan_ branch is not a [named environment branch](./docs/FAQ.md), pushing your _plan_
branch triggers _terraform plan_ but not _terraform apply_.
```
git push --set-upstream origin plan
```
1. Review the plan output in your Cloud Build project. https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. Merge changes to production branch.
1. Merge changes to production branch. Because the _production_ branch is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b production
git push origin production
@@ -236,7 +242,7 @@ to run the command as the Terraform service account.
git add .
git commit -m 'Your message'
```
1. Push your plan branch. The branch `plan` is not a special one. Any branch which name is different from `development`, `non-production` or `production` will trigger a Terraform plan.
1. Push your plan branch.
- Assuming you configured an automatic trigger in your Jenkins Master (see [Jenkins sub-module README](../0-bootstrap/modules/jenkins-agent)), this will trigger a plan. You can also trigger a Jenkins job manually. Given the many options to do this in Jenkins, it is out of the scope of this document see [Jenkins website](http://www.jenkins.io) for more details.
```
git push --set-upstream origin plan
23 changes: 0 additions & 23 deletions 1-org/backend.tf.example

This file was deleted.

4 changes: 2 additions & 2 deletions 1-org/envs/shared/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.1"
}
}
15 changes: 10 additions & 5 deletions 2-environments/README.md
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ commands. The `-T` flag is needed for Linux, but causes problems for MacOS.
```
gcloud source repos clone gcp-environments --project=YOUR_CLOUD_BUILD_PROJECT_ID
```
1. Navigate into the repo and change to the non-master branch. All subsequent
1. Navigate into the repo and change to the non-main branch. All subsequent
steps assume you are running them from the gcp-environments directory. If
you run them from another directory, adjust your copy paths accordingly.

@@ -103,24 +103,29 @@ commands. The `-T` flag is needed for Linux, but causes problems for MacOS.
git add .
git commit -m 'Your message'
```
1. Push your plan branch to trigger a plan for all environments.
1. Push your plan branch to trigger a plan for all environments. Because the
_plan_ branch is not a [named environment branch](./docs/FAQ.md), pushing your _plan_
branch triggers _terraform plan_ but not _terraform apply_.
```
git push --set-upstream origin plan
```
1. Review the plan output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. Merge changes to development.
1. Merge changes to development branch. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b development
git push origin development
```
1. Review the apply output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. Merge changes to non-production.
1. Merge changes to non-production. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b non-production
git push origin non-production
```
1. Review the apply output in your cloud build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. Merge changes to production branch.
1. Merge changes to production branch. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b production
git push origin production
4 changes: 2 additions & 2 deletions 2-environments/modules/env_baseline/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:org/v2.3.1"
}
}
15 changes: 10 additions & 5 deletions 3-networks/README.md
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ If you are not able to use Dedicated or Partner Interconnect, you can also use a
```
gcloud source repos clone gcp-networks --project=YOUR_CLOUD_BUILD_PROJECT_ID
```
1. Change to the freshly cloned repo and change to non-master branch.
1. Change to the freshly cloned repo and change to non-main branch.
```
git checkout -b plan
```
@@ -155,26 +155,31 @@ If you are not able to use Dedicated or Partner Interconnect, you can also use a
1. Run `terraform plan` and review output.
1. Run `terraform apply`.
1. If you would like the bucket to be replaced by Cloud Build at run time, change the bucket name back to `UPDATE_ME`.
1. Push your plan branch to trigger a plan.
1. Push your plan branch to trigger a plan for all environments. Because the
_plan_ branch is not a [named environment branch](./docs/FAQ.md), pushing your _plan_
branch triggers _terraform plan_ but not _terraform apply_.
```
git push --set-upstream origin plan
```
1. Review the plan output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. Merge changes to production.
1. Merge changes to production. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b production
git push origin production
```
1. Review the apply output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. After production has been applied, apply development.
1. Merge changes to development.
1. Merge changes to development. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b development
git push origin development
```
1. Review the apply output in your Cloud Build project https://console.cloud.google.com/cloud-build/builds?project=YOUR_CLOUD_BUILD_PROJECT_ID
1. After development has been applied, apply non-production.
1. Merge changes to non-production.
1. Merge changes to non-production. Because this is a [named environment branch](./docs/FAQ.md#what-is-a-named-branch),
pushing to this branch triggers both _terraform plan_ and _terraform apply_.
```
git checkout -b non-production
git push origin non-production
8 changes: 4 additions & 4 deletions 3-networks/envs/shared/dns-hub.tf
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ module "dns-forwarding-zone" {

module "dns_hub_region1_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "cr-c-dns-hub-${var.default_region1}-cr1"
project = local.dns_hub_project_id
network = module.dns_hub_vpc.network_name
@@ -136,7 +136,7 @@ module "dns_hub_region1_router1" {

module "dns_hub_region1_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "cr-c-dns-hub-${var.default_region1}-cr2"
project = local.dns_hub_project_id
network = module.dns_hub_vpc.network_name
@@ -149,7 +149,7 @@ module "dns_hub_region1_router2" {

module "dns_hub_region2_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "cr-c-dns-hub-${var.default_region2}-cr3"
project = local.dns_hub_project_id
network = module.dns_hub_vpc.network_name
@@ -162,7 +162,7 @@ module "dns_hub_region2_router1" {

module "dns_hub_region2_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
name = "cr-c-dns-hub-${var.default_region2}-cr4"
project = local.dns_hub_project_id
network = module.dns_hub_vpc.network_name
8 changes: 4 additions & 4 deletions 3-networks/modules/base_shared_vpc/main.tf
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ resource "google_service_networking_connection" "private_vpc_connection" {

module "region1_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region1}-cr1"
project = var.project_id
@@ -146,7 +146,7 @@ module "region1_router1" {

module "region1_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region1}-cr2"
project = var.project_id
@@ -161,7 +161,7 @@ module "region1_router2" {

module "region2_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region2}-cr3"
project = var.project_id
@@ -176,7 +176,7 @@ module "region2_router1" {

module "region2_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region2}-cr4"
project = var.project_id
4 changes: 2 additions & 2 deletions 3-networks/modules/base_shared_vpc/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:base_shared_vpc/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:base_shared_vpc/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:base_shared_vpc/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:base_shared_vpc/v2.3.1"
}
}
8 changes: 4 additions & 4 deletions 3-networks/modules/dedicated_interconnect/main.tf
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ data "google_projects" "interconnect_project" {

module "interconnect_attachment1_region1" {
source = "terraform-google-modules/cloud-router/google//modules/interconnect_attachment"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "vl-${var.region1_interconnect1_location}-${var.vpc_name}-${var.region1}-${local.suffix1}"
project = local.interconnect_project_id
@@ -57,7 +57,7 @@ module "interconnect_attachment1_region1" {

module "interconnect_attachment2_region1" {
source = "terraform-google-modules/cloud-router/google//modules/interconnect_attachment"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "vl-${var.region1_interconnect2_location}-${var.vpc_name}-${var.region1}-${local.suffix2}"
project = local.interconnect_project_id
@@ -80,7 +80,7 @@ module "interconnect_attachment2_region1" {

module "interconnect_attachment1_region2" {
source = "terraform-google-modules/cloud-router/google//modules/interconnect_attachment"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "vl-${var.region2_interconnect1_location}-${var.vpc_name}-${var.region2}-${local.suffix3}"
project = local.interconnect_project_id
@@ -103,7 +103,7 @@ module "interconnect_attachment1_region2" {

module "interconnect_attachment2_region2" {
source = "terraform-google-modules/cloud-router/google//modules/interconnect_attachment"
version = "~> 0.3.0"
version = "~> 0.4.0"

name = "vl-${var.region2_interconnect2_location}-${var.vpc_name}-${var.region2}-${local.suffix4}"
project = local.interconnect_project_id
4 changes: 2 additions & 2 deletions 3-networks/modules/dedicated_interconnect/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:dedicated_interconnect/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:dedicated_interconnect/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:dedicated_interconnect/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:dedicated_interconnect/v2.3.1"
}
}
4 changes: 2 additions & 2 deletions 3-networks/modules/hierarchical_firewall_policy/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:hierarchical_firewall_policy/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:hierarchical_firewall_policy/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:hierarchical_firewall_policy/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:hierarchical_firewall_policy/v2.3.1"
}
}
4 changes: 2 additions & 2 deletions 3-networks/modules/partner_interconnect/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:partner_interconnect/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:partner_interconnect/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:partner_interconnect/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:partner_interconnect/v2.3.1"
}
}
8 changes: 4 additions & 4 deletions 3-networks/modules/restricted_shared_vpc/main.tf
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ resource "google_service_networking_connection" "private_vpc_connection" {

module "region1_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region1}-cr5"
project = var.project_id
@@ -147,7 +147,7 @@ module "region1_router1" {

module "region1_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region1}-cr6"
project = var.project_id
@@ -162,7 +162,7 @@ module "region1_router2" {

module "region2_router1" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region2}-cr7"
project = var.project_id
@@ -177,7 +177,7 @@ module "region2_router1" {

module "region2_router2" {
source = "terraform-google-modules/cloud-router/google"
version = "~> 0.3.0"
version = "~> 0.4.0"
count = var.mode != "spoke" ? 1 : 0
name = "cr-${local.vpc_name}-${var.default_region2}-cr8"
project = var.project_id
4 changes: 2 additions & 2 deletions 3-networks/modules/restricted_shared_vpc/versions.tf
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-example-foundation:restricted_shared_vpc/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:restricted_shared_vpc/v2.3.1"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-example-foundation:restricted_shared_vpc/v2.3.0"
module_name = "blueprints/terraform/terraform-example-foundation:restricted_shared_vpc/v2.3.1"
}
}
Loading