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

Error: network_interface.0.address: [REMOVED] Please use network_ip and This field is in beta. Use it in the the google-beta provider instead #112

Open
roma4u opened this issue Mar 3, 2019 · 5 comments

Comments

@roma4u
Copy link

roma4u commented Mar 3, 2019

Module Not Compatible with terraform-google-provider

# terraform apply

Error: module.nat.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.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.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.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.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.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy.0.max_unavailable_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.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy.0.min_ready_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.

Module Not Compatible with terraform-google-provider

Error: module.nat.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy.0.minimal_action": [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.module.nat-gateway.google_compute_instance_group_manager.default: "rolling_update_policy.0.type": [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.module.nat-gateway.google_compute_instance_template.default: "network_interface.0.address": [REMOVED] Please use network_ip

@nwbt
Copy link

nwbt commented Mar 3, 2019

attempted to work around this issue by setting the beta provider in the module but got the same error as above

provider "google" {
  region  = "us-east1"
  version = ">=2.1, ~> 2.1"
}

provider "google-beta" {
  region  = "us-east1"
  version = ">=2.1, ~> 2.1"
}

module "nat" {
  version    = "1.2.2"
  source     = "GoogleCloudPlatform/nat-gateway/google"
  region     = "${var.region}"
  network    = "${google_compute_network.network-name.name}"
  subnetwork = "${google_compute_subnetwork.subnet-name.name}"

  providers = {
    google-beta = "google-beta"
  }
}

@thiagonache
Copy link

Currently, this module only supports google provider 1.x.

Try adding
provider "google" {
region = "us-east1"
version = "~> 1.2"
}

provider "google-beta" {
region = "us-east1"
version = "~> 1.2"
}

module "nat" {
version = "1.2.2"
source = "GoogleCloudPlatform/nat-gateway/google"
region = "us-east1"
network = "default"
subnetwork = "default"

providers = {
google-beta = "google-beta"
}
}

@petervandenabeele
Copy link

petervandenabeele commented Jun 17, 2019

It looks like we are getting close to the point where google v1.20 and thus this module is not usable anymore ?

https://medium.com/@danielbryantuk/terraform-issue-failed-to-instantiate-provider-google-to-obtain-schema-incompatible-api-4f0a23623535

I got this sequence:

➜  terraform git:(master) terraform refresh

Error: Failed to instantiate provider "google" to obtain schema: Incompatible API version with plugin. Plugin version: 4, Client versions: [5]


➜  terraform git:(master) terraform init -upgrade

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...

Provider "google" v1.20.0 is not compatible with Terraform 0.12.1.

Provider version 2.5.0 is the earliest compatible version. Select it with
the following version constraint:

	version = "~> 2.5"

Terraform checked all of the plugin versions matching the given constraint:
    ~> 1.20

Consult the documentation for this provider for more information on
compatibility between provider and Terraform versions.


Error: incompatible provider version

➜  terraform git:(master) terraform --version
Terraform v0.12.1
+ provider.google v1.20.0

Your version of Terraform is out of date! The latest version
is 0.12.2. You can update by downloading from www.terraform.io/downloads.html

➜  terraform git:(master) terraform 0.12upgrade

This command will rewrite the configuration files in the given directory so
that they use the new syntax features from Terraform v0.12, and will identify
any constructs that may need to be adjusted for correct operation with
Terraform v0.12.

We recommend using this command in a clean version control work tree, so that
you can easily see the proposed changes as a diff against the latest commit.
If you have uncommited changes already present, we recommend aborting this
command and dealing with them before running this command again.

Would you like to upgrade the module in the current directory?
  Only 'yes' will be accepted to confirm.

  Enter a value: yes

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

Error: failed to load provider "google": Incompatible API version with plugin. Plugin version: 4, Client versions: [5]

@agoloAbbas
Copy link

agoloAbbas commented Jul 3, 2019

solved this issue by changing

provider google {
  region = "${var.region}"
}

to

provider google {
  region = "${var.region}"
  version = "~> 1.20"
}

thanks to : #100 (comment)

@aodj
Copy link

aodj commented Aug 21, 2019

I don't know what the current solution to this problem is. I'm running into it, but can't downgrade to use the 1.20 version of the provider. The dependency on managed instance group module isn't going to be updated and instead is going to be deprecated requiring this module to be updated (link)

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

6 participants