Skip to content

Commit

Permalink
fix(cli-lib-alpha): bootstrap fails with "bad argument name" error fo…
Browse files Browse the repository at this point in the history
…r trust and trustForLookup (#31159)

### Issue

Closes #30404

### Reason for this change

`trust` and `trustForLookup` options are overwriting `qualifier`, so it's impossible to bootstrap a new account with these options.

### Description of changes

Fix the assignment.

### Description of how you validated changes

Manual test. The testing infrastructure currently doesn't support this kind of test I think.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mrgrain committed Aug 21, 2024
1 parent c7980a2 commit b11ca4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cli-lib-alpha/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ export class AwsCdkCli implements IAwsCdkCli {
...options.template ? ['--template', options.template] : [],
...options.customPermissionsBoundary ? ['--custom-permissions-boundary', options.customPermissionsBoundary] : [],
...options.qualifier ? ['--qualifier', options.qualifier] : [],
...options.trust ? ['--qualifier', options.trust] : [],
...options.trustForLookup ? ['--qualifier', options.trustForLookup] : [],
...options.trust ? ['--trust', options.trust] : [],
...options.trustForLookup ? ['--trust-for-lookup', options.trustForLookup] : [],
...options.bootstrapKmsKeyId ? ['--bootstrap-kms-key-id', options.bootstrapKmsKeyId] : [],
...options.bootstrapCustomerKey ? ['--bootstrap-customer-key', options.bootstrapCustomerKey] : [],
...options.publicAccessBlockConfiguration ? ['--public-access-block-configuration', options.publicAccessBlockConfiguration] : [],
Expand Down

0 comments on commit b11ca4a

Please sign in to comment.