-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable custom OTP on okta_authenticator #1864
Conversation
okta/resource_okta_authenticator.go
Outdated
@@ -263,7 +287,9 @@ func buildAuthenticator(d *schema.ResourceData) (*sdk.Authenticator, error) { | |||
Key: d.Get("key").(string), | |||
Name: d.Get("name").(string), | |||
} | |||
if d.Get("type").(string) == "security_key" { | |||
if d.Get("key").(string) == "custom_otp" { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty if statement
@@ -150,15 +150,9 @@ func findAuthenticator(ctx context.Context, m interface{}, name, key string) (*s | |||
return nil, err | |||
} | |||
for _, authenticator := range authenticators { | |||
if authenticator.Name == name { | |||
if authenticator.Name == name && authenticator.Key == key { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause breaking change
@@ -31,9 +31,6 @@ func resourceAuthenticator() *schema.Resource { | |||
Type: schema.TypeString, | |||
Required: true, | |||
Description: "Display name of the Authenticator", | |||
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to remove this?
Change Summary
This pull request introduces Custom OTP functionality to the Okta provider in Terraform. It also addresses an issue where the correct authenticator was not being selected due to the absence of a specified name.
Technical Details