Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

google provider 1.19.x => "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider #100

Closed
petervandenabeele opened this issue Oct 16, 2018 · 11 comments

Comments

@petervandenabeele
Copy link

petervandenabeele commented Oct 16, 2018

Since using the google provider 1.19.0 (and 1.19.1), when I build a new cluster using this module, I get this notice 2 times. This did not happen with version 1.18.0. [This is an updated version of this report; in the first version, I incorrectly reported this was only introduced since 1.19.1]

Warning: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.

The full log is this (with version 1.18.0 not showing it and 1.19.0 and 1.19.1 showing it):

➜  terraform git:(master) ✗ vim providers.tf       
➜  terraform git:(master) ✗ grep -B2 '1.1' providers.tf
provider "google" {
  version = "1.18.0"
➜  terraform git:(master) ✗ terraform init             
Initializing modules...
- module.nat
- module.nat.nat-gateway

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "google" (1.18.0)...

Terraform has been successfully initialized!
...

➜  terraform git:(master) ✗ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.template_file.nat-startup-script: Refreshing state...
google_compute_network.network: Refreshing state... (ID: network-v2)
data.google_compute_address.default: Refreshing state...
data.google_compute_zones.available: Refreshing state...
google_compute_firewall.custom-allow-icmp: Refreshing state... (ID: network-v2-allow-icmp)
google_compute_firewall.custom-allow-internal: Refreshing state... (ID: network-v2-allow-internal)
google_compute_subnetwork.subnetwork: Refreshing state... (ID: europe-west1/subnetwork-v2-a)
google_compute_firewall.custom-allow-ssh: Refreshing state... (ID: network-v2-allow-ssh)
google_compute_firewall.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)
google_compute_firewall.default-ssh: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b-vm-ssh)
data.google_compute_network.network: Refreshing state...
google_container_cluster.gke-cluster-v2: Refreshing state... (ID: gke-cluster-v2-k8s-dev)
google_compute_instance_template.default: Refreshing state... (ID: default-20181015161705940300000001)
google_compute_instance_group_manager.default: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b)
null_resource.dummy_dependency: Refreshing state... (ID: 1258110961292679846)
data.google_compute_instance_group.zonal: Refreshing state...
google_compute_route.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.
...
➜  terraform git:(master) ✗ vim providers.tf           
➜  terraform git:(master) ✗ grep -B2 '1.1' providers.tf
provider "google" {
  version = "1.19.0"
➜  terraform git:(master) ✗ terraform init             
Initializing modules...
- module.nat
- module.nat.nat-gateway

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "google" (1.19.0)...

Terraform has been successfully initialized!
...

➜  terraform git:(master) ✗ terraform plan             

Warning: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.



Warning: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy": [DEPRECATED] This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.



Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.template_file.nat-startup-script: Refreshing state...
google_compute_network.network: Refreshing state... (ID: network-v2)
data.google_compute_zones.available: Refreshing state...
data.google_compute_address.default: Refreshing state...
google_compute_subnetwork.subnetwork: Refreshing state... (ID: europe-west1/subnetwork-v2-a)
google_compute_firewall.custom-allow-icmp: Refreshing state... (ID: network-v2-allow-icmp)
google_compute_firewall.custom-allow-ssh: Refreshing state... (ID: network-v2-allow-ssh)
google_compute_firewall.custom-allow-internal: Refreshing state... (ID: network-v2-allow-internal)
google_compute_firewall.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)
google_compute_firewall.default-ssh: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b-vm-ssh)
data.google_compute_network.network: Refreshing state...
google_container_cluster.gke-cluster-v2: Refreshing state... (ID: gke-cluster-v2-k8s-dev)
google_compute_instance_template.default: Refreshing state... (ID: default-20181015161705940300000001)
google_compute_instance_group_manager.default: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b)
null_resource.dummy_dependency: Refreshing state... (ID: 1258110961292679846)
data.google_compute_instance_group.zonal: Refreshing state...
google_compute_route.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.
...

➜  terraform git:(master) ✗ vim providers.tf           
➜  terraform git:(master) ✗ grep -B2 '1.1' providers.tf
provider "google" {
  version = "1.19.1"
➜  terraform git:(master) ✗ terraform init             
Initializing modules...
- module.nat
- module.nat.nat-gateway

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "google" (1.19.1)...

Terraform has been successfully initialized!
...

➜  terraform git:(master) ✗ terraform plan             

Warning: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.



Warning: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy": [DEPRECATED] This field is in beta and will be removed from this provider. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.



Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.template_file.nat-startup-script: Refreshing state...
google_compute_network.network: Refreshing state... (ID: network-v2)
data.google_compute_zones.available: Refreshing state...
data.google_compute_address.default: Refreshing state...
google_compute_firewall.custom-allow-internal: Refreshing state... (ID: network-v2-allow-internal)
google_compute_firewall.custom-allow-ssh: Refreshing state... (ID: network-v2-allow-ssh)
google_compute_firewall.custom-allow-icmp: Refreshing state... (ID: network-v2-allow-icmp)
google_compute_subnetwork.subnetwork: Refreshing state... (ID: europe-west1/subnetwork-v2-a)
google_compute_firewall.default-ssh: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b-vm-ssh)
google_compute_firewall.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)
data.google_compute_network.network: Refreshing state...
google_container_cluster.gke-cluster-v2: Refreshing state... (ID: gke-cluster-v2-k8s-dev)
google_compute_instance_template.default: Refreshing state... (ID: default-20181015161705940300000001)
google_compute_instance_group_manager.default: Refreshing state... (ID: v2-k8s-dev-nat-gateway-europe-west1-b)
null_resource.dummy_dependency: Refreshing state... (ID: 1258110961292679846)
data.google_compute_instance_group.zonal: Refreshing state...
google_compute_route.nat-gateway: Refreshing state... (ID: v2-k8s-dev-nat-europe-west1-b)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.
...
@petervandenabeele petervandenabeele changed the title google provider 1.19.1 => "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider google provider 1.19.x => "auto_healing_policies": [DEPRECATED] This field is in beta and will be removed from this provider Oct 16, 2018
@armandocerna
Copy link

We are also experiencing this issue, I have tried declaring the provider inline in the module block like:

  providers = {
    google = "google-beta"
  }

However doing that produced an entirely new set of errors in addition to the warnings I already get.


Error: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "version": required field is not set



Error: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: : invalid or unknown key: instance_template



Error: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: : invalid or unknown key: rolling_update_policy



Error: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: : invalid or unknown key: update_strategy

@sosimon
Copy link

sosimon commented Jan 9, 2019

I just ran into this, and because I wanted/needed it to work, I took a look at the provider code. Here is a quick summary:

  1. version block is required now - the structure of the block is still consistent with documentation, as far as I can tell.
  2. instance_template has been removed
  3. rolling_update_policy has been renamed to update_policy
  4. update_strategy has been removed

@sosimon
Copy link

sosimon commented Jan 9, 2019

Aaaand I just now realized you are talking about google_compute_instance_group_manager, and I was talking about google_compute_region_instance_group_manager, but I believe everything I said above applies to both.

@zdevi
Copy link

zdevi commented Jan 11, 2019

Can we please update the module with the latest changes please ? Is there a PR already for that ?

@AndrewFarley
Copy link
Contributor

Well, it is just a warning eh? :) But it does also annoy me, and make me worry (unnecessarily?) that suddenly at one point in the future this will stop working or working differently. I would also like to see this fixed +1 on wanting a PR or patch for this, but the question is how to fix it... I would propose either...

A: Not use the beta provider features and offer the same functionality, if this is possible.
or
B: Require the beta provider for this entire module, require it to be passed into the module via Terraform - Passing Providers Explicitly

A has the benefit of being backwards compatible with existing installs of the module. B would be a breaking change, and would require people using the module to suddenly pass in a beta provider to the module to keep using it. It would take a minute or so to fix this, but it would still be a breaking change. Maybe semver a major version bump to signify this.

Thoughts?

@joncotton
Copy link

That day is here. February 12, Terraform's GCP provider 2.0 was released.

Error: module.nat_zone1.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies": [REMOVED] This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.
Error: module.nat_zone1.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies.0.health_check": [REMOVED] This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.
Error: module.nat_zone1.module.nat-gateway.google_compute_instance_group_manager.default: "auto_healing_policies.0.initial_delay_sec": [REMOVED] This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details
Error: module.nat_zone1.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy": [REMOVED] This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details
Error: module.nat_zone1.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy.0.max_surge_fixed": [REMOVED] This field is in beta. Use it in the the google-beta provider instead. See https://terraform.io/docs/providers/google/provider_versions.html for more details.
Error: module.nat_zone1.module.nat-gateway.google_compute_instance_template.default: "network_interface.0.address": [REMOVED] Please use network_ip
...

@Nurbel
Copy link

Nurbel commented Feb 13, 2019

I faced this issue today.
terraform init does warn about constraining the version for the providers.
For now, I made it work by adding version= "~> 1.20" to my google provider declaration

@shosti
Copy link

shosti commented Feb 13, 2019

Any update on this issue? Seems like it shouldn't be a huge change to make it compatible with the 2.0 provider? (We need the 2.0 provider for some other features but this module is holding back the upgrade...)

@shinenelson
Copy link

This is not a problem with this module specifically, but a problem with a dependency of this module which is another module in the registry - managed instance group.

There are corresponding issues and pull requests open, fixing the issues, but there is no progress on those yet.

@aodj
Copy link

aodj commented Aug 21, 2019

I don't think the managed instance group module will be updated: see this comment:

This module will be deprecated, so we will not migrate it to v0.12.

Please replace usage with this module: https://github.com/terraform-google-modules/terraform-google-vm/tree/master/modules/mig

@morgante
Copy link
Contributor

This module is deprecated. We recommend customers use Cloud NAT (with this module) instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests