Skip to content

Commit

Permalink
Fixed delete_rule in compute-mig module for stateful disks.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosmo committed Jan 3, 2023
1 parent 0380c10 commit 5f7a4d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/compute-mig/README.md
Expand Up @@ -321,7 +321,7 @@ module "nginx-mig" {
}
}
stateful_disks = {
repd-1 = null
repd-1 = false
}
}
# tftest modules=2 resources=3
Expand Down
4 changes: 2 additions & 2 deletions modules/compute-mig/main.tf
Expand Up @@ -71,7 +71,7 @@ resource "google_compute_instance_group_manager" "default" {
for_each = var.stateful_disks
content {
device_name = stateful_disk.key
delete_rule = stateful_disk.value
delete_rule = stateful_disk.value ? "ON_PERMANENT_INSTANCE_DELETION" : "NEVER"
}
}

Expand Down Expand Up @@ -161,7 +161,7 @@ resource "google_compute_region_instance_group_manager" "default" {
for_each = var.stateful_disks
content {
device_name = stateful_disk.key
delete_rule = stateful_disk.value
delete_rule = stateful_disk.value ? "ON_PERMANENT_INSTANCE_DELETION" : "NEVER"
}
}

Expand Down

0 comments on commit 5f7a4d3

Please sign in to comment.