terraform-provider-vault icon indicating copy to clipboard operation
terraform-provider-vault copied to clipboard

[Bug]:

Open 0x416e746f6e opened this issue 5 months ago • 0 comments
trafficstars

Terraform Core Version

v1.10.4

Terraform Vault Provider Version

5.0.0

Vault Server Version

v1.18.1

Affected Resource(s)

there is an error:

╷
│ Error: Invalid Path Expression for Schema
│ 
│   with provider["registry.terraform.io/hashicorp/vault"].local,
│   on _providers.tf line 100, in provider "vault":
│  100: provider "vault" {
│ 
│ The Terraform Provider unexpectedly provided a path expression that does not match the current schema. This can happen if the path
│ expression does not correctly follow the schema in structure or types. Please report this to the provider developers.
│ 
│ Path Expression: auth_login_gcp[0].jwt.credentials
╵

with the following configuration of the provider:

data "google_service_account_jwt" "this" {
  target_service_account = "[email protected]"
  expires_in             = 300

  payload = jsonencode({
    sub = "[email protected]"
    aud = "vault/terraform"
  })
}

provider "vault" { # <= line #100 is here
  alias = "local"

  address      = "https://foo.bar"
  ca_cert_file = "path/to/cert.crt"

  auth_login_gcp {
    mount = "gcp"
    role  = "terraform"
    jwt   = data.google_service_account_jwt.this.jwt
  }
}

downgrading the provider to 4.8.0 resolves the problem.

Expected Behavior

no error

Actual Behavior

╷
│ Error: Invalid Path Expression for Schema
│ 
│   with provider["registry.terraform.io/hashicorp/vault"].local,
│   on _providers.tf line 100, in provider "vault":
│  100: provider "vault" {
│ 
│ The Terraform Provider unexpectedly provided a path expression that does not match the current schema. This can happen if the path
│ expression does not correctly follow the schema in structure or types. Please report this to the provider developers.
│ 
│ Path Expression: auth_login_gcp[0].jwt.credentials
╵

Relevant Error/Panic Output Snippet


Terraform Configuration Files

data "google_service_account_jwt" "this" {
  target_service_account = "[email protected]"
  expires_in             = 300

  payload = jsonencode({
    sub = "[email protected]"
    aud = "vault/terraform"
  })
}

provider "vault" { # <= line #100 is here
  alias = "local"

  address      = "https://foo.bar"
  ca_cert_file = "path/to/cert.crt"

  auth_login_gcp {
    mount = "gcp"
    role  = "terraform"
    jwt   = data.google_service_account_jwt.this.jwt
  }
}

Steps to Reproduce

  • setup terraform provider with GCP auth for vault
  • run terraform plan

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

0x416e746f6e avatar May 27 '25 07:05 0x416e746f6e