Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add Terraform 0.13 constraint and module attribution #48

Merged
merged 3 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Make will use bash instead of sh
SHELL := /usr/bin/env bash

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

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ Modular Internal Load Balancer for GCE using forwarding rules.
* **Internal load balancer**

## Compatibility

This module is meant for use with Terraform 0.12. If you haven't
[upgraded](https://www.terraform.io/upgrade-guides/0-12.html) and
need a Terraform 0.11.x-compatible version of this module, the
last released version intended for Terraform 0.11.x is
[1.0.4](https://registry.terraform.io/modules/GoogleCloudPlatform/lb-internal/google/1.0.4).
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 [v2.3.0](https://registry.terraform.io/modules/terraform-google-modules/-lb-internal/google/v2.3.0).

## Upgrading

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.6.0'
_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.6.0'
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.13'
4 changes: 2 additions & 2 deletions examples/minimal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

provider google {
version = "~> 3.14.0"
provider "google" {
version = "~> 3.62.0"
}

provider "random" {
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/

provider "google" {
version = "~> 3.14.0"
version = "~> 3.62.0"
}

module "gce-lb-fr" {
source = "GoogleCloudPlatform/lb/google"
version = "~> 2.0"
version = "~> 2.3"
region = var.region
network = var.network
project = var.project
Expand Down
12 changes: 6 additions & 6 deletions examples/simple/mig.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module "instance_template1" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork = var.subnetwork
subnetwork_project = var.subnetwork_project
Expand All @@ -27,7 +27,7 @@ module "instance_template1" {

module "instance_template2" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork = var.subnetwork
subnetwork_project = var.subnetwork_project
Expand All @@ -38,7 +38,7 @@ module "instance_template2" {

module "instance_template3" {
source = "terraform-google-modules/vm/google//modules/instance_template"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork = var.subnetwork
subnetwork_project = var.subnetwork_project
Expand All @@ -49,7 +49,7 @@ module "instance_template3" {

module "mig1" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork_project = var.subnetwork_project
region = var.region
Expand All @@ -61,7 +61,7 @@ module "mig1" {

module "mig2" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork_project = var.subnetwork_project
region = var.region
Expand All @@ -72,7 +72,7 @@ module "mig2" {

module "mig3" {
source = "terraform-google-modules/vm/google//modules/mig"
version = "~> 2.1.0"
version = "~> 6.2.0"
project_id = var.project
subnetwork_project = var.subnetwork_project
region = var.region
Expand Down
2 changes: 1 addition & 1 deletion test/integration/minimal/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: minimal
depends:
- name: inspec-gcp
git: https://github.com/inspec/inspec-gcp.git
tag: v0.19.0
tag: v1.8.8
attributes:
- name: project_id
required: true
Expand Down
5 changes: 2 additions & 3 deletions test/setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

module "project-ci-lb-internal" {
source = "terraform-google-modules/project-factory/google"
version = "~> 4.0"
version = "~> 10.2"

name = "ci-int-lb-internal"
random_project_id = "true"
random_project_id = true
org_id = var.org_id
folder_id = var.folder_id
billing_account = var.billing_account
Expand All @@ -31,4 +31,3 @@ module "project-ci-lb-internal" {
"compute.googleapis.com"
]
}

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"
required_version = ">= 0.13"
}

provider "google" {
version = "~> 3.14.0"
version = "~> 3.62"
}

provider "google-beta" {
version = "~> 2.13.0"
version = "~> 3.62"
}
16 changes: 14 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019 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-lb-internal/v1.0.0"
}

}