Open roma4u opened 5 years ago
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"
}
}
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" } }
It looks like we are getting close to the point where google v1.20 and thus this module is not usable anymore ?
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]
solved this issue by changing
provider google {
region = "${var.region}"
}
to
provider google {
region = "${var.region}"
version = "~> 1.20"
}
thanks to : https://github.com/GoogleCloudPlatform/terraform-google-nat-gateway/issues/100#issuecomment-463420378
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)
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