Terraform-provider-google: document expected behavior of min_master_version with incomplete version string

Created on 28 Feb 2019  ·  9Comments  ·  Source: hashicorp/terraform-provider-google


Community Note

  • 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

Is it possible to update the min_master_version docs here on the expected behavior when specifying an incomplete version string.

For example, when I use min_master_version = "1.11",terraform plan` outputs,

Terraform will perform the following actions:

~ module.asia-east1-k33l.google_container_cluster.spotify_gke_cluster
      min_master_version: "1.10.12-gke.1" => "1.11"

Plan: 0 to add, 1 to change, 0 to destroy.

But when I run terraform apply, I see the GKE cluster has master version 1.11.7-gke.6. Ideally terraform plan would tell me which exact version it'll actually upgrade the masters to. But if that's not feasible or too hard, can the docs be updated with what the expected behavior should be?

Right now it seems to pick the highest version that satisfies the incomplete version string. Is this correct?

Terraform Version

0.11.10

Affected Resource(s)

  • google_container_cluster

References


Would help pre-empt questions like this

  • #2949
bug

Most helpful comment

Alright, come 2.2.0 using version_prefix on the version datasource will let you interpolate the full version string of the latest release for a given major/minor/patch version, so the GKE cluster resource will show exactly what version it's attempting to update to; in addition, Terraform will pick up on new versions and plan to upgrade if they are released.

Let me know if that satisfies both closed issues for you, or if I missed anything on either issue!

All 9 comments

Maybe just add a link to this GKE doc in TF docs?

What version of the provider are you using? I can't see how min_master_version is getting updated- once you apply a value, that should be persisted into state.

@rileykarson 0.11.10. It's getting updated because it's a fuzzy version.

Version of the Google provider! You should see it if you run terraform -v in the directory where your Terraform config files are.

@rileykarson sorry

Terraform v0.11.10

  • provider.google v2.1.0
  • provider.google-beta v2.1.0

Ah, I think I confounded myself- had you specified 1.10.12-gke.1 explicitly in a previous version? I was thinking that Terraform had managed to turn a fuzzy version into a full version and was seeing diffs from that. Regardless, I have an idea to show the exact version- sending that out to see what the other maintainers think.

Yes we had 1.10.12-gke.1 in TF config previously. Then we changed to 1.11 in config. Our GKE cluster was still 1.10.12-gke.1. This is the state in which the output in my issue came about.

Thanks for the quick turnaround and PR.

Alright, come 2.2.0 using version_prefix on the version datasource will let you interpolate the full version string of the latest release for a given major/minor/patch version, so the GKE cluster resource will show exactly what version it's attempting to update to; in addition, Terraform will pick up on new versions and plan to upgrade if they are released.

Let me know if that satisfies both closed issues for you, or if I missed anything on either issue!

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!

Was this page helpful?
0 / 5 - 0 ratings