Loading...
Loading...
### Terraform Version ```shell Terraform v1.3.9 ``` ### Terraform Configuration Files ```terraform resource "local_file" "foo" { content = "foo!" filename = "${path.module}/foo.bar" } ``` ### Debug Output ``` 2023-03-06T23:54:49.211+0100 [INFO] Terraform version: 1.3.9 2023-03-06T23:54:49.211+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0 2023-03-06T23:54:49.211+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.0 2023-03-06T23:54:49.211+0100 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2 2023-03-06T23:54:49.211+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 2023-03-06T23:54:49.211+0100 [DEBUG] using github.com/zclconf/go-cty v1.12.1 2023-03-06T23:54:49.211+0100 [INFO] Go runtime version: go1.19.6 2023-03-06T23:54:49.211+0100 [INFO] CLI args: []string{"./terraform", "validate"} 2023-03-06T23:54:49.211+0100 [TRACE] Stdout is a terminal of width 106 2023-03-06T23:54:49.211+0100 [TRACE] Stderr is a terminal of width 106 2023-03-06T23:54:49.211+0100 [TRACE] Stdin is a terminal 2023-03-06T23:54:49.211+0100 [DEBUG] Attempting to open CLI config file: /home/terje.larsen/.terraformrc 2023-03-06T23:54:49.211+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /home/terje.larsen/.terraform.d/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /home/terje.larsen/.local/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /nix/var/nix/profiles/default/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /home/terje.larsen/.nix-profile/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/ubuntu/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /nix/var/nix/profiles/default/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /home/terje.larsen/.nix-profile/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/ubuntu/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins 2023-03-06T23:54:49.211+0100 [DEBUG] ignoring non-existing provider search directory /var/lib/snapd/desktop/terraform/plugins 2023-03-06T23:54:49.211+0100 [INFO] CLI command args: []string{"validate"} 2023-03-06T23:54:49.212+0100 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers 2023-03-06T23:54:49.212+0100 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/hashicorp/local v2.3.0 for linux_amd64 at .terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64 2023-03-06T23:54:49.212+0100 [TRACE] providercache.fillMetaCache: including .terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64 as a candidate package for registry.terraform.io/hashicorp/local 2.3.0 2023-03-06T23:54:49.261+0100 [DEBUG] checking for provisioner in "." 2023-03-06T23:54:49.261+0100 [DEBUG] checking for provisioner in "/home/terje.larsen/terraform_test" 2023-03-06T23:54:49.262+0100 [TRACE] terraform.NewContext: starting 2023-03-06T23:54:49.262+0100 [TRACE] terraform.NewContext: complete 2023-03-06T23:54:49.262+0100 [DEBUG] Building and walking validate graph 2023-03-06T23:54:49.262+0100 [TRACE] building graph for walkValidate 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.ConfigTransformer 2023-03-06T23:54:49.262+0100 [TRACE] ConfigTransformer: Starting for path: 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.ConfigTransformer with new graph: local_file.foo - *terraform.NodeValidatableResource ------ 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.RootVariableTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.RootVariableTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.ModuleVariableTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.ModuleVariableTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.LocalTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.LocalTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.OutputTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.OutputTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.OrphanResourceInstanceTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.OrphanResourceInstanceTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.StateTransformer 2023-03-06T23:54:49.262+0100 [TRACE] StateTransformer: pointless no-op call, creating no nodes at all 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.StateTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.AttachStateTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.OrphanOutputTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.OrphanOutputTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.AttachResourceConfigTransformer 2023-03-06T23:54:49.262+0100 [TRACE] AttachResourceConfigTransformer: attaching to "local_file.foo" (*terraform.NodeValidatableResource) config from main.tf:1,1-28 2023-03-06T23:54:49.262+0100 [TRACE] AttachResourceConfigTransformer: attaching provider meta configs to local_file.foo 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.AttachResourceConfigTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.graphTransformerMulti 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderConfigTransformer 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderConfigTransformer with new graph: local_file.foo - *terraform.NodeValidatableResource ------ 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.MissingProviderTransformer 2023-03-06T23:54:49.262+0100 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/local"], implied first by local_file.foo 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.MissingProviderTransformer with new graph: local_file.foo - *terraform.NodeValidatableResource provider["registry.terraform.io/hashicorp/local"] - *terraform.NodeApplyableProvider ------ 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.ProviderTransformer 2023-03-06T23:54:49.262+0100 [TRACE] ProviderTransformer: exact match for provider["registry.terraform.io/hashicorp/local"] serving local_file.foo 2023-03-06T23:54:49.262+0100 [DEBUG] ProviderTransformer: "local_file.foo" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/local"] 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.ProviderTransformer with new graph: local_file.foo - *terraform.NodeValidatableResource provider["registry.terraform.io/hashicorp/local"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/hashicorp/local"] - *terraform.NodeApplyableProvider ------ 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Executing graph transform *terraform.PruneProviderTransformer 2023-03-06T23:54:49.262+0100 [TRACE] (graphTransformerMulti) Completed graph transform *terraform.PruneProviderTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.graphTransformerMulti with new graph: local_file.foo - *terraform.NodeValidatableResource provider["registry.terraform.io/hashicorp/local"] - *terraform.NodeApplyableProvider provider["registry.terraform.io/hashicorp/local"] - *terraform.NodeApplyableProvider ------ 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.RemovedModuleTransformer 2023-03-06T23:54:49.262+0100 [TRACE] Completed graph transform *terraform.RemovedModuleTransformer (no changes) 2023-03-06T23:54:49.262+0100 [TRACE] Executing graph transform *terraform.AttachSchemaTransformer 2023-03-06T23:54:49.262+0100 [TRACE] terraform.contextPlugins: Initializing provider "registry.terraform.io/hashicorp/local" to read its schema 2023-03-06T23:54:49.262+0100 [DEBUG] created provider logger: level=trace 2023-03-06T23:54:49.262+0100 [INFO] provider: configuring client automatic mTLS 2023-03-06T23:54:49.284+0100 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64/terraform-provider-local_v2.3.0_x5 args=[.terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64/terraform-provider-local_v2.3.0_x5] 2023-03-06T23:54:49.284+0100 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64/terraform-provider-local_v2.3.0_x5 pid=3018006 2023-03-06T23:54:49.284+0100 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64/terraform-provider-local_v2.3.0_x5 2023-03-06T23:54:49.288+0100 [ERROR] provider.terraform-provider-local_v2.3.0_x5: plugin init error: error="listen unix /tmp/tmp.bUsrhhhWdZ-this-is-a-very-very-very-very-very-very-very-very-very-very-long-long-path/plugin1330923084: bind: invalid argument" timestamp=2023-03-06T23:54:49.288+0100 2023-03-06T23:54:49.289+0100 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.3.0/linux_amd64/terraform-provider-local_v2.3.0_x5 pid=3018006 2023-03-06T23:54:49.289+0100 [TRACE] Completed graph transform *terraform.AttachSchemaTransformer (no changes) ╷ │ Error: failed to read schema for local_file.foo in registry.terraform.io/hashicorp/local: failed to instantiate provider "registry.terraform.io/hashicorp/local" to obtain schema: Unrecognized remote plugin message: │ │ This usually means that the plugin is either invalid or simply │ needs to be recompiled to support the latest protocol. │ │ ╵ 2023-03-06T23:54:49.289+0100 [WARN] provider: plugin failed to exit gracefully ``` ### Expected Behavior Validation should work without errors. ### Actual Behavior Plugin resolution fails: ``` ╷ │ Error: failed to read schema for local_file.foo in registry.terraform.io/hashicorp/local: failed to instantiate provider "registry.terraform.io/hashicorp/local" to obtain schema: Unrecognized remote plugin message: │ │ This usually means that the plugin is either invalid or simply │ needs to be recompiled to support the latest protocol. ``` ### Steps to Reproduce 1. `TMPDIR="$(mktemp --directory --suffix -this-is-a-very-very-very-very-very-very-very-very-very-very-long-long-path)"` 2. `export TMPDIR` 3. `export TF_LOG=TRACE` 4. `terraform init -backend=false` 5. `terraform validate` ### Additional Context I discovered this when using a build environment that sets a unique TMPDIR for each build and it is based on the name of the build target. Which in my case turned out to be quite long. ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.