I'm deploying infrastructure in GCP via terraform using cloud build.
Everything was working fine but suddenly today it is showing issue with google-beta.
Terraform v0.13.0-beta3
+ provider registry.terraform.io/hashicorp/google v3.31.0
+ provider registry.terraform.io/hashicorp/local v1.4.0
+ provider registry.terraform.io/hashicorp/null v2.1.2
+ provider registry.terraform.io/hashicorp/random v2.3.0
Downloading plugin for provider "google-beta" (terraform-providers/google-beta) 3.30.0...
provider.google: version = "~> 3.30"
provider.google-beta: version = "~> 3.30"
provider.local: version = "~> 1.4"
provider.null: version = "~> 2.1"
provider.random: version = "~> 2.3"
Step #2 - "tf init": Error: Failed to query available provider packages
Step #2 - "tf init":
Step #2 - "tf init": Could not retrieve the list of available versions for provider
Step #2 - "tf init": terraform-providers/google-beta: provider registry registry.terraform.io does
Step #2 - "tf init": not have a provider named
Step #2 - "tf init": registry.terraform.io/terraform-providers/google-beta
Please list the full steps required to reproduce the issue, for example:
terraform initCan confirm the same.
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ ERROR ๎ฐ # ๎ฐ TF_LOG=debug terraform013 init
2020/07/21 10:45:22 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/07/21 10:45:22 [INFO] Terraform version: 0.13.0 beta3
2020/07/21 10:45:22 [INFO] Go runtime version: go1.14.2
2020/07/21 10:45:22 [INFO] CLI args: []string{"/usr/local/bin/terraform013", "init"}
2020/07/21 10:45:22 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2020/07/21 10:45:22 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory /root/.terraform.d/plugins
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory /root/.local/share/terraform/plugins
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2020/07/21 10:45:22 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins
2020/07/21 10:45:22 [INFO] CLI command args: []string{"init"}
2020/07/21 10:45:22 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
Initializing modules...
2020/07/21 10:45:22 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/07/21 10:45:22 [DEBUG] Module installer: begin dns
2020/07/21 10:45:22 [DEBUG] Module installer: begin egress_firewalls
2020/07/21 10:45:22 [DEBUG] Module installer: begin firewalls
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.client
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.client_config
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.client_gcs
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.client_iam
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.cloudsql
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.server
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.server_config
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.server_gcs
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.server_iam
2020/07/21 10:45:22 [DEBUG] Module installer: begin forseti.server_rules
2020/07/21 10:45:22 [DEBUG] Module installer: begin network
2020/07/21 10:45:22 [DEBUG] Module installer: begin proxy
2020/07/21 10:45:22 [DEBUG] Module installer: begin proxy-iam
2020/07/21 10:45:22 [DEBUG] Module installer: begin proxy-iam.helper
2020/07/21 10:45:22 [DEBUG] Module installer: begin subnets
Initializing the backend...
2020/07/21 10:45:27 [DEBUG] checking for provisioner in "."
2020/07/21 10:45:27 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/07/21 10:45:27 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
Initializing provider plugins...
2020/07/21 10:45:29 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
- Using previously-installed hashicorp/kubernetes v1.11.3
- Using previously-installed hashicorp/null v2.1.2
- Using previously-installed hashicorp/random v2.3.0
- Using previously-installed hashicorp/template v2.1.2
- Using previously-installed hashicorp/helm v0.10.5
- Using previously-installed hashicorp/http v1.2.0
- Using previously-installed hashicorp/google v3.28.0
- Using previously-installed hashicorp/local v1.4.0
- Using previously-installed hashicorp/tls v2.1.1
- Finding terraform-providers/google-beta versions matching "3.28.*, ~> 3.7"...
2020/07/21 10:45:30 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/07/21 10:45:30 [DEBUG] GET https://registry.terraform.io/v1/providers/terraform-providers/google-beta/versions
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
terraform-providers/google-beta: provider registry registry.terraform.io does
not have a provider named
registry.terraform.io/terraform-providers/google-beta
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ ERROR ๎ฐ # ๎ฐ
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ # ๎ฐ curl https://registry.terraform.io/v1/providers/terraform-providers/google-beta/versions -i
HTTP/2 404
server: Cowboy
cache-control: public, max-age=30, stale-if-error=31536000
content-type: application/json
strict-transport-security: max-age=31536000; includeSubDomains; preload
via: 1.1 vegur
via: 1.1 varnish
accept-ranges: bytes
date: Tue, 21 Jul 2020 09:46:27 GMT
via: 1.1 varnish
age: 4
x-served-by: cache-dca17722-DCA, cache-dal21237-DAL
x-cache: MISS, HIT
x-cache-hits: 0, 1
vary: Accept-Encoding
content-length: 25
{"errors":["Not Found"]}
Updated every model with 'terraform 0.13upgrade'
terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = "3.31.0"
}
google = {
source = "hashicorp/google"
}
}
}
still, it is searching for 'terraform-providers/google-beta'
I'm confused about where the terraform-providers/google-beta source is coming from. Can you please run terraform providers and paste the output in a comment here?
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ # ๎ฐ terraform013 providers
Providers required by configuration:
.
โโโ provider[registry.terraform.io/terraform-providers/google-beta] 3.28.*
โโโ provider[registry.terraform.io/hashicorp/google] 3.28.*
โโโ module.network
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.proxy
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.proxy-iam
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ module.helper
โโโ module.subnets
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.dns
โ โโโ provider[registry.terraform.io/terraform-providers/google-beta]
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.egress_firewalls
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.firewalls
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.forseti
โโโ provider[registry.terraform.io/hashicorp/null] ~> 2.1
โโโ provider[registry.terraform.io/hashicorp/kubernetes] ~> 1.10
โโโ provider[registry.terraform.io/terraform-providers/google-beta] ~> 3.7
โโโ provider[registry.terraform.io/hashicorp/http] ~> 1.2
โโโ provider[registry.terraform.io/hashicorp/template] ~> 2.1
โโโ provider[registry.terraform.io/hashicorp/tls] ~> 2.1
โโโ provider[registry.terraform.io/hashicorp/local] ~> 1.4
โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โโโ provider[registry.terraform.io/hashicorp/random] ~> 2.2
โโโ provider[registry.terraform.io/hashicorp/helm] ~> 0.10
โโโ module.client_config
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ provider[registry.terraform.io/hashicorp/template]
โโโ module.cloudsql
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ provider[registry.terraform.io/hashicorp/random]
โโโ module.server
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/random]
โโโ provider[registry.terraform.io/hashicorp/tls]
โโโ provider[registry.terraform.io/hashicorp/template]
โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โโโ module.client_gcs
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ module.server_gcs
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.server_iam
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.client_iam
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.server_rules
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ provider[registry.terraform.io/hashicorp/template]
โโโ module.client
โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/template]
โโโ module.server_config
โโโ provider[registry.terraform.io/hashicorp/template]
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/google]
Providers required by state:
provider[registry.terraform.io/hashicorp/random]
provider[registry.terraform.io/hashicorp/template]
provider[registry.terraform.io/terraform-providers/google-beta]
provider[registry.terraform.io/hashicorp/google]
provider[registry.terraform.io/hashicorp/null]
This points to a bug in Hashicorp infrastructure.
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ # ๎ฐ curl https://registry.terraform.io/v1/providers/terraform-providers/google-beta/versions -i
HTTP/2 404
server: Cowboy
cache-control: public, max-age=30, stale-if-error=31536000
content-type: application/json
strict-transport-security: max-age=31536000; includeSubDomains; preload
via: 1.1 vegur
via: 1.1 varnish
accept-ranges: bytes
date: Tue, 21 Jul 2020 14:56:19 GMT
via: 1.1 varnish
age: 0
x-served-by: cache-dca17769-DCA, cache-dfw18668-DFW
x-cache: MISS, MISS
x-cache-hits: 0, 0
vary: Accept-Encoding
content-length: 25
{"errors":["Not Found"]}
This works fine, the Google Provider in the Hashicorp namespace.
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ # ๎ฐ curl https://registry.terraform.io/v1/providers/hashicorp/google/versions -i
HTTP/2 200
server: Cowboy
cache-control: public, max-age=30, stale-if-error=31536000
content-type: application/json
strict-transport-security: max-age=31536000; includeSubDomains; preload
via: 1.1 vegur
via: 1.1 varnish
accept-ranges: bytes
date: Tue, 21 Jul 2020 14:58:05 GMT
via: 1.1 varnish
age: 0
x-served-by: cache-dca17780-DCA, cache-dfw18654-DFW
x-cache: MISS, MISS
x-cache-hits: 0, 0
vary: Accept-Encoding
content-length: 38728
It looks like your configuration is explicitly requiring terraform-providers/google-beta in two places: at the root module, and in the forseti module. Can you look for the terraform { required_providers { โฆ } } blocks in those modules to see if that's the case?
I need that provider in the forseti module and I can't download it because the hashicorp registry doesn't have it.
@upodroid The Google Beta provider's source is hashicorp/google-beta. Please try updating your configuration accordingly, in both the root and in the forseti module: source = "hashicorp/google-beta".
I updated the modules but I can't run init. Also, this was working fine last week as you can see that the state is expecting a provider in the terraform-providers/google-beta namespace.
root ๎ฐ DESKTOP-7JUP8RO ๎ฐ mnt ๎ฑ c ๎ฑ โฆ ๎ฑ Desktop ๎ฑ Git ๎ฑ ccoe-landing-zone ๎ฐ ๎ master ๎ฐ 82โ ๎ฐ 3+ ๎ฐ ERROR ๎ฐ # ๎ฐ terraform013 providers && TF_LOG=trace terraform013 init
Providers required by configuration:
.
โโโ provider[registry.terraform.io/hashicorp/google-beta] 3.28.*
โโโ provider[registry.terraform.io/hashicorp/google] 3.28.*
โโโ module.egress_firewalls
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.firewalls
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.forseti
โ โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โ โโโ provider[registry.terraform.io/hashicorp/template] ~> 2.1
โ โโโ provider[registry.terraform.io/hashicorp/http] ~> 1.2
โ โโโ provider[registry.terraform.io/hashicorp/tls] ~> 2.1
โ โโโ provider[registry.terraform.io/hashicorp/google-beta] ~> 3.7
โ โโโ provider[registry.terraform.io/hashicorp/kubernetes] ~> 1.10
โ โโโ provider[registry.terraform.io/hashicorp/local] ~> 1.4
โ โโโ provider[registry.terraform.io/hashicorp/random] ~> 2.2
โ โโโ provider[registry.terraform.io/hashicorp/helm] ~> 0.10
โ โโโ provider[registry.terraform.io/hashicorp/null] ~> 2.1
โ โโโ module.client_iam
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ module.server_iam
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ module.cloudsql
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ provider[registry.terraform.io/hashicorp/random]
โ โโโ module.server_gcs
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ module.client
โ โโโ provider[registry.terraform.io/hashicorp/template]
โ โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ module.client_gcs
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ module.server_config
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ provider[registry.terraform.io/hashicorp/template]
โ โโโ module.client_config
โ โโโ provider[registry.terraform.io/hashicorp/template]
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ module.server
โ โโโ provider[registry.terraform.io/hashicorp/template]
โ โโโ provider[registry.terraform.io/hashicorp/google] ~> 3.7
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ provider[registry.terraform.io/hashicorp/random]
โ โโโ provider[registry.terraform.io/hashicorp/tls]
โ โโโ module.server_rules
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ provider[registry.terraform.io/hashicorp/template]
โโโ module.network
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.proxy
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.proxy-iam
โ โโโ provider[registry.terraform.io/hashicorp/google]
โ โโโ module.helper
โโโ module.subnets
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.dns
โโโ provider[registry.terraform.io/hashicorp/google-beta]
โโโ provider[registry.terraform.io/hashicorp/google]
Providers required by state:
provider[registry.terraform.io/hashicorp/google]
provider[registry.terraform.io/hashicorp/null]
provider[registry.terraform.io/hashicorp/random]
provider[registry.terraform.io/hashicorp/template]
provider[registry.terraform.io/terraform-providers/google-beta]
2020/07/21 17:55:44 [INFO] Terraform version: 0.13.0 beta3
2020/07/21 17:55:44 [INFO] Go runtime version: go1.14.2
2020/07/21 17:55:44 [INFO] CLI args: []string{"/usr/local/bin/terraform013", "init"}
2020/07/21 17:55:44 [DEBUG] Attempting to open CLI config file: /root/.terraformrc
2020/07/21 17:55:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory /root/.terraform.d/plugins
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory /root/.local/share/terraform/plugins
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2020/07/21 17:55:44 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins
2020/07/21 17:55:44 [INFO] CLI command args: []string{"init"}
Initializing modules...
2020/07/21 17:55:44 [TRACE] ModuleInstaller: installing child modules for . into .terraform/modules
2020/07/21 17:55:44 [DEBUG] Module installer: begin dns
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: dns <nil> already installed in modules/google_dns_managed
2020/07/21 17:55:44 [DEBUG] Module installer: begin egress_firewalls
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: egress_firewalls <nil> already installed in modules/egress_firewall
2020/07/21 17:55:44 [DEBUG] Module installer: begin firewalls
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: firewalls <nil> already installed in modules/ingress_firewall
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti <nil> already installed in ../terraform-google-forseti
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.client
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.client <nil> already installed in ../terraform-google-forseti/modules/client
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.client_config
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.client_config <nil> already installed in ../terraform-google-forseti/modules/client_config
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.client_gcs
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.client_gcs <nil> already installed in ../terraform-google-forseti/modules/client_gcs
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.client_iam
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.client_iam <nil> already installed in ../terraform-google-forseti/modules/client_iam
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.cloudsql
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.cloudsql <nil> already installed in ../terraform-google-forseti/modules/cloudsql
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.server
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.server <nil> already installed in ../terraform-google-forseti/modules/server
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.server_config
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.server_config <nil> already installed in ../terraform-google-forseti/modules/server_config
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.server_gcs
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.server_gcs <nil> already installed in ../terraform-google-forseti/modules/server_gcs
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.server_iam
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.server_iam <nil> already installed in ../terraform-google-forseti/modules/server_iam
2020/07/21 17:55:44 [DEBUG] Module installer: begin forseti.server_rules
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: forseti.server_rules <nil> already installed in ../terraform-google-forseti/modules/rules
2020/07/21 17:55:44 [DEBUG] Module installer: begin network
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: network <nil> already installed in modules/google_compute_network
2020/07/21 17:55:44 [DEBUG] Module installer: begin proxy
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: proxy <nil> already installed in modules/proxy
2020/07/21 17:55:44 [DEBUG] Module installer: begin proxy-iam
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: proxy-iam 6.1.0 already installed in .terraform/modules/proxy-iam/terraform-google-iam-6.1.0/modules/projects_iam
2020/07/21 17:55:44 [DEBUG] Module installer: begin proxy-iam.helper
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: proxy-iam.helper <nil> already installed in .terraform/modules/proxy-iam/terraform-google-iam-6.1.0/modules/helper
2020/07/21 17:55:44 [DEBUG] Module installer: begin subnets
2020/07/21 17:55:44 [TRACE] ModuleInstaller: Module installer: subnets <nil> already installed in modules/google_compute_subnet
2020/07/21 17:55:44 [TRACE] modsdir: writing modules manifest to .terraform/modules/modules.json
2020/07/21 17:55:45 [TRACE] Meta.Backend: built configuration for "gcs" backend with hash value 606104622
Initializing the backend...
2020/07/21 17:55:45 [TRACE] Preserving existing state lineage "e1686c91-cd35-d71b-8cbd-d39412bf3485"
2020/07/21 17:55:45 [TRACE] Preserving existing state lineage "e1686c91-cd35-d71b-8cbd-d39412bf3485"
2020/07/21 17:55:45 [TRACE] Meta.Backend: working directory was previously initialized for "gcs" backend
2020/07/21 17:55:45 [TRACE] Meta.Backend: using already-initialized, unchanged "gcs" backend configuration
2020/07/21 17:55:46 [TRACE] Meta.Backend: instantiated backend of type *gcs.Backend
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.28.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/google/3.28.0/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google-beta v3.28.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/google-beta/3.28.0/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/helm v0.10.5 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/helm/0.10.5/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/http v1.2.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/http/1.2.0/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v1.11.3 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/kubernetes/1.11.3/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/local v1.4.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/local/1.4.0/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/null v2.1.2 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/null/2.1.2/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v2.3.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/random/2.3.0/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.1.2 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/template/2.1.2/linux_amd64
2020/07/21 17:55:46 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/tls v2.1.1 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/tls/2.1.1/linux_amd64
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/tls/2.1.1/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/tls 2.1.1
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/helm/0.10.5/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/helm 0.10.5
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/http/1.2.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/http 1.2.0
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/kubernetes/1.11.3/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 1.11.3
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/local/1.4.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/local 1.4.0
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/null/2.1.2/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/null 2.1.2
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/random/2.3.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/random 2.3.0
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/google/3.28.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/google 3.28.0
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/google-beta/3.28.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/google-beta 3.28.0
2020/07/21 17:55:46 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/template/2.1.2/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/template 2.1.2
2020/07/21 17:55:47 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:47 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:47 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:48 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:48 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:48 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:49 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:49 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:49 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:49 [DEBUG] checking for provisioner in "."
2020/07/21 17:55:49 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/07/21 17:55:49 [INFO] Failed to read plugin lock file .terraform/plugins/linux_amd64/lock.json: open .terraform/plugins/linux_amd64/lock.json: no such file or directory
2020/07/21 17:55:49 [TRACE] Meta.Backend: backend *gcs.Backend does not support operations, so wrapping it in a local backend
2020/07/21 17:55:52 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins
Initializing provider plugins...
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.28.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/google/3.28.0/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google-beta v3.28.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/google-beta/3.28.0/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/helm v0.10.5 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/helm/0.10.5/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/http v1.2.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/http/1.2.0/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v1.11.3 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/kubernetes/1.11.3/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/local v1.4.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/local/1.4.0/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/null v2.1.2 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/null/2.1.2/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v2.3.0 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/random/2.3.0/linux_amd64
2020/07/21 17:55:52 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.1.2 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/template/2.1.2/linux_amd64
2020/07/21 17:55:53 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/tls v2.1.1 for linux_amd64 at .terraform/plugins/registry.terraform.io/hashicorp/tls/2.1.1/linux_amd64
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/google-beta/3.28.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/google-beta 3.28.0
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/local/1.4.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/local 1.4.0
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/null/2.1.2/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/null 2.1.2
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/random/2.3.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/random 2.3.0
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/template/2.1.2/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/template 2.1.2
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/tls/2.1.1/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/tls 2.1.1
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/google/3.28.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/google 3.28.0
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/helm/0.10.5/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/helm 0.10.5
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/http/1.2.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/http 1.2.0
2020/07/21 17:55:53 [TRACE] providercache.fillMetaCache: including .terraform/plugins/registry.terraform.io/hashicorp/kubernetes/1.11.3/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 1.11.3
- Using previously-installed hashicorp/template v2.1.2
2020/07/21 17:55:53 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2020/07/21 17:55:53 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json
- Using previously-installed hashicorp/helm v0.10.5
- Using previously-installed hashicorp/http v1.2.0
- Using previously-installed hashicorp/null v2.1.2
- Using previously-installed hashicorp/google v3.28.0
- Using previously-installed hashicorp/tls v2.1.1
- Using previously-installed hashicorp/kubernetes v1.11.3
- Using previously-installed hashicorp/local v1.4.0
- Using previously-installed hashicorp/random v2.3.0
- Using previously-installed hashicorp/google-beta v3.28.0
- Finding latest version of terraform-providers/google-beta...
2020/07/21 17:55:53 [DEBUG] GET https://registry.terraform.io/v1/providers/terraform-providers/google-beta/versions
2020/07/21 17:55:53 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/terraform-providers/google-beta/versions
2020/07/21 17:55:54 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:54 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:55 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:55 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:55 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:55 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:56 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:56 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:56 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
2020/07/21 17:55:57 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/plugins
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
terraform-providers/google-beta: provider registry registry.terraform.io does
not have a provider named
registry.terraform.io/terraform-providers/google-beta
Thank you for helping to track this down.
I spoke with the Terraform Registry team to understand what happened. While we're still the 0.13 beta period, some providers under the terraform-providers namespace have been migrated to the hashicorp namespace. This happened in the past few days, which is why you're now seeing the errors above.
Now that you've updated the configuration, the last step to fix this should be to fix the state. You should be able to do this with the following command:
terraform state replace-provider terraform-providers/google-beta hashicorp/google-beta
Once that's complete, terraform init should succeed, and plan/apply should work as normal.
Sorry for this inconvenience, and for the time taken to figure this out through the bug report! Please let us know if this fixes the problem for you.
I'm good now thanks. Going forward a change like this needs to be documented clearly in the beta article. Now I have to go and fix some modules that are using the wrong namespaces ๐
After running 'terraform state replace-provider terraform-providers/google-beta hashicorp/google-beta'
code is working fine
Thanks
Hi alisdair,
now in my other branches, I'm getting this
Providers required by configuration:
.
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.gke
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.project
โ โโโ provider[registry.terraform.io/hashicorp/google-beta]
โ โโโ provider[registry.terraform.io/hashicorp/local]
โ โโโ provider[registry.terraform.io/hashicorp/null]
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.bigquery
โ โโโ provider[registry.terraform.io/hashicorp/google]
โโโ module.cloudsql
โโโ provider[registry.terraform.io/hashicorp/google]
โโโ provider[registry.terraform.io/hashicorp/null]
โโโ provider[registry.terraform.io/hashicorp/random]
Providers required by state:
provider[registry.terraform.io/-/google]
provider[registry.terraform.io/-/google-beta]
provider[registry.terraform.io/-/local]
provider[registry.terraform.io/-/null]
Error: Provider configuration not present
To work with module.project.data.local_file.access_token its original provider
configuration at provider["registry.terraform.io/-/local"] is required, but it
has been removed. This occurs when a provider configuration is removed while
objects created by that provider still exist in the state. Re-add the provider
configuration to destroy module.project.data.local_file.access_token, after
which you can remove the provider configuration again.
And not able to run "terraform state replace-provider -/google-beta hashicorp/google-beta'
getting same error during terraform plan for all the resources
We can use this for the above scenario:
terraform state replace-provider registry.terraform.io/-/google-beta registry.terraform.io/hashicorp/google-beta
I'm glad you were able to resolve this! I'll make sure we document this issue and the workaround going forward.
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.