Skip to content

Commit db8a90b

Browse files
committed
Add region to umig
1 parent 1480911 commit db8a90b

File tree

7 files changed

+12
-1
lines changed

7 files changed

+12
-1
lines changed

examples/umig/full/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@ module "umig" {
6161
num_instances = var.target_size
6262
instance_template = module.instance_template.self_link
6363
named_ports = var.named_ports
64+
region = var.region
6465
}

examples/umig/named_ports/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ module "umig" {
3535
hostname = "umig-named-ports"
3636
instance_template = module.instance_template.self_link
3737
named_ports = var.named_ports
38+
region = var.region
3839
}

examples/umig/simple/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ module "umig" {
3434
num_instances = var.num_instances
3535
hostname = "umig-simple"
3636
instance_template = module.instance_template.self_link
37+
region = var.region
3738
}

examples/umig/static_ips/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ module "umig" {
3535
hostname = "umig-static-ips"
3636
instance_template = module.instance_template.self_link
3737
static_ips = var.static_ips
38+
region = var.region
3839
}

modules/umig/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ See the [simple](examples/umig/simple) for a usage example.
2121
| network | Network to deploy to. Only one of network or subnetwork should be specified. | string | `""` | no |
2222
| num\_instances | Number of instances to create. This value is ignored if static_ips is provided. | string | `"1"` | no |
2323
| project\_id | The GCP project ID | string | `"null"` | no |
24+
| region | The GCP region where the unmanaged instance group resides. | string | n/a | yes |
2425
| static\_ips | List of static IPs for VM instances | list(string) | `<list>` | no |
2526
| subnetwork | Subnet to deploy to. Only one of network or subnetwork should be specified. | string | `""` | no |
2627
| subnetwork\_project | The project that subnetwork belongs to | string | `""` | no |

modules/umig/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ locals {
3535

3636
data "google_compute_zones" "available" {
3737
project = var.project_id
38-
status = "UP"
38+
region = var.region
39+
status = "UP"
3940
}
4041

4142
#############

modules/umig/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ variable "network" {
2525
default = ""
2626
}
2727

28+
variable "region" {
29+
description = "The GCP region where the unmanaged instance group resides."
30+
type = string
31+
}
32+
2833
variable "subnetwork" {
2934
description = "Subnet to deploy to. Only one of network or subnetwork should be specified."
3035
default = ""

0 commit comments

Comments
 (0)