terraform-provider-okta: app_user_schema_property: cannot use country code & language code data types
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
1.1.7
Affected Resource(s)
- okta_app_user_schema_property
Terraform Configuration Files
resource "okta_app_user_schema_property" "example" {
app_id = "<app id>"
index = "customPropertyName"
title = "customPropertyName"
type = "string"
description = "My custom property name"
master = "OKTA"
scope = "SELF"
}
Expected Behavior
Should be able to use country code and language code (data) types.
Actual Behavior
Cannot.
References
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29
I don’t have any new status on this issue.
I’ll have to add this in to
okta_app_user_schema_propertynow, re-openingI have created an internal ticket to address this issue (OKTA-486203)
A quick update from Okta:
Thank you, @monde, I appreciate the detailed answer. It is unfortunate that this is the case since it is possible to select a field of this type through the UI itself. I would love to hear as long as there are updates to adding an official API, and in the meantime - I would definitely consider adding a cURL provider.
@E-RELevant I have some better information from my colleague @noinarisak. Thanks for being patient with me while trying to run this down. What you are trying to do is create a custom property of type
string, with formatcountry-codeorlanguage-code(per your examples). Side note: all of the Okta formats areuri,date-time,email,ref-id,encrypted,hashed,country-code,language-code,locale,timezone.Here is a curl example:
If the Terraform provider supported this, a config might look like:
However, if you look at the public API documentation for
POST /api/v1/meta/schemas/apps/${appId}/defaulthttps://developer.okta.com/docs/reference/api/schemas/#app-user-profile-schema-property-object you’ll noticeformatis not documented in the schemas, but there are some examples whereformatis set toemail.Unfortunately, as a rule, we don’t call internal API endpoints from the terraform provider, and we don’t call public API endpoints with undocumented attributes. That said, this seems like it is in the gray zone for not supporting undocumented attributes when the examples do reference a format. Also, this code path goes through
okta-sdk-golangso we’d need to get that updated first.I don’t have a timeline on when we might fix this. But as @noinarisak pointed out to me, we can at least show you how to call the public API with an undocumented parameter. Perhaps you could add a curl provider to perform this action in your tf config.
@E-RELevant I will ask around internally and see if I can get an exact answer for you.