terraform-provider-vault
terraform-provider-vault copied to clipboard
vault_identity_group resource fails to recreate group if missing from Vault
Terraform Version
1.2.4
Affected Resource(s)
- vault_identity_group
Terraform Configuration Files
resource "vault_identity_group" "this" {
name = "test"
type = "internal"
policies = ["this"]
member_entity_ids = null
}
Debug Output
Full gist example: https://gist.github.com/czembower/57288bdc796fca9e301abb50ac48ba05
Error: error checking if IdentityGroup "this" exists: entity not found: "/identity/group/id/a86ebf5a-56c1-ba33-a926-20675ab65ab6"
with vault_identity_group.this
on vault_oidc.tf line 5, in resource "vault_identity_group" "this":
resource "vault_identity_group" "this" {
Expected Behavior
Provider should create the missing resource
Actual Behavior
Provider errors, does not create missing resource. After removing the resource from the state file, the plan/apply succeeds.
Steps to Reproduce
- Create vault_identity_group via terraform
- Delete vault identity group via some means other than terraform
-
terraform plan
@czembower Facing the same issue during Plan time in our pipeline - following.