Skip to content

Commit

Permalink
Merge pull request #60 from fortanix/devops-4121
Browse files Browse the repository at this point in the history
user_email is not case-insensitive.
  • Loading branch information
ravigfortanix authored Aug 21, 2023
2 parents 9f43a33 + aef4e95 commit 7c591cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dsm/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package dsm
import (
"context"
"fmt"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down Expand Up @@ -39,7 +40,7 @@ func dataSourceUserRead(ctx context.Context, d *schema.ResourceData, m interface

user_id := ""
for _, data := range req {
if data.(map[string]interface{})["user_email"].(string) == d.Get("user_email").(string) {
if strings.ToLower(data.(map[string]interface{})["user_email"].(string)) == strings.ToLower(d.Get("user_email").(string)) {
user_id = data.(map[string]interface{})["user_id"].(string)
if err := d.Set("user_email", d.Get("user_email").(string)); err != nil {
return diag.FromErr(err)
Expand Down

0 comments on commit 7c591cb

Please sign in to comment.