Skip to content

Commit b488760

Browse files
authored
Merge pull request #1736 from ioito/automated-cherry-pick-of-#1734-upstream-release-4.0.2
Automated cherry pick of #1734: fix(aws): avoid duplicate aws account name
2 parents 52736a4 + ebde2e9 commit b488760

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/multicloud/aws/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func (awscli *SAwsClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
274274
subAccount.HealthStatus = api.CLOUD_PROVIDER_HEALTH_NO_PERMISSION
275275
}
276276
subAccount.Name = account.ID
277-
if len(account.Name) > 0 {
277+
if len(account.Name) > 0 && account.Name != account.ID {
278278
subAccount.Name = fmt.Sprintf("%s/%s", account.Name, account.ID)
279279
}
280280
subAccount.Account = fmt.Sprintf("%s/%s", awscli.accessKey, account.ID)

0 commit comments

Comments
 (0)