okta / terraform-provider-okta

A Terraform provider to manage Okta resources, enabling infrastructure-as-code provisioning and management of users, groups, applications, and other Okta objects.
https://registry.terraform.io/providers/okta/okta
Mozilla Public License 2.0
259 stars 209 forks source link

TF cannot pass a value in rsa "provider_user_name_template" field #2072

Open rluo2024 opened 3 months ago

rluo2024 commented 3 months ago

Hi Folks,

When I try to create RSA authenticators in Okta by TF, I got the error below:

│ Error: failed to update authenticator: the API returned an error: Api validation failed: provider.configuration.userNameTemplate.template. Causes: errorSummary: provider.configuration.userNameTemplate.template: The field cannot be left blank

with okta_authenticator.okta_rsa1, on [authenticators.tf] line 86, in resource "okta_authenticator" "okta_rsa1": 86: resource "okta_authenticator" "okta_rsa1" {

Here is the resource in [authenticators.tf]:

resource "okta_authenticator" "okta_rsa1" {
key = "rsa_token" name = "RSA SecurID" provider_auth_port = 1645 provider_hostname = "[xxx.xxxx.xxxl.ca]
provider_user_name_template = "global.assign.userName.ad.sam" provider_shared_secret = "${var.rsa_password}" status = "ACTIVE"
}

does anyone know how to fix it? Thanks, Ray

duytiennguyen-okta commented 3 months ago

Yeah this is a bug that is need to be fixed

duytiennguyen-okta commented 3 months ago

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-797524