terraform-provider-vault
terraform-provider-vault copied to clipboard
Cannot refresh state if `vault_ldap_auth_backend` is missing from Vault
Terraform Version
Terraform v1.3.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/vault v3.11.0
Affected Resource(s)
-
vault_ldap_auth_backend
Terraform Configuration Files
resource "vault_ldap_auth_backend" "this" {
# attributes omitted
}
Debug Output
https://gist.github.com/anarsen/00e8c1fdafa820d5bcfceff80da5c48c
Expected Behavior
Terraform would realize the vault_ldap_auth_backend
doesn't exist during the refresh phase, and produce a plan to create it.
Actual Behavior
Errors out with this message
Error: auth mount ldap not present
I assume this is the offending code: https://github.com/hashicorp/terraform-provider-vault/blob/main/vault/resource_ldap_auth_backend.go#L346
Steps to Reproduce
-
vault server -dev
-
terraform apply
- Stop Vault dev server
-
vault server -dev
-
terraform apply
orterraform refresh