Could not retrieve the list of available versions for provider hashicorp/google

terraform init -upgrade

**Initializing the backend...**

**Initializing provider plugins...**

- terraform.io/builtin/terraform is built in to Terraform

- Finding hashicorp/kubernetes versions matching "2.12.1"...

- Finding hashicorp/google versions matching "4.64.0"...

- Finding hashicorp/random versions matching "3.5.1"...

- Finding gavinbunney/kubectl versions matching "1.14.0"...

- Using previously-installed hashicorp/kubernetes v2.12.1

- Using previously-installed hashicorp/random v3.5.1

- Using previously-installed gavinbunney/kubectl v1.14.0

╷

│ **Error:** **Failed to query available provider packages**

│

│ Could not retrieve the list of available versions for provider hashicorp/google: no available releases match the given constraints 4.64.0

Note: I’m running this on darwin_arm64. Apple Silicon M1

Hi @dolassmahesh,

If you see the environment variable TF_LOG=trace before you run the init command, Terraform will give more details about what exactly it’s doing during the installation process.

The symptom you described here is often caused by having Terraform set up to install some or all providers from a location other than the main registry, such as a directory on your local computer. In that case Terraform would only be able to detect versions that have been copied into that location. The trace logs should give more information about where exactly Terraform is checking for what versions are available.

Thank you apparentlymart for reply back.

  1. How can I enable TF_LOG=trace. ( sorry I’m bit new on this)
2023-05-10T10:39:50.985-0700 [INFO] Terraform version: 1.4.6

2023-05-10T10:39:50.985-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.21.0

2023-05-10T10:39:50.985-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2

2023-05-10T10:39:50.985-0700 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2

2023-05-10T10:39:50.985-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0

2023-05-10T10:39:50.985-0700 [DEBUG] using github.com/zclconf/go-cty v1.12.1

2023-05-10T10:39:50.985-0700 [INFO] Go runtime version: go1.19.6

2023-05-10T10:39:50.985-0700 [INFO] CLI args: []string{"terraform", "-version"}

2023-05-10T10:39:50.985-0700 [TRACE] Stdout is a terminal of width 165

2023-05-10T10:39:50.985-0700 [TRACE] Stderr is a terminal of width 165

2023-05-10T10:39:50.985-0700 [TRACE] Stdin is a terminal

2023-05-10T10:39:50.985-0700 [DEBUG] Attempting to open CLI config file: /Users/mdolas383/.terraformrc

2023-05-10T10:39:50.985-0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.

2023-05-10T10:39:50.986-0700 [DEBUG] checking for credentials in "/Users/mdolas383/.terraform.d/plugins"

2023-05-10T10:39:50.986-0700 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins

2023-05-10T10:39:50.986-0700 [DEBUG] will search for provider plugins in /Users/mdolas383/.terraform.d/plugins

2023-05-10T10:39:50.993-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:39:50.993-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.2.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.2.0/darwin_arm64

2023-05-10T10:39:50.994-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.3.1 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.3.1/darwin_arm64

2023-05-10T10:39:50.994-0700 [DEBUG] ignoring non-existing provider search directory /Users/mdolas383/Library/Application Support/io.terraform/plugins

2023-05-10T10:39:50.994-0700 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins

2023-05-10T10:39:50.995-0700 [INFO] CLI command args: []string{"version", "-version"}

2023-05-10T10:40:29.004-0700 [INFO] Terraform version: 1.4.6

2023-05-10T10:40:29.005-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.21.0

2023-05-10T10:40:29.005-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2

2023-05-10T10:40:29.005-0700 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2

2023-05-10T10:40:29.005-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0

2023-05-10T10:40:29.005-0700 [DEBUG] using github.com/zclconf/go-cty v1.12.1

2023-05-10T10:40:29.005-0700 [INFO] Go runtime version: go1.19.6

2023-05-10T10:40:29.005-0700 [INFO] CLI args: []string{"terraform", "init"}

2023-05-10T10:40:29.005-0700 [TRACE] Stdout is a terminal of width 165

2023-05-10T10:40:29.005-0700 [TRACE] Stderr is a terminal of width 165

2023-05-10T10:40:29.005-0700 [TRACE] Stdin is a terminal

2023-05-10T10:40:29.005-0700 [DEBUG] Attempting to open CLI config file: /Users/mdolas383/.terraformrc

2023-05-10T10:40:29.005-0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.

2023-05-10T10:40:29.006-0700 [DEBUG] checking for credentials in "/Users/mdolas383/.terraform.d/plugins"

2023-05-10T10:40:29.006-0700 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins

2023-05-10T10:40:29.006-0700 [DEBUG] will search for provider plugins in /Users/mdolas383/.terraform.d/plugins

2023-05-10T10:40:29.007-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:40:29.009-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.2.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.2.0/darwin_arm64

2023-05-10T10:40:29.009-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.3.1 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.3.1/darwin_arm64

2023-05-10T10:40:29.009-0700 [DEBUG] ignoring non-existing provider search directory /Users/mdolas383/Library/Application Support/io.terraform/plugins

2023-05-10T10:40:29.009-0700 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins

2023-05-10T10:40:29.010-0700 [INFO] CLI command args: []string{"init"}

2023-05-10T10:40:29.023-0700 [TRACE] Meta.Backend: built configuration for "gcs" backend with hash value 3561913886

2023-05-10T10:40:29.024-0700 [TRACE] Preserving existing state lineage "df831a68-ba93-14f5-d00f-2e734b4bff39"

2023-05-10T10:40:29.024-0700 [TRACE] Preserving existing state lineage "df831a68-ba93-14f5-d00f-2e734b4bff39"

2023-05-10T10:40:29.024-0700 [TRACE] Meta.Backend: working directory was previously initialized for "gcs" backend

2023-05-10T10:40:29.024-0700 [TRACE] Meta.Backend: using already-initialized, unchanged "gcs" backend configuration

2023-05-10T10:40:29.806-0700 [TRACE] Meta.selectWorkspace: the currently selected workspace is present in the configured backend (default)

2023-05-10T10:40:29.807-0700 [TRACE] Meta.Backend: instantiated backend of type *gcs.Backend

2023-05-10T10:40:29.811-0700 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers

2023-05-10T10:40:29.821-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/gavinbunney/kubectl v1.14.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64

2023-05-10T10:40:29.825-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:40:29.832-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v2.12.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64

2023-05-10T10:40:29.837-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.4.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64

2023-05-10T10:40:29.837-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.5.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64

2023-05-10T10:40:29.838-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/google 3.22.0

2023-05-10T10:40:29.838-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 2.12.1

2023-05-10T10:40:29.838-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.4.1

2023-05-10T10:40:29.838-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.5.1

2023-05-10T10:40:29.838-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64 as a candidate package for registry.terraform.io/gavinbunney/kubectl 1.14.0

2023-05-10T10:40:29.911-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:29.911-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:29.963-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:29.974-0700 [DEBUG] checking for provisioner in "."

2023-05-10T10:40:29.976-0700 [DEBUG] checking for provisioner in "/opt/homebrew/bin"

2023-05-10T10:40:29.976-0700 [DEBUG] checking for provisioner in "/Users/mdolas383/.terraform.d/plugins"

2023-05-10T10:40:29.976-0700 [TRACE] Meta.Backend: backend *gcs.Backend does not support operations, so wrapping it in a local backend

2023-05-10T10:40:30.747-0700 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json

2023-05-10T10:40:30.747-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json

2023-05-10T10:40:30.938-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/kubernetes/versions

2023-05-10T10:40:30.939-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/hashicorp/kubernetes/versions

2023-05-10T10:40:31.051-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/random/versions

2023-05-10T10:40:31.051-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/hashicorp/random/versions

2023-05-10T10:40:31.165-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/gavinbunney/kubectl/versions

2023-05-10T10:40:31.165-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/gavinbunney/kubectl/versions

2023-05-10T10:40:31.272-0700 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers

2023-05-10T10:40:31.286-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/gavinbunney/kubectl v1.14.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64

2023-05-10T10:40:31.294-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:40:31.295-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v2.12.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64

2023-05-10T10:40:31.303-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.4.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64

2023-05-10T10:40:31.305-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.5.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64

2023-05-10T10:40:31.305-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/google 3.22.0

2023-05-10T10:40:31.305-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 2.12.1

2023-05-10T10:40:31.305-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.4.1

2023-05-10T10:40:31.305-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.5.1

2023-05-10T10:40:31.305-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64 as a candidate package for registry.terraform.io/gavinbunney/kubectl 1.14.0

2023-05-10T10:40:31.321-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:31.365-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:59.191-0700 [INFO] Terraform version: 1.4.6

2023-05-10T10:40:59.196-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.21.0

2023-05-10T10:40:59.196-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2

2023-05-10T10:40:59.196-0700 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2

2023-05-10T10:40:59.196-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0

2023-05-10T10:40:59.196-0700 [DEBUG] using github.com/zclconf/go-cty v1.12.1

2023-05-10T10:40:59.196-0700 [INFO] Go runtime version: go1.19.6

2023-05-10T10:40:59.196-0700 [INFO] CLI args: []string{"terraform", "init"}

2023-05-10T10:40:59.196-0700 [TRACE] Stdout is a terminal of width 165

2023-05-10T10:40:59.196-0700 [TRACE] Stderr is a terminal of width 165

2023-05-10T10:40:59.196-0700 [TRACE] Stdin is a terminal

2023-05-10T10:40:59.196-0700 [DEBUG] Attempting to open CLI config file: /Users/mdolas383/.terraformrc

2023-05-10T10:40:59.196-0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.

2023-05-10T10:40:59.210-0700 [DEBUG] checking for credentials in "/Users/mdolas383/.terraform.d/plugins"

2023-05-10T10:40:59.210-0700 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins

2023-05-10T10:40:59.210-0700 [DEBUG] will search for provider plugins in /Users/mdolas383/.terraform.d/plugins

2023-05-10T10:40:59.218-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:40:59.219-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.2.0 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.2.0/darwin_arm64

2023-05-10T10:40:59.219-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/template v2.3.1 for darwin_arm64 at /Users/mdolas383/.terraform.d/plugins/registry.terraform.io/hashicorp/template/2.3.1/darwin_arm64

2023-05-10T10:40:59.219-0700 [DEBUG] ignoring non-existing provider search directory /Users/mdolas383/Library/Application Support/io.terraform/plugins

2023-05-10T10:40:59.219-0700 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins

2023-05-10T10:40:59.220-0700 [INFO] CLI command args: []string{"init"}

2023-05-10T10:40:59.241-0700 [TRACE] Meta.Backend: built configuration for "gcs" backend with hash value 3561913886

2023-05-10T10:40:59.243-0700 [TRACE] Preserving existing state lineage "df831a68-ba93-14f5-d00f-2e734b4bff39"

2023-05-10T10:40:59.243-0700 [TRACE] Preserving existing state lineage "df831a68-ba93-14f5-d00f-2e734b4bff39"

2023-05-10T10:40:59.243-0700 [TRACE] Meta.Backend: working directory was previously initialized for "gcs" backend

2023-05-10T10:40:59.243-0700 [TRACE] Meta.Backend: using already-initialized, unchanged "gcs" backend configuration

2023-05-10T10:40:59.723-0700 [TRACE] Meta.selectWorkspace: the currently selected workspace is present in the configured backend (default)

2023-05-10T10:40:59.725-0700 [TRACE] Meta.Backend: instantiated backend of type *gcs.Backend

2023-05-10T10:40:59.733-0700 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers

2023-05-10T10:40:59.740-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/gavinbunney/kubectl v1.14.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64

2023-05-10T10:40:59.742-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:40:59.743-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v2.12.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64

2023-05-10T10:40:59.744-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.4.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64

2023-05-10T10:40:59.749-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.5.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64

2023-05-10T10:40:59.749-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64 as a candidate package for registry.terraform.io/gavinbunney/kubectl 1.14.0

2023-05-10T10:40:59.749-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/google 3.22.0

2023-05-10T10:40:59.749-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 2.12.1

2023-05-10T10:40:59.749-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.4.1

2023-05-10T10:40:59.749-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.5.1

2023-05-10T10:40:59.836-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:59.836-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:59.903-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:40:59.943-0700 [DEBUG] checking for provisioner in "."

2023-05-10T10:40:59.945-0700 [DEBUG] checking for provisioner in "/opt/homebrew/bin"

2023-05-10T10:40:59.952-0700 [DEBUG] checking for provisioner in "/Users/mdolas383/.terraform.d/plugins"

2023-05-10T10:40:59.953-0700 [TRACE] Meta.Backend: backend *gcs.Backend does not support operations, so wrapping it in a local backend

2023-05-10T10:41:00.645-0700 [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json

2023-05-10T10:41:00.645-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/.well-known/terraform.json

2023-05-10T10:41:00.836-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/random/versions

2023-05-10T10:41:00.836-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/hashicorp/random/versions

2023-05-10T10:41:00.940-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/gavinbunney/kubectl/versions

2023-05-10T10:41:00.940-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/gavinbunney/kubectl/versions

2023-05-10T10:41:01.059-0700 [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/kubernetes/versions

2023-05-10T10:41:01.059-0700 [TRACE] HTTP client GET request to https://registry.terraform.io/v1/providers/hashicorp/kubernetes/versions

2023-05-10T10:41:01.170-0700 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers

2023-05-10T10:41:01.178-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/gavinbunney/kubectl v1.14.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64

2023-05-10T10:41:01.179-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/google v3.22.0 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64

2023-05-10T10:41:01.179-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/kubernetes v2.12.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64

2023-05-10T10:41:01.181-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.4.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64

2023-05-10T10:41:01.181-0700 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/random v3.5.1 for darwin_arm64 at .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64

2023-05-10T10:41:01.181-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/gavinbunney/kubectl/1.14.0/darwin_arm64 as a candidate package for registry.terraform.io/gavinbunney/kubectl 1.14.0

2023-05-10T10:41:01.181-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/google/3.22.0/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/google 3.22.0

2023-05-10T10:41:01.181-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/kubernetes/2.12.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/kubernetes 2.12.1

2023-05-10T10:41:01.181-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.4.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.4.1

2023-05-10T10:41:01.181-0700 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/random/3.5.1/darwin_arm64 as a candidate package for registry.terraform.io/hashicorp/random 3.5.1

2023-05-10T10:41:01.197-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

2023-05-10T10:41:01.262-0700 [TRACE] providercache.fillMetaCache: using cached result from previous scan of .terraform/providers

Your logs have been somewhat mangled by the forum software - please see Welcome to the forum - please reformat your message

Thank you maxb. I did format the code now .
Do you think what changes I might be missing for my issue.

The error you are experiencing is because you have a directory /Users/mdolas383/.terraform.d/plugins containing some providers.

You must not create a directory named ~/.terraform.d/plugins unless you want Terraform to use that directory as the only source for providers that exist in it.

If your intent is to keep a local cache of plugins, so they are not repeatedly downloaded from the internet, and are shared between multiple Terraform configuration directories, the way to do this is to create the configuration file ~/.terraformrc with the content

plugin_cache_dir = "$HOME/.terraform.d/plugin_cache"

Thank you Max. how do I make the changes from the current one ? Any suggestion appreciated. Do I need to do clean installation again for terraform ?

only issue I’m unable to pull this locally. Do you mind telling how I ca get from internet instead of caching locally.

**Initializing provider plugins...**

- terraform.io/builtin/terraform is built in to Terraform

- Finding hashicorp/random versions matching "3.5.1"...

- Finding gavinbunney/kubectl versions matching "1.14.0"...

- Finding hashicorp/kubernetes versions matching "2.12.1"...

- Finding hashicorp/google versions matching "4.16.0"...

- Installing hashicorp/random v3.5.1...

- Installed hashicorp/random v3.5.1 (signed by HashiCorp)

- Installing gavinbunney/kubectl v1.14.0...

- Installed gavinbunney/kubectl v1.14.0 (self-signed, key ID **AD64217B5ADD572F**)

- Installing hashicorp/kubernetes v2.12.1...

- Installed hashicorp/kubernetes v2.12.1 (signed by HashiCorp)

Partner and community providers are signed by their developers.

If you'd like to know more about provider signing, you can read about it here:

https://www.terraform.io/docs/cli/plugins/signing.html

╷

│ **Error:** **Failed to query available provider packages**

│

│ Could not retrieve the list of available versions for provider hashicorp/google: no available releases match the given constraints 4.16.

I said:

meaning that since you have gone against this requirement, you now need to delete that directory.

I deleted the directory , but the error still seen.

│ **Error:** **Incompatible provider version**
│
│ Provider registry.terraform.io/hashicorp/google v3.51.0 does not have a package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other versions of this
│ provider may have different platforms supported.

No, now you’re seeing a different error.

Before, the local directory was preventing Terraform from going to the Internet to get version 4.64.0 of the provider.

Now, something else has changed and it’s looking for very much older version 3.51.0.

Why the big change in version?

FYI, the first version of the hashicorp/google provider published for darwin_arm64 is:

$ curl -fsS https://registry.terraform.io/v1/providers/hashicorp/google/versions | jq -r '.versions[] | select(.platforms[] | contains({"os":"darwin","arch":"arm64"})) | .version' | sort -t. -k1,1n -k2,2n -k3,3n | head -n1
3.63.0

this version is there from last 2 years in the code. I tried changing to newer version to 4.56.0. even it shows the same error too for Apple Silicon M1 darwin/arm64.

Let me check curl.

this version is there from last 2 years in the code. I tried changing to newer version for 4.53 terraform init went well.

terraform init

**Initializing the backend...**

**Initializing provider plugins...**

- terraform.io/builtin/terraform is built in to Terraform

- Finding gavinbunney/kubectl versions matching "1.14.0"...

- Finding hashicorp/kubernetes versions matching "2.12.1"...

- Finding hashicorp/google versions matching "4.53.0"...

- Finding hashicorp/random versions matching "3.5.1"...

- Installing gavinbunney/kubectl v1.14.0...

- Installed gavinbunney/kubectl v1.14.0 (self-signed, key ID **AD64217B5ADD572F**)

- Installing hashicorp/kubernetes v2.12.1...

- Installed hashicorp/kubernetes v2.12.1 (signed by HashiCorp)

- Installing hashicorp/google v4.53.0...

- Installed hashicorp/google v4.53.0 (signed by HashiCorp)

- Installing hashicorp/random v3.5.1...

- Installed hashicorp/random v3.5.1 (signed by HashiCorp)

Partner and community providers are signed by their developers.

If you'd like to know more about provider signing, you can read about it here:

https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file **.terraform.lock.hcl** to record the provider

selections it made above. Include this file in your version control repository

so that Terraform can guarantee to make the same selections by default when

you run "terraform init" in the future.

**Terraform has been successfully initialized!**

You may now begin working with Terraform. Try running "terraform plan" to see

any changes that are required for your infrastructure. All Terraform commands

should now work.

If you ever set or change modules or backend configuration for Terraform,

rerun this command to reinitialize your working directory. If you forget, other

commands will detect it and remind you to do so if necessary.