Skip to content

Commit 165fad5

Browse files
authored
Merge pull request #46 from openinfrastructure/jm/38_tf13
(#38) Update project and vpc modules to TF 13
2 parents d8f8675 + b443769 commit 165fad5

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
lines changed

docs/UPGRADE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Terraform 0.13 Upgrade
2+
===
3+
4+
1. Use Terraform 0.12 to init, plan, and apply version 3.x of this module.
5+
2. Use Terraform 0.13 to init, plan, and apply the same 3.x version.
6+
3. Update this module to version 4.x.
7+
4. Use Terraform 0.13 to init, plan, and apply 4.x.
8+
19
Upgrade Procedure
210
===
311

examples/multiregion/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module "multinic-us-west1-v3" {
6565
num_instances = var.num_instances
6666
preemptible = var.preemptible
6767
startup_script = var.startup_script
68+
autoscale = var.num_instances == 0 ? false : true
6869

6970
project_id = local.project_id
7071
region = "us-west1"
@@ -96,6 +97,7 @@ module "multinic-us-west2-v3" {
9697
num_instances = var.num_instances
9798
preemptible = var.preemptible
9899
startup_script = var.startup_script
100+
autoscale = var.num_instances == 0 ? false : true
99101

100102
project_id = local.project_id
101103
region = "us-west2"

examples/networksetup/versions.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
terraform {
2+
required_providers {
3+
google = {
4+
source = "hashicorp/google"
5+
}
6+
}
7+
required_version = ">= 0.13"
8+
}

modules/10_project/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
module "project" {
1616
source = "terraform-google-modules/project-factory/google"
17-
version = "~> 8.0"
17+
version = "~> 10.0"
1818

1919
name = var.project_name
2020
random_project_id = true

modules/20_vpc/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/** Manage the VPC network */
1919
module "vpc" {
2020
source = "terraform-google-modules/network/google//modules/vpc"
21-
version = "~> 2.0.0"
21+
version = "~> 3.0"
2222

2323
project_id = var.project_id
2424
network_name = var.network_name

modules/50_compute/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module "startup-script-lib" {
3030
}
3131

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

3636
resource google_compute_instance_template "multinic" {

0 commit comments

Comments
 (0)