Skip to content

Commit

Permalink
feat: add TF 0.13 constraint and module attribution (#513)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Minimum Terraform version increased to 0.13.
  • Loading branch information
bharathkkb authored Dec 11, 2020
1 parent 0eb2431 commit f6df34c
Show file tree
Hide file tree
Showing 33 changed files with 433 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12.1
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ To include G Suite integration for creating groups and adding Service Accounts i

## Compatibility

This module is meant for use with Terraform 0.12. If you haven't
[upgraded][terraform-0.12-upgrade] and need a Terraform
0.11.x-compatible version of this module, the last released version
intended for Terraform 0.11.x is [2.4.1].
This module is meant for use with Terraform 0.13. If you haven't

This comment has been minimized.

Copy link
@haf

haf Dec 15, 2020

What's status of v0.14 support?

[upgraded][terraform-0.13-upgrade] and need a Terraform
0.12.x-compatible version of this module, the last released version
intended for Terraform 0.12.x is [9.2.0].

## Upgrading

Expand Down Expand Up @@ -174,7 +174,7 @@ determining that location is as follows:

- [gcloud sdk](https://cloud.google.com/sdk/install) >= 269.0.0
- [jq](https://stedolan.github.io/jq/) >= 1.6
- [Terraform](https://www.terraform.io/downloads.html) >= 0.12.6
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0
- [terraform-provider-google] plugin >= 3.1, < 4.0
- [terraform-provider-google-beta] plugin >= 3.1, < 4.0
- [terraform-provider-gsuite] plugin 0.1.x if GSuite functionality is desired
Expand Down Expand Up @@ -343,7 +343,7 @@ The core Project Factory solely deals with GCP APIs and does not integrate G Sui
## Install
### Terraform

Be sure you have the correct Terraform version (0.12.6+), you can choose the
Be sure you have the correct Terraform version (0.13.0+), you can choose the
binary here:

- https://releases.hashicorp.com/terraform/
Expand All @@ -356,5 +356,5 @@ binary here:
[glossary]: /docs/GLOSSARY.md
[application-default-credentials]: https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application

[2.4.1]: https://registry.terraform.io/modules/terraform-google-modules/project-factory/google/2.4.1
[terraform-0.12-upgrade]: https://www.terraform.io/upgrade-guides/0-12.html
[9.2.0]: https://registry.terraform.io/modules/terraform-google-modules/project-factory/google/9.2.0
[terraform-0.13-upgrade]: https://www.terraform.io/upgrade-guides/0-13.html
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ tags:
- 'integration'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.0'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
options:
machineType: 'N1_HIGHCPU_8'
env:
Expand Down
2 changes: 1 addition & 1 deletion build/lint.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ tags:
- 'lint'
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.1'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
16 changes: 15 additions & 1 deletion examples/app_engine/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
16 changes: 15 additions & 1 deletion examples/budget_project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
10 changes: 9 additions & 1 deletion examples/fabric_project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
random = {
source = "hashicorp/random"
}
}
}
16 changes: 15 additions & 1 deletion examples/gke_shared_vpc/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
19 changes: 18 additions & 1 deletion examples/group_project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,22 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
gsuite = {
source = "DeviaVir/gsuite"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
19 changes: 18 additions & 1 deletion examples/project-hierarchy/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,22 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
gsuite = {
source = "DeviaVir/gsuite"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
10 changes: 9 additions & 1 deletion examples/project_services/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
}
}
16 changes: 15 additions & 1 deletion examples/shared_vpc/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
16 changes: 15 additions & 1 deletion examples/simple_project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
}
google-beta = {
source = "hashicorp/google-beta"
}
null = {
source = "hashicorp/null"
}
random = {
source = "hashicorp/random"
}
}
}
7 changes: 5 additions & 2 deletions modules/app_engine/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"

required_providers {
google = ">= 2.1, < 4.0"
google = {
source = "hashicorp/google"
version = ">= 3.43, < 4.0"
}
}
}
14 changes: 12 additions & 2 deletions modules/budget/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"

required_providers {
google-beta = ">= 3.1, < 4.0"
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.43, < 4.0"
}
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-project-factory:budget/v10.0.0"
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-project-factory:budget/v10.0.0"
}
}
22 changes: 17 additions & 5 deletions modules/core_project_factory/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,24 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"

required_providers {
google = ">= 3.50, < 4.0"
google-beta = ">= 3.50, < 4.0"
null = "~> 2.1"
random = "~> 2.2"
google = {
source = "hashicorp/google"
version = ">= 3.50, < 4.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 3.50, < 4.0"
}
null = {
source = "hashicorp/null"
version = "~> 2.1"
}
random = {
source = "hashicorp/random"
version = "~> 2.2"
}
}
}
2 changes: 1 addition & 1 deletion modules/fabric-project/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ output "number" {

output "cloudsvc_service_account" {
description = "Cloud services service account (depends on services)."
value = "${local.cloudsvc_service_account}"
value = local.cloudsvc_service_account
depends_on = [google_project_service.project_services]
}

Expand Down
13 changes: 11 additions & 2 deletions modules/fabric-project/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"

required_providers {
google = ">= 3.1, < 4.0"
google = {
source = "hashicorp/google"
version = ">= 3.43, < 4.0"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-project-factory:fabric-project/v10.0.0"
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-project-factory:fabric-project/v10.0.0"
}
}
13 changes: 11 additions & 2 deletions modules/gsuite_enabled/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"

required_providers {
gsuite = "~> 0.1"
gsuite = {
source = "DeviaVir/gsuite"
version = "~> 0.1"
}
}
provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-project-factory:gsuite_enabled/v10.0.0"
}
provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-project-factory:gsuite_enabled/v10.0.0"
}
}
8 changes: 7 additions & 1 deletion modules/gsuite_group/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@
*/

terraform {
required_version = ">=0.12.6"
required_version = ">= 0.13"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.43, <4.0"
}
}
}
Loading

0 comments on commit f6df34c

Please sign in to comment.