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

Unable to import application_role

Open epbensimpson opened this issue 3 years ago • 3 comments

Seems like it's currently not possible to terraform import an application_role, it gives an error even when the role definitely exists for the specified application. I believe this is due to the fact it's using ImportStatePassthroughContext but relies on the application_id to retrieve the roles.

Per the documentation, for the passthrough function to work the read method must be able to load the resource using only data.Id(). Because the read method is relying on application_id, it doesn't work. Seems like a custom import function is required to support this properly?

I assume the same issue applies to entity_type_permission which is where the read function appears to have been copied from, but I haven't tested that.

epbensimpson avatar Jan 17 '22 01:01 epbensimpson