-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli-lib-alpha: bootstrap with bad argument name for trust and trustForLookup #30404
cli-lib-alpha: bootstrap with bad argument name for trust and trustForLookup #30404
Comments
Hi @juanenriqueescobar , thanks for reporting this. I am not able to repro the issue with the code . sharing the code which I tried- import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as cli from '@aws-cdk/cli-lib-alpha';
export class ClialphaIssueStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
const ClialphaIssueStack = cli.AwsCdkCli.fromCdkAppDirectory("/Users/khushail/clialphaIssue");
ClialphaIssueStack.bootstrap
({
trust: '00000000000',
trustForLookup: '11111111111111',
qualifier: 'hnb659fds',
});
}
} after running
|
@juanenriqueescobar , although I see the qualifier in the code being overwritten, could you share some instructions to repro this? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
@khushail Hi! I try to bootstrap my account, but get the error that I reported. const cli = AwsCdkCli.fromCdkAppDirectory()
try {
await cli.bootstrap({
trust: '000000000000',
trustForLookup: '000000000000',
})
} catch (e) {
process.exit(1)
} I follow the source of |
@juanenriqueescobar I agree with your point in saying that |
…r trust and trustForLookup Fixes #30404
…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*
Comments on closed issues and PRs are hard for our team to see. |
…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*
Describe the bug
trust
andtrustForLookup
options are overwritingqualifier
, so it's impossible to bootstrap a new account.https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cli-lib-alpha/lib/cli.ts#L187C1-L190
Expected Behavior
bootstrap a new account with custom options using
cli-lib-alpha
Current Behavior
qualifier is defined as array and bootstrap fail with:
failed bootstrapping: InvalidParameterType: Expected params.Parameters[6].ParameterValue to be a string
Reproduction Steps
trace show this:
problem is in this line:
Possible Solution
fix parameter names for
trust
https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cli-lib-alpha/lib/cli.ts#L188
and trustForLookup
https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cli-lib-alpha/lib/cli.ts#L189
Additional Information/Context
No response
CDK CLI Version
2.143.0
Framework Version
No response
Node.js Version
any
OS
any
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: