Skip to content

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

Open

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

  1. amar-python commented on Aug 13, 2026

    @amar-python
    OwnerAuthor

    Root cause: Norton's local traffic interception, not a Terraform defect

    Investigated all five leads from the issue. Summary: clock sync, Terraform version, and provider-cache corruption are all ruled out. Strong circumstantial evidence points to Norton intercepting the loopback (127.0.0.1) TLS channel Terraform uses for its own provider-plugin IPC, at the kernel driver level — not via a configurable proxy setting, and independent of Terraform's version.

    1. Clock sync — ruled out

    $ w32tm /query /status
    Last Successful Sync Time: 14/08/2026 1:44:07 AM
    Source: time.windows.com,0x9
    Root Delay: 0.1096473s
    Root Dispersion: 4.2954595s
    

    Clock is synced and accurate to well under a second. Not a "not yet valid" cert-window issue.

    2. Environment variables — found something, but not the direct cause

    $ env | grep -iE 'proxy|ssl|cert|godebug'
    SSLKEYLOGFILE=\\.\nllMonFltProxy\6e33a21f104a1528
    NODE_EXTRA_CA_CERTS=C:\ProgramData\Norton\Antivirus\\wscert.pem
    

    Both are Norton-owned, machine-wide env vars — nllMonFltProxy is a named pipe served by Norton's nllMonFlt filter driver; wscert.pem is Norton's SSL/TLS-scanning root cert (the same one identified in #32). No HTTP_PROXY/HTTPS_PROXY/NO_PROXY/SSL_CERT_FILE set.

    Tested whether SSLKEYLOGFILE itself was the trigger by unsetting it only for the terraform subprocess (env -u SSLKEYLOGFILE TF_LOG=ERROR terraform providers schema -json) — identical failure. So the env var is a symptom of Norton's monitoring being globally active, not the mechanism causing the handshake failure itself.

    3. Loopback interception — kernel drivers confirmed present

    $ driverquery | grep -i nll
    nllMonFlt    nllMonFlt      File System   ...   <- matches the SSLKEYLOGFILE pipe name
    nllNetHub    nllNetHub      Kernel        ...
    nllRdr       nllRdr         Kernel        ...
    nllSP        nllSP          File System   ...
    (+ 10 more nll* drivers)
    

    Get-Service confirms Norton Firewall (Norton Firewall Service) running alongside Norton Antivirus. These are kernel/filesystem-filter-level drivers (net redirector + hub + monitor filter), not a userland HTTP proxy — consistent with interception that isn't scoped to "external traffic only" and can see 127.0.0.1 sockets. Per the hard constraint in this issue, did not change any Norton configuration or attempt to disable/bypass these drivers — this is a read-only inventory.

    4. Terraform version — ruled out as a regression

    Downloaded and tested Terraform 1.9.8 (clearly older stable) side-by-side with the installed 1.15.6 against the same provider binaries:

    $ ./terraform198.exe version
    Terraform v1.9.8
    
    $ TF_LOG=ERROR ./terraform198.exe providers schema -json
    ...same failure...
    error="rpc error: code = Unavailable desc = connection error: desc = \"transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority\""
    

    Both 1.9.8 and 1.15.6 fail identically. Not a version-specific regression in Terraform's plugin-protocol implementation — not worth trying 1.15.8.

    5. Clean provider reinstall — ruled out

    Deleted .terraform/ entirely and re-ran terraform init -backend=false -input=false (fresh provider download + fresh lock reuse, not a cache reuse). Failure reproduced identically afterward. Not a corrupted binary/cache.

    Conclusion

    This is the same family of issue as #32 — Norton performing local TLS interception — but manifesting against Terraform's own internal, self-signed loopback IPC channel rather than a call to login.microsoftonline.com. Every alternative explanation (clock, Terraform version, cache corruption, a stray env var) has been tested and ruled out; what remains is kernel-level Norton interception of the 127.0.0.1 connection, for which the only real fix is a Norton-side exclusion — out of scope per this issue's constraints, same as #32.

    No safe fix found or applied. No TLS/certificate verification was weakened, no Norton settings were touched, and no apply/real infra was run — all testing was providers schema / init -backend=false (zero cost, zero network dependency beyond the one-time public download of the 1.9.8 test binary from releases.hashicorp.com). Test artifacts (terraform198.exe, schema_out*.json, schema_err*.log) were removed after testing; no repo files were modified.

    Leaving this open. Per #32's precedent, the practical path forward for #31 is running terraform from an environment Norton doesn't intercept (Azure Cloud Shell), or a decision from the account owner to add a Norton exclusion for the terraform.exe process / loopback traffic.

  2. amar-python commented on Aug 14, 2026

    @amar-python
    OwnerAuthor

    Status update — where this stands

    Tried so far (see comments above for full detail): clock sync ruled out (in sync within ~0.1s), Terraform version ruled out (1.9.8 and 1.15.6 both fail identically), clean .terraform/ reinstall ruled out (same failure). Root cause confirmed: Norton's local TLS interception, same family as #32, but hitting Terraform's own loopback plugin IPC rather than an external Azure call — confirmed via a dozen+ active Norton kernel/filesystem-filter drivers plus a running Norton Firewall service consistent with loopback (127.0.0.1) interception.

    Recommended fix, decided on together: a Norton exclusion (SSL/TLS scanning or Firewall Program Control) for the Terraform binary itself — find its path with where terraform and exclude that .exe.

    Where we're stuck: same as #32 — this requires changing Norton's configuration, which I'm not able to do myself (modifying system/security settings is outside what I can perform, even with explicit direction). Owner needs to add the exclusion manually in Norton's UI.

    Next step once the exclusion is added: re-run terraform init / terraform plan in infra/terraform-test/ to confirm the plugin IPC handshake succeeds before touching #31.

  3. amar-python commented on Aug 14, 2026

    @amar-python
    OwnerAuthor

    Steps to resolve — for the machine owner

    Same underlying cause as #32 (Norton's local TLS interception), just hitting Terraform's own loopback plugin IPC instead of an external Azure call. I can't make this change myself — here's exactly what to do.

    1. Open Norton 360's settings

    Open Norton from the system tray or Start menu → Settings (gear icon).

    2. Find the SSL/TLS scanning or program-exclusion setting

    The exact menu path varies by Norton 360 version — look for one of these (try Norton's in-app settings search box for "SSL" or "exclusion" if you don't see them right away):

    • Firewall → Program Control — per-program rule, look for an option to exclude a specific program from traffic inspection/scanning
    • Antivirus → Scans and Risks → Exclusions / Items to Exclude from Scans — add a specific .exe

    Per-program exclusion is preferable to any global "disable SSL scanning" toggle.

    3. Add this process to the exclusion

    C:\Users\User\AppData\Local\Microsoft\WinGet\Packages\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe\terraform.exe
    

    That's the real binary. where terraform resolves to a symlink at C:\Users\User\AppData\Local\Microsoft\WinGet\Links\terraform.exe which points to it — if Norton's exclusion UI doesn't follow symlinks, add both paths to be safe.

    4. Tell me once it's done

    I'll re-run terraform init / terraform plan in infra/terraform-test/ to confirm the plugin IPC handshake actually succeeds, before we touch #31.

  4. amar-python commented on Aug 14, 2026

    @amar-python
    OwnerAuthor

    Same decision as #32 (same root cause): declined the Norton Email Protection toggle. Norton stays untouched. No further local fix is being pursued — Terraform commands remain unusable on this machine. Path forward for #31 is Azure Cloud Shell instead.

  5. amar-python commented on Aug 14, 2026

    @amar-python
    OwnerAuthor

    Final summary — all actions taken

    Problem: terraform plan/apply/validate fail locally with Plugin did not respond, actual cause (TF_LOG=ERROR): transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority.

    Root cause confirmed: not a call to Azure — this is Terraform's own internal IPC between the main process and each provider plugin subprocess (a self-signed cert Terraform generates fresh per run for that local loopback channel). Same underlying cause family as #32 (Norton's local TLS interception), but reaching all the way into loopback (127.0.0.1) traffic rather than just external calls.

    Actions taken, in order:

    1. Confirmed the failure happens with zero network activity (terraform init -backend=false, pure local schema loading) — ruled out any Azure API involvement.
    2. Confirmed it reproduces identically against the pre-existing, previously-working infra/terraform-prod stack — an environment issue on this machine, not a defect in the newly-added terraform-test/terraform-staging stacks.
    3. Ruled out clock/time skew (w32tm showed sync within ~0.1s).
    4. Ruled out a Terraform version regression — tested 1.9.8 side-by-side with the installed 1.15.6, both failed identically against the same provider binaries.
    5. Ruled out a corrupted local cache — deleted .terraform/, fresh init, same failure.
    6. Found Norton-owned environment variables (SSLKEYLOGFILE, NODE_EXTRA_CA_CERTS pointing at Norton's wscert.pem) and confirmed a dozen+ active Norton kernel/filesystem-filter drivers (nllMonFlt, nllNetHub, nllRdr, etc.) plus a running Norton Firewall service — consistent with interception reaching loopback sockets, not just external traffic.

    Decision: same as #32 — declined to change any Norton settings. Norton's configuration remains untouched throughout this investigation.

    Outcome: no local fix exists within the given constraints. Closing as not planned — same path forward as #32: Azure Cloud Shell, which runs terraform entirely outside this machine.

  6. amar-python commented on Oct 25, 2026

    @amar-python
    OwnerAuthor

    Automated verification: FAIL (verify_issues.py, 2026-10-25)

    Cannot be verified from GitHub: it is a property of the dev machine. Verify locally with terraform -chdir=infra/terraform-prod init -backend=false then terraform -chdir=infra/terraform-prod validate; it passes when validate exits 0.


    Generated by Claude Code

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions