Skip to content

Commit

Permalink
Merge pull request #46 from openinfrastructure/jm/38_tf13
Browse files Browse the repository at this point in the history
(#38) Update project and vpc modules to TF 13
  • Loading branch information
jeffmccune authored Feb 1, 2021
2 parents d8f8675 + b443769 commit 165fad5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
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

0 comments on commit 165fad5

Please sign in to comment.