Skip to content

Commit

Permalink
ADD format logic to get role name param (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeyh authored Oct 3, 2024
1 parent ea3eec1 commit 5a7e7ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sysdig/resource_sysdig_monitor_cloud_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sysdig
import (
"context"
"strconv"
"strings"
"time"

v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2"
Expand Down Expand Up @@ -185,7 +186,7 @@ func monitorCloudAccountToResourceData(data *schema.ResourceData, cloudAccount *
return err
}

err = data.Set("role_name", cloudAccount.Credentials.RoleName)
err = data.Set("role_name", strings.Split(cloudAccount.Credentials.RoleName, ":role/")[1])
if err != nil {
return err
}
Expand Down

0 comments on commit 5a7e7ce

Please sign in to comment.