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

entity_id attribute in 3.10.0 causes keycloak_saml_identity_provider.provide resource replacement

Open xueshanf opened this issue 2 years ago • 0 comments

We are trying to upgrade from version = "= 2.0.0" to 3.10.0.

Noticed that this is a breaking change. Is it safe to apply? I tried to remove the resource from the terraform state, and import it, but no entity_id in the imported resources, so the terraform plan/apply will still want to replace the resource.

# module.example_com_example_idp.keycloak_saml_identity_provider.provider must be replaced
-/+ resource "keycloak_saml_identity_provider" "provider" {
      - authn_context_class_refs      = [] -> null
      - authn_context_decl_refs       = [] -> null
      + entity_id                     = "https://example.com"
      - extra_config                  = {} -> null
      ~ id                            = "example idp" -> (known after apply)
      ~ internal_id                   = "a62b8413-97e1-4071-8035-c9d03d80b25f" -> (known after apply)
      + provider_id                   = "saml"
      ~ realm                         = "example-realm" -> (known after apply) # forces replacement
        # (23 unchanged attributes hidden)
    }

It cases many other resources to be destroyed/replaced, because the change.

Shouldn't import bring the entity_id into Terraform state?

xueshanf avatar Sep 01 '22 19:09 xueshanf