Skip to content
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: credential plugins declared in cdk.json stopped getting used #33304

Closed
humanzz opened this issue Feb 5, 2025 · 2 comments
Closed

cli: credential plugins declared in cdk.json stopped getting used #33304

humanzz opened this issue Feb 5, 2025 · 2 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI potential-regression Marking this issue as a potential regression to be checked by team member

Comments

@humanzz
Copy link
Contributor

humanzz commented Feb 5, 2025

Describe the bug

Hello,

I have a setup where I declare a credentials plugin in cdk.json e.g.

{
  "app": "node dist/lib/app USER=$USER",
  "output": "build/cdk.out",
  "plugin": [
    "my-creds-plugin"
  ]
}

This setup has been working well for me until a recent upgrade of cdk version where I moved from version 2.173.4 to version 2.176.0 where I started getting an error of the form Need to perform AWS calls for account <the account id>, but no credentials have been configured.

Using the --verbose option with cdk deploy, I noticed the following (in 2.176.0)

...
cdk.json: {
  "app": "node dist/lib/app USER=$USER",
  "output": "build/cdk.out",
  "plugin": [
    "my-creds-plugin"
  ]
}
...
merged settings: {
  versionReporting: true,
  assetMetadata: true,
  pathMetadata: true,
  output: 'build/cdk.out',
  app: 'node dist/lib/app USER=$USER',
  plugin: [ ],
...

emphasis on plugin: [ ] in merged settings:.

If I instead run cdk deploy with -p "my-creds-plugin", I get

merged settings: {
  versionReporting: true,
  assetMetadata: true,
  pathMetadata: true,
  output: 'build/cdk.out',
  app: 'node dist/lib/app USER=$USER',
  plugin: [ "my-creds-plugin" ],
...

Just seeing these longs, this suggests that something has changed, where `plugin` is no longer being mergable from `cdk.json` in newer versions.

### Regression Issue

- [x] Select this option if this issue appears to be a regression.

### Last Known Working CDK Version

2.173.4

### Expected Behavior

For the credentials plugin declared in `cdk.json` after the cdk version update

### Current Behavior

I get an error of the form `Need to perform AWS calls for account <the account id>, but no credentials have been configured`

### Reproduction Steps

As mentioned in **Describe the bug** section

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.176.0

### Framework Version

_No response_

### Node.js Version

20

### OS

macOS

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_
@humanzz humanzz added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 5, 2025
@github-actions github-actions bot added package/tools Related to AWS CDK Tools or CLI potential-regression Marking this issue as a potential regression to be checked by team member labels Feb 5, 2025
@humanzz humanzz changed the title cli: credential plugins declared in cdk.json stopped being used cli: credential plugins declared in cdk.json stopped getting used Feb 5, 2025
@mrgrain
Copy link
Contributor

mrgrain commented Feb 5, 2025

Same as #32814
Next release will fix it.

@mrgrain mrgrain closed this as completed Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. package/tools Related to AWS CDK Tools or CLI potential-regression Marking this issue as a potential regression to be checked by team member
Projects
None yet
Development

No branches or pull requests

2 participants