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

@aws-cdk/toolkit-lib: unable to destroy stack without custom ioHost #157

Open
1 task
dreamorosi opened this issue Feb 26, 2025 · 0 comments
Open
1 task

Comments

@dreamorosi
Copy link

dreamorosi commented Feb 26, 2025

Describe the bug

As a programmatic user of @aws-cdk/toolkit-lib I'd like to be able to destroy stacks without explicit operator approval. At the moment this requires me implementing a custom ioHost, which can be a lot of work.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

While I understand and appreciate the current requestResponse system for operations that require some kind of intervention, I'd like an easy way to tell the toolkit that I want to destroy stacks without any approval.

It's already possible to turn off approvals for stack creation, and the legacy @aws-cdk/cli-lib-alpha also allowed to destroy stacks without approvals.

Current Behavior

Currently the only way to destroy stacks in a completely unattended way is to implement a passthrough ioHost, like:

ioHost: {
  async notify(msg) {
    console.log(msg.message);
  },
  async requestResponse(msg) {
    console.log(msg.message);
    return msg.defaultResponse;
  },
},

This works, but requires me to now also take care of messaging and handle different levels - something that is done automatically by the default ioHost.

Reproduction Steps

N/A

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.1000.2

Framework Version

No response

Node.js Version

v22.x

OS

N/A

Language

TypeScript

Language Version

No response

Other information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants