File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
cluster/pulumi/common/src Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ const createKmsServiceAccount = (
3333 } ;
3434 const serviceAccountName = migrationIdSuffixed (
3535 `${ CLUSTER_BASENAME } -${ xns . logicalName } -kms` ,
36- migrationId
36+ migrationId ,
37+ true
3738 ) ;
3839 const kmsServiceAccount = new GcpServiceAccount ( serviceAccountName , {
3940 accountId : serviceAccountName ,
@@ -109,5 +110,16 @@ export const getParticipantKmsHelmResources = (
109110 } ;
110111} ;
111112
112- const migrationIdSuffixed = ( name : string , migrationId ?: DomainMigrationIndex ) =>
113- migrationId != undefined ? `${ name } -migration-${ migrationId } ` : name ;
113+ function migrationIdSuffixed (
114+ name : string ,
115+ migrationId ?: DomainMigrationIndex ,
116+ limit30 ?: boolean
117+ ) : string {
118+ if ( migrationId === undefined ) {
119+ return name ;
120+ }
121+ const longName = `${ name } -migration-${ migrationId } ` ;
122+ // error: gcp:serviceaccount/account:Account
123+ // resource..."account_id"...must be between 6 and 30 characters long
124+ return limit30 && longName . length > 30 ? `${ name } -mg-${ migrationId } ` : longName ;
125+ }
You can’t perform that action at this time.
0 commit comments