Known limitation: Cannot update the default
computed parameter on resources, to set that resource as the default for an environment
#463
Labels
service/base
PingOne Platform
service/mfa
PingOne MFA
service/protect
PingOne Protect
service/sso
PingOne SSO
service/verify
PingOne Verify
status/blocked/upstream-api
The issue/PR is blocked by an upstream API
type/enhancement
New feature or request
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 thedefault
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:
default
parameter for a resource fromtrue
=>false
andfalse
=>true
. This objective has a limitation as described belowNew or Affected Resource(s)
pingone_branding_theme
(mitigated - see below)pingone_key
pingone_language
(mitigated - see below)pingone_mfa_fido_policy
(deprecated)pingone_mfa_fido2_policy
pingone_mfa_policy
pingone_notification_policy
pingone_population
(mitigated - see below)pingone_environment
resource #462pingone_risk_policy
pingone_sign_on_policy
pingone_verify_policy
API Limitation on the
default
parameterThe API limitation is as follows:
default
is configuredfalse
=>true
via a PUT request, it "claims" the default from the resource that previously had it. This has the potential to cause state inconsistency where thedefault
value is stored in state astrue
for one resource, but is then changed by a different resource processed later in theapply
phase. The platform will then be out of sync with the state.default
is configuredtrue
=>false
, this throws an API error, as it is expected that a different resource "claims" the default. There must be a different resource ready to be assigned thedefault = true
value, and if configured in Terraform HCL, it must be guaranteed to run it's PUT API first.apply
phase and the intended resource is created later in theapply
phase, this will leave redundant and unspecified (in HCL) configuration in the environment.default
fromtrue
=>false
in one resource, and settingdefault
fromfalse
=>true
in another resource, a locked situation might arise whereby if thetrue
=>false
is run first, the API error will abort theapply
before the other resource is run. In this case, it would not be possible to change defaults between multiple resources of the same type. If this error is ignored, other changes in that environment would not take effect and would display inconsistent state errors as the end of theapply
phase.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 thepingone_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 defaulten
language, which has a static in every customer environment, and by implementing thepingone_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 thepingone_population
resource, and allows the admin to configure the default population for an environment, with the following behaviours:pingone_population_default
is created, the population will be created as normal.pingone_population_default
is created, the resource will assume control over the default population (assuming it is unmanaged)pingone_population_default
resource is destroyed, the population will not be deleted from the PingOne service - it will instead be left in place and removed from Terraform management. This is because there is an API restriction such that there must be one default population for an environment, once one is created.pingone_population_default
resource should be configured per PingOne environment, as a PingOne environment can only have one default population.The text was updated successfully, but these errors were encountered: