-
Notifications
You must be signed in to change notification settings - Fork 1
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
Budget already exists - error #15
Comments
@rcoundon It looks like this is a CDK issue. It can happen for multiple reasons, like using the same application name to define Can you please provide steps to reproduce this issue? |
I'm using sst.dev to deploy the application - a wrapper around CDK. I have created a function that looks like this: createCostMonitoring(stack: Stack) {
const costMonitoring = new ApplicationCostMonitoring(stack, {
monthlyLimitInDollars: process.env.MONTHLY_COST_LIMIT ? parseInt(process.env.MONTHLY_COST_LIMIT) : 200,
applicationName: stack.stage,
defaultTopic: 'cost-monitoring',
subscribers: process.env.BUDGET_SUBSCRIBERS.split(','),
});
costMonitoring.monitor();
} I then simply call that function on deployment from within the stack. With all the other constructs that I'm using (S3, DynamoDB, SQS, EventBridge Rules, API Gateway etc) CDK is smart enough to work out that they already exist and either update them or skip them on each deployment so was surprised when this didn't do the same |
@rcoundon I was able to reproduce this issue by changing the subscribers (other parameters work fine). This is a CloudFormation issue, not limited to this construct or CDK. There is an open issue for this problem here. You can destroy your stack and deploy it again to bypass this issue, but I understand that is not ideal. The issue has been open since Feb 5, 2020! I will look for a short-term solution until they fix this issue with CloudFormation. |
Thanks for investigating, I've added my vote/bump to that issue to ask for it to be addressed in case that makes any difference. |
I've updated the definition of the ApplicationCostMonitoring parameters in a stack to include an array of subscribers.
When I try to deploy I now get:
So it seems that the construct is not properly dealing with updates to existing stacks and is trying to create a new one. Is there any way around this?
Thanks
The text was updated successfully, but these errors were encountered: