You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.
Description
Hello, the new google-provider 3.0 release include a change about "upgrade_strategy" moved to "update_policy". However, we are not able to use "NONE" anymore.
If I make a "plan" after removing the update_strategy = "NONE" with 3.0, terraform seems to try to add the minimual_action = replace based the on the terraform plan output :
# google_compute_instance_group_manager.k8s-node[2] will be updated in-place
~ resource "google_compute_instance_group_manager" "k8s-node" {
base_instance_name = "k8s-node"
fingerprint = "xxx"
id = "xxxx"
instance_group = "xxx"
instance_template = "xxx"
name = "xxxx"
project = "xxxx"
self_link = "xxxx"
target_pools = []
target_size = 0
~ update_strategy = "NONE" -> "REPLACE"
wait_for_instances = false
zone = "northamerica-northeast1-c"
named_port {
name = "ingress"
port = 32177
}
timeouts {}
update_policy {
max_surge_fixed = 1
max_surge_percent = 0
max_unavailable_fixed = 1
max_unavailable_percent = 0
min_ready_sec = 0
minimal_action = "REPLACE"
type = "OPPORTUNISTIC"
}
version {
instance_template = "xxx"
}
}```
### New or Affected Resource(s)
- google_compute_instance_group_manager
The text was updated successfully, but these errors were encountered:
@arsiesys there's a few different things in your request so I'll start with some background for the change: update_strategy isn't part of the API and was something that we had bolted on to the resource because that functionality wasn't available in the API yet. Since then the API has now added the ability to declaratively manage version updates 🎉 This change pushes the management of restarting/replacing the instances to instance group instead of Terraform managing the restart process. update_policy now replaces all the functionality that update_strategy did but across several different configurable options.
Previously the NONE tag just didn't make any extra calls to the compute instances whereas the REPLACE/RESTART iterated through all the instances manually calling recreateInstance on each. To replicate the same behavior as NONE you can set the update_policy to minimal_action = RESTART and type = OPPORTUNISTIC. I'll add more details to the upgrade guide to this effect.
Secondly the diff you are seeing is definitely a bit misleading. It is a side effect of the field being optional with a default that I didn't anticipate. I'll fix this before 3.0.0 officially ships so that it doesn't show up.
Finally thank you for this feedback, getting this fixed before the full 3.0.0 release is a big help for all other users.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Dec 19, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Community Note
Description
Hello, the new google-provider 3.0 release include a change about "upgrade_strategy" moved to "update_policy". However, we are not able to use "NONE" anymore.
Only REPLACE and RESTART are now allowed:
https://github.com/terraform-providers/terraform-provider-google/blob/8f21d20d5fe3d545bc171745b7dc17e43c827540/google/resource_compute_instance_group_manager.go#L198
If I make a "plan" after removing the update_strategy = "NONE" with 3.0, terraform seems to try to add the minimual_action = replace based the on the terraform plan output :
The text was updated successfully, but these errors were encountered: