From bf6a051fdc6346ca6966467e56643a3a7a358eb7 Mon Sep 17 00:00:00 2001 From: cloud-foundation-bot <60107303+cloud-foundation-bot@users.noreply.github.com> Date: Wed, 31 Mar 2021 11:02:32 -0500 Subject: [PATCH] feat!: add Terraform 0.13 constraint and module attribution (#64) --- Makefile | 2 +- README.md | 9 +++++---- build/int.cloudbuild.yaml | 2 +- build/lint.cloudbuild.yaml | 2 +- modules/cloudiot/versions.tf | 31 +++++++++++++++++++++++++++++++ test/setup/main.tf | 2 +- test/setup/versions.tf | 6 +++--- versions.tf | 16 ++++++++++++++-- 8 files changed, 57 insertions(+), 13 deletions(-) create mode 100644 modules/cloudiot/versions.tf diff --git a/Makefile b/Makefile index 975316f..6d34e48 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # Make will use bash instead of sh SHELL := /usr/bin/env bash -DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12 +DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13 DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools REGISTRY_URL := gcr.io/cloud-foundation-cicd diff --git a/README.md b/README.md index 533bc0b..8d8d64c 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ This module makes it easy to create Google Cloud Pub/Sub topic and subscriptions associated with the topic. ## 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 [0.2.0][v0.2.0]. +This module is meant for use with Terraform 0.13. If you haven't +[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform +0.12.x-compatible version of this module, the last released version +intended for Terraform 0.12.x is [v1.9.0](https://registry.terraform.io/modules/terraform-google-modules/-pubsub/google/v1.9.0). ## Usage @@ -83,7 +84,7 @@ module "pubsub" { ### Installation Dependencies -- [terraform](https://www.terraform.io/downloads.html) 0.12.x +- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0 - [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin >= v2.13 ### Configure a Service Account diff --git a/build/int.cloudbuild.yaml b/build/int.cloudbuild.yaml index 14c4ec3..b3bf477 100644 --- a/build/int.cloudbuild.yaml +++ b/build/int.cloudbuild.yaml @@ -38,4 +38,4 @@ tags: - 'integration' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13' diff --git a/build/lint.cloudbuild.yaml b/build/lint.cloudbuild.yaml index 8ccae06..8ef5f4c 100644 --- a/build/lint.cloudbuild.yaml +++ b/build/lint.cloudbuild.yaml @@ -21,4 +21,4 @@ tags: - 'lint' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13' diff --git a/modules/cloudiot/versions.tf b/modules/cloudiot/versions.tf new file mode 100644 index 0000000..ba261b5 --- /dev/null +++ b/modules/cloudiot/versions.tf @@ -0,0 +1,31 @@ +/** + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +terraform { + required_version = ">= 0.13" + required_providers { + + google = { + source = "hashicorp/google" + version = "~> 3.53" + } + } + + provider_meta "google" { + module_name = "blueprints/terraform/terraform-google-pubsub:cloudiot/v1.0.0" + } + +} diff --git a/test/setup/main.tf b/test/setup/main.tf index 9e6f9a4..58b1996 100644 --- a/test/setup/main.tf +++ b/test/setup/main.tf @@ -16,7 +16,7 @@ module "project-ci-int-pubsub" { source = "terraform-google-modules/project-factory/google" - version = "~> 8.0" + version = "~> 10.0" name = "ci-int-pubsub" random_project_id = true diff --git a/test/setup/versions.tf b/test/setup/versions.tf index 703aa13..d610774 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -15,13 +15,13 @@ */ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12" } provider "google" { - version = "~> 3.29.0" + version = "~> 3.53.0" } provider "google-beta" { - version = "~> 3.29.0" + version = "~> 3.53.0" } diff --git a/versions.tf b/versions.tf index 832ec1d..fa4709c 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ /** - * Copyright 2018 Google LLC + * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,5 +15,17 @@ */ terraform { - required_version = ">= 0.12" + required_version = ">= 0.13" + required_providers { + + google = { + source = "hashicorp/google" + version = "~> 3.53" + } + } + + provider_meta "google" { + module_name = "blueprints/terraform/terraform-google-pubsub/v1.0.0" + } + }