mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #3663 from semarj/master
get profile name even if profile path exists
This commit is contained in:
commit
e273fe6cfc
@ -1085,5 +1085,6 @@ func iamInstanceProfileArnToName(ip *ec2.IamInstanceProfile) string {
|
||||
if ip == nil || ip.Arn == nil {
|
||||
return ""
|
||||
}
|
||||
return strings.Split(*ip.Arn, "/")[1]
|
||||
parts := strings.Split(*ip.Arn, "/")
|
||||
return parts[len(parts)-1]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user