Skip to content
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

issue #28 - RegionInstanceGroupManager is forced to be re-created - fix. #37

Merged
merged 6 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from 5 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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.1.1] - 2019-10-25

### Fixed

- Fix bug with `distribution_policy_zones` forcing permadiff. [#37]

## [1.1.0] - 2019-10-23

### Added

- Added variable `project_id`. [#26]
Expand Down Expand Up @@ -45,3 +53,4 @@ project adheres to [Semantic Versioning](http://semver.org/).
[#16]: https://github.com/terraform-google-modules/terraform-google-vm/pull/16
[#18]: https://github.com/terraform-google-modules/terraform-google-vm/pull/18
[#26]: https://github.com/terraform-google-modules/terraform-google-vm/pull/26
[#37]: https://github.com/terraform-google-modules/terraform-google-vm/pull/37
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The following APIs must be enabled on your project:

See also the [project_services](modules/project_services) module (optional).

## Notes

`distribution_policy_zones` cannot be changed during use. If you have changed them yourself or
used to have a default value, then you'll have to force recreate a MIG group yourself.

## Test Configuration

1. Create a `terraform.tfvars` file, using `terraform.tfvars.example` as an example
Expand Down
3 changes: 2 additions & 1 deletion modules/mig/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ resource "google_compute_region_instance_group_manager" "mig" {
health_check = length(local.healthchecks) > 0 ? local.healthchecks[0] : ""
initial_delay_sec = length(local.healthchecks) > 0 ? var.hc_initial_delay_sec : 0
}

distribution_policy_zones = local.distribution_policy_zones
dynamic "update_policy" {
for_each = var.update_policy
Expand All @@ -72,6 +73,7 @@ resource "google_compute_region_instance_group_manager" "mig" {

lifecycle {
create_before_destroy = "true"
ignore_changes = ["distribution_policy_zones"]
}
}

Expand Down Expand Up @@ -141,4 +143,3 @@ resource "google_compute_health_check" "tcp_healthcheck" {
port = var.hc_port
}
}

1 change: 1 addition & 0 deletions modules/mig_with_percent/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ resource "google_compute_region_instance_group_manager" "mig_with_percent" {

lifecycle {
create_before_destroy = "true"
ignore_changes = ["distribution_policy_zones"]
}
}

Expand Down