Open tgoodsell-tempus opened 11 months ago
@tgoodsell-tempus can you elaborate on this? We are not really sure what the issue is and how to reproduced that. None of the field in the debug log is computed.
@duytiennguyen-okta @monde The proper explanation of these messages, and the issue I'm raising, is best explained by this Terraform document on the topic: https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/data-consistency-errors
The TLDR is, having the schema configurations not properly set basically leads to potentially unexpected or confusing behavior by users of this resource, particularly when referencing these arguments/attributes, in other resources/data sources/modules.
@tgoodsell-tempus I see. Okta internal reference https://oktainc.atlassian.net/browse/OKTA-668896
@duytiennguyen-okta I'm going to make a pass at one of these, however, it looks like there's a few callouts in the doc basically stating we can't fix this in SDKv2
, only going to terraform-provider-framework
. So we may just want to mark the "unfixable" in SDKv2 as a "be careful of strange errors when using this".
@tgoodsell-tempus Not necessarily, basically I take a look at the code and a lot of the value you mention could just be fixed by adding Computed: true. https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/data-consistency-errors#resolving-data-consistency-errors. There might be more to it than meet the eye but we can decide if it worth our time to do it or just move to v3. Where is the callout you're talking about?
@duytiennguyen-okta The callout mentioned would be the third larger paragraph under this section specifically: https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/data-consistency-errors#planned-value-for-a-non-computed-attribute
Community Note
Terraform Version
1.5.3
Affected Resource(s)
okta_app_oauth
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Computed should be set on values which are auto set by Okta.
Can this be done in the Admin UI?
N/A
Can this be done in the actual API call?
N/A
Actual Behavior
Values are being set during READ but the schema is not ready.
Steps to Reproduce
Important Factoids
References
0000