Loading...
Loading...
### Terraform Version ```shell Experienced first in v1.13.3 and again when downgrading to v1.13.0 ``` ### Terraform Configuration Files ```terraform # _config.tf provider "vault" { # ... other config ... auth_login { parameters = { # ... other config ... tfe-credentials-file = filebase64("${path.cwd}/../../../.terraformrc") } } } ``` ```terraform # main.tf module "creds" { source = "../modules/creds" # ... other config ... } ``` ```terraform # modules/creds/main.tf # ... other config ... resource "vault_kv_secret_v2" "password" { # ... other config ... } ``` Vault is configured with this plugin: https://github.com/gitrgoliveira/vault-plugin-auth-tfe ### Debug Output Apologies not in debug mode but here is an amended stdout during `terraform apply` ``` │ Error: Error in function call │ │ on _config.tf line 43, in provider "vault": │ 43: tfe-credentials-file = filebase64("${path.cwd}/../../../.terraformrc") │ ├──────────────── │ │ while calling filebase64(path) │ │ path.cwd is "" │ │ Call to function "filebase64" failed: function returned an inconsistent │ result. ``` ### Expected Behavior `terraform apply` should continue past the provider setup, creating the new Vault resources as expected e.g. ``` Terraform v1.13.3 on linux_amd64 Initializing plugins and modules... module.creds[0].vault_kv_secret_v2.password: Creating... module.creds[0].vault_kv_secret_v2.password: Creation complete after 0s [id=example/secret/data/password] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. ``` ### Actual Behavior ``` │ Error: Error in function call │ │ on _config.tf line 43, in provider "vault": │ 43: tfe-credentials-file = filebase64("${path.cwd}/../../../.terraformrc") │ ├──────────────── │ │ while calling filebase64(path) │ │ path.cwd is "" │ │ Call to function "filebase64" failed: function returned an inconsistent │ result. ``` ### Steps to Reproduce 1. `terraform init` 2. `terraform apply` ### Additional Context * Terraform running in `Agent` mode in TFC/HCP Terraform. * Workspace was upgraded from v1.5.7 -> 1.13.3 initially and then unexpected behavior occurred later when config was added to create `vault` provider resources * The error received from the provider only occurs at `apply` , not on `plan`. * We downgraded to v1.12.2 and no longer received the error. ### References Potentially related: https://github.com/hashicorp/terraform/pull/37001, associated to https://github.com/hashicorp/terraform/issues/36184 Vault Plugin: https://github.com/gitrgoliveira/vault-plugin-auth-tfe, of note: > TFE/TFC generates a different token during plan and the apply stages ### Generative AI / LLM assisted development? N/A
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.