File tree Expand file tree Collapse file tree 5 files changed +8
-3
lines changed Expand file tree Collapse file tree 5 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { join } from 'path';
1818export interface AccountOptions {
1919 namespace : string ;
2020 zenkoName ?: string ;
21+ subdomain ?: string ;
2122 accounts ?: string [ ] ;
2223 configFile ?: string ;
2324}
@@ -77,7 +78,7 @@ export async function setupAccounts(options: AccountOptions): Promise<void> {
7778
7879 logger . info ( 'Connecting to management API...' ) ;
7980 const managementEndpoint = await getManagementEndpoint ( options . zenkoName , namespace ) ;
80- const authToken = await getManagementToken ( ) ;
81+ const authToken = await getManagementToken ( options . subdomain ) ;
8182
8283 for ( const accountConfig of accountsToCreate ) {
8384 try {
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ program
165165 workflowType : options . type ,
166166 instanceId,
167167 zenkoName : globalOptions . zenkoName ,
168+ subdomain : globalOptions . subdomain ,
168169 } ) ;
169170 } ) ;
170171
@@ -324,6 +325,7 @@ async function runSetup(options: any) {
324325 await setupAccounts ( {
325326 namespace : options . namespace ,
326327 zenkoName : options . zenkoName ,
328+ subdomain : options . subdomain ,
327329 accounts : options . accounts === true ? undefined : options . accounts , // Allow array of account names
328330 } ) ;
329331 setupFlags . accounts = true ;
@@ -357,6 +359,7 @@ async function runSetup(options: any) {
357359 configFile : options . workflowsConfig ,
358360 instanceId,
359361 zenkoName : options . zenkoName ,
362+ subdomain : options . subdomain ,
360363 } ) ;
361364 }
362365 } ) ;
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ export async function setupLocations(options: LocationsOptions): Promise<void> {
158158 }
159159
160160 const managementEndpoint = await getManagementEndpoint ( options . zenkoName , options . namespace ) ;
161- const token = await getManagementToken ( ) ;
161+ const token = await getManagementToken ( options . subdomain ) ;
162162
163163 const accountsCredentials : Record < string , AccountCredentials > = { } ;
164164 const crrSourceAccountName = process . env . CRR_SOURCE_ACCOUNT_NAME ;
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export interface WorkflowsOptions {
5151 namespace : string ;
5252 instanceId : string ;
5353 zenkoName ?: string ;
54+ subdomain ?: string ;
5455 configFile ?: string ;
5556 workflowType ?: 'replication' | 'lifecycle' | 'ingestion' ;
5657}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export async function setupWorkflows(options: WorkflowsOptions): Promise<void> {
2929 logger . info ( 'Setting up workflows via Management API' ) ;
3030
3131 const managementEndpoint = await getManagementEndpoint ( options . zenkoName , options . namespace ) ;
32- const authToken = await getManagementToken ( ) ;
32+ const authToken = await getManagementToken ( options . subdomain ) ;
3333
3434 const instanceId = options . instanceId ;
3535
You can’t perform that action at this time.
0 commit comments