Skip to content

Commit 1cd9342

Browse files
committed
Remove pattern patching to match documentation and allow other aws partitions to work
Signed-off-by: Ryan Dyer <ryan.dyer@che-world.net>
1 parent abfe884 commit 1cd9342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kms/keysource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ func NewMasterKeyWithProfile(arn string, role string, context map[string]*string
108108
func NewMasterKeyFromArn(arn string, context map[string]*string, awsProfile string) *MasterKey {
109109
key := &MasterKey{}
110110
arn = strings.Replace(arn, " ", "", -1)
111+
roleIndex := strings.Index(arn, "+")
111112
key.Arn = arn
112-
roleIndex := strings.Index(arn, "+arn:aws:iam::")
113113
if roleIndex > 0 {
114114
// Overwrite ARN
115115
key.Arn = arn[:roleIndex]

0 commit comments

Comments
 (0)