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

[Bug]: vault_secrets_sync_association produce inconsitent result

Open shinji62 opened this issue 1 year ago • 0 comments

Terraform Core Version

1.9.3

Terraform Vault Provider Version

4.4.0

Vault Server Version

1.17.2

Affected Resource(s)

vault_secrets_sync_association

Expected Behavior

I would have expected Terraform to not fail after apply.

Actual Behavior

Terraform apply is failing with the following error Error: Provider produced inconsistent result after apply

Relevant Error/Panic Output Snippet

resource "vault_secrets_sync_association" "gai_secret_all" {
  name        = vault_secrets_sync_gcp_destination.gcp_gai_test.name
  namespace   = "mynamespace"
  type        = vault_secrets_sync_gcp_destination.gcp_gai_test.type
  mount       = "kv"
  secret_name = "gai/secret/aihub"
}


vault_secrets_sync_association.gai_secret_all: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to vault_secrets_sync_association.gai_secret_all, provider
│ "provider[\"registry.terraform.io/hashicorp/vault\"]" produced an unexpected new value:
│ Root object was present, but now absent.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue
│ tracker.

Terraform Configuration Files

It's difficult to provide all the Terraform as this include module and GCP related information so on. But I think that using a secret_name (path) like xx/yy should failed.

resource "vault_secrets_sync_association" "gai_secret_all" {
  name        = vault_secrets_sync_gcp_destination.gcp_gai_test.name
  namespace   = "mynamespace"
  type        = vault_secrets_sync_gcp_destination.gcp_gai_test.type
  mount       = "kv"
  secret_name = "gai/secret/aihub"
}

Steps to Reproduce

Just run terrraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

shinji62 avatar Oct 03 '24 00:10 shinji62