pingidentity / terraform-provider-pingone

Terraform PingOne provider
https://registry.terraform.io/providers/pingidentity/pingone/
Mozilla Public License 2.0
13 stars 5 forks source link

Known limitation: Cannot update the `default` computed parameter on resources, to set that resource as the default for an environment #463

Open patrickcping opened 1 year ago

patrickcping commented 1 year ago

Community Note

Description

Some resources (listed below) have the ability to be set as default in a PingOne environment through a default parameter on the API. Those resources have the default attribute, but it is read-only (computed). Therefore it's not possible to set that resource as the default for the environment.

This has the consequence of not being able to update the configuration of the default instance of that resource, and it is left unmanaged by Terraform.

These resources are typically created by the platform bootstrap routine, and so their lifecycle is initially managed by the platform itself (or claimed by an out-of-band customer driven process), not this Terraform provider.

Request is to:

  1. (Primary objective) bring these resources under lifecycle control of the Terraform provider
  2. (Secondary objective) be able to change the value of the default parameter for a resource from true => false and false => true. This objective has a limitation as described below

New or Affected Resource(s)

API Limitation on the default parameter

The API limitation is as follows:

The expected mitigation of this limitation is a change to the API behaviour.

Tracked in STAGING-20045

Mitigated resources

The following resources have been mitigated as follows:

pingone_branding_theme (pingone_branding_theme_default)

The pingone_branding_theme resource has a dedicated API to be able to set and retrieve the default with and the provider implements the pingone_branding_theme_default that uses that API. This allows the admin to explicitly set the default without incurring the API limitation above.

pingone_language (pingone_language_update)

The pingone_language resource has the ability to overcome the API limitations by using the global default en language, which has a static in every customer environment, and by implementing the pingone_language_update resource. This allows the admin to explicitly set the default without incurring the API limitation above.

pingone_population (pingone_population_default)

The pingone_population_default resource is a variant of the pingone_population resource, and allows the admin to configure the default population for an environment, with the following behaviours:

patrickcping commented 7 months ago

@dbryar Referencing question raised here: https://github.com/pingidentity/terraform-provider-pingone/issues/310#issuecomment-1913932871

Is there any update to the issues surrounding the inability to set defaults?

Not yet - we've had the confirmation that the ideal fix (changes to the API) are a heavier lift and not currently planned. I have a plan as to how to work around the conflicts described in this issue but it will take time to pull together. I'll update here as I know more