Skip to content

terraform plan/apply fail locally — provider plugin IPC certificate handshake error (separate from #32) #34

Description

@amar-python

Problem

Any terraform command that needs provider plugin schemas (plan, apply, validate, even providers schema) fails locally on this dev machine:

Error: Failed to load plugin schemas

Error while loading schemas for plugin components: 2 problems:

- Failed to obtain provider schema: Could not load the schema for provider
registry.terraform.io/hashicorp/azurerm: failed to retrieve schema from
provider "registry.terraform.io/hashicorp/azurerm": Plugin did not respond:
The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).GetProviderSchema call.

With TF_LOG=ERROR, the actual cause is visible:

error="rpc error: code = Unavailable desc = connection error: desc = \"transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority\""
provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/azurerm/4.81.0/windows_amd64/terraform-provider-azurerm_v4.81.0_x5.exe id=29568 error="exit status 1"

This is NOT the #32 (Norton / az CLI) issue

This failure happens on Terraform's own internal IPC between the main terraform process and each provider plugin subprocess — a freshly self-signed certificate Terraform generates per run for that local channel — not a call to any Azure endpoint. Confirmed reproducing with terraform init -backend=false (no state, no network needed for schema loading) and zero involvement of az CLI. Independent root cause from #32.

Confirmed pre-existing, not introduced by new work

Reproduces identically against the existing, previously-working infra/terraform-prod stack — this is an environment-level issue on this dev machine, not a defect in infra/terraform-test / infra/terraform-staging.

Impact

No terraform command that needs provider plugins can run locally on this machine, for any of the 4 environment stacks (terraform, terraform-prod, terraform-test, terraform-staging) — independent of whether #32 is ever resolved. This is currently the harder blocker of the two for actually running apply.

Suspected cause (unconfirmed)

Possibilities: a system clock/time-sync issue affecting freshly-generated cert validity windows, a Go crypto/tls interaction issue specific to this Windows environment, or some form of loopback (127.0.0.1) traffic interception. Not diagnosed further — didn't want to go poking at system time/network internals without your input, especially given #32's lesson that a plausible-looking cause (Norton) turned out not to be the whole story here.

Path forward

Given both this and #32 block local execution (for independent reasons), the practical path to actually provision test/staging (#31) is running terraform/az from an environment other than this machine — e.g. Azure Cloud Shell, either run by you manually or driven via browser automation.

Did not attempt to force past this (e.g. disabling TLS verification for the plugin channel) — flagging for a decision on whether it's worth diagnosing further on this machine, or just routing around it via Cloud Shell going forward.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions