Skip to content

(#38) Update project and vpc modules to TF 13 #46

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

Merged
merged 5 commits into from
Feb 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
8 changes: 8 additions & 0 deletions docs/UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Terraform 0.13 Upgrade
===

1. Use Terraform 0.12 to init, plan, and apply version 3.x of this module.
2. Use Terraform 0.13 to init, plan, and apply the same 3.x version.
3. Update this module to version 4.x.
4. Use Terraform 0.13 to init, plan, and apply 4.x.

Upgrade Procedure
===

Expand Down
2 changes: 2 additions & 0 deletions examples/multiregion/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module "multinic-us-west1-v3" {
num_instances = var.num_instances
preemptible = var.preemptible
startup_script = var.startup_script
autoscale = var.num_instances == 0 ? false : true

project_id = local.project_id
region = "us-west1"
Expand Down Expand Up @@ -96,6 +97,7 @@ module "multinic-us-west2-v3" {
num_instances = var.num_instances
preemptible = var.preemptible
startup_script = var.startup_script
autoscale = var.num_instances == 0 ? false : true

project_id = local.project_id
region = "us-west2"
Expand Down
8 changes: 8 additions & 0 deletions examples/networksetup/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
}
}
required_version = ">= 0.13"
}
2 changes: 1 addition & 1 deletion modules/10_project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

module "project" {
source = "terraform-google-modules/project-factory/google"
version = "~> 8.0"
version = "~> 10.0"

name = var.project_name
random_project_id = true
Expand Down
2 changes: 1 addition & 1 deletion modules/20_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/** Manage the VPC network */
module "vpc" {
source = "terraform-google-modules/network/google//modules/vpc"
version = "~> 2.0.0"
version = "~> 3.0"

project_id = var.project_id
network_name = var.network_name
Expand Down
2 changes: 1 addition & 1 deletion modules/50_compute/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "startup-script-lib" {
}

data "template_file" "startup-script-config" {
template = "${file("${path.module}/templates/startup-script-config.tpl")}"
template = file("${path.module}/templates/startup-script-config.tpl")
}

resource google_compute_instance_template "multinic" {
Expand Down