Skip to content

Commit

Permalink
resourceop cdk: if the CDK stack specifies a reigon use it
Browse files Browse the repository at this point in the history
We would only bootstrap in the region from the current config before.
This allows the Stack to override the region for CDK
  • Loading branch information
dschofie committed May 12, 2024
1 parent 86259e4 commit 34c41b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resourceoperation/cdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (co *cdkOperation) Call(ctx context.Context) error {
return err
}

if co.Stack.Region != "" {
region = co.Stack.Region
}

// We must bootstrap cdk with the account role.
bootstrapCDK := bootstrapCDK(creds, region, *co.Account, co.Stack)
if err := co.OutputUI.RunCmd(bootstrapCDK, *co.Account); err != nil {
Expand Down

0 comments on commit 34c41b9

Please sign in to comment.