Skip to content

Commit

Permalink
added if block for redacted credentials
Browse files Browse the repository at this point in the history
Signed-off-by: apoorva9s14 <apoorvalaiti16@gmail.com>
  • Loading branch information
apoorva9s14 authored and hkantare committed Aug 5, 2022
1 parent a5fb03a commit 3b78b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibm/service/resourcecontroller/resource_ibm_resource_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ func resourceIBMResourceKeyRead(d *schema.ResourceData, meta interface{}) error
d.Set("status", *resourceKey.State)
if resourceKey.Credentials != nil && resourceKey.Credentials.Redacted != nil {
log.Printf("Credentials are redacted with code: %s.The User doesn't have the correct access to view the credentials. Refer to the API documentation for additional details.", *resourceKey.Credentials.Redacted)
} else if resourceKey.Credentials != nil && resourceKey.Credentials.IamRoleCRN != nil {
}
if resourceKey.Credentials != nil && resourceKey.Credentials.IamRoleCRN != nil {
roleCrn := *resourceKey.Credentials.IamRoleCRN
iamPolicyManagementClient, err := meta.(conns.ClientSession).IAMPolicyManagementV1API()
if err == nil {
Expand Down

0 comments on commit 3b78b34

Please sign in to comment.