Skip to content

Commit

Permalink
feat!: add Terraform 0.13 constraint and module attribution (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-foundation-bot authored Mar 31, 2021
1 parent cf6da23 commit bf6a051
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 13 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
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.13
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
REGISTRY_URL := gcr.io/cloud-foundation-cicd

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
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'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
31 changes: 31 additions & 0 deletions modules/cloudiot/versions.tf
Original file line number Diff line number Diff line change
@@ -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"
}

}
2 changes: 1 addition & 1 deletion test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
16 changes: 14 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"
}

}

0 comments on commit bf6a051

Please sign in to comment.