Skip to content

Commit ccaccad

Browse files
authored
adds check if key has a Known value (#2620)
1 parent 11db05a commit ccaccad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

okta/services/idaas/resource_okta_authenticator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func resourceAuthenticator() *schema.Resource {
2626
func(ctx context.Context, req schema.ValidateResourceConfigFuncRequest, resp *schema.ValidateResourceConfigFuncResponse) {
2727
keyAttrExists := !req.RawConfig.GetAttr("key").IsNull()
2828
legacyIgnoreNameAttrExists := !req.RawConfig.GetAttr("legacy_ignore_name").IsNull()
29-
if keyAttrExists && req.RawConfig.GetAttr("key").AsString() == "custom_app" {
29+
if keyAttrExists && req.RawConfig.GetAttr("key").IsKnown() && req.RawConfig.GetAttr("key").AsString() == "custom_app" {
3030
if !legacyIgnoreNameAttrExists || legacyIgnoreNameAttrExists && req.RawConfig.GetAttr("legacy_ignore_name").True() {
3131
resp.Diagnostics = append(resp.Diagnostics, diag.Errorf("legacy_ignore_name must be false when creating a custom_app type authenticator")...)
3232
}

0 commit comments

Comments
 (0)