-
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
[ecs] Cannot disable containerInsights of a cluster whose setting is enabled #9149
Comments
I see there's an unreleased fix for this (#9151). Until that's released, what's the process for manually fixing this? I have a service deployed with CDK that has container insights enabled and I want to disable that setting to reduce my bill. If I do this outside the CDK it will never know the value was changed and continue to fail deployments. |
@chrisb87
anyway hope it'll be merged soon:( |
fixes #9149 The clusterSettings should be explicitly defined even when container insights is disabled, because CFn doesn't allow to remove the existing settings (as described in the issue.) By this change, users who sets `containerInsights` prop `false` will see a diff like below, but it won't be a problem because by default container insights is disabled hence no actual change to existing resources: ``` Resources [~] AWS::ECS::Cluster cluster cluster611F8AFF └─ [+] ClusterSettings └─ [{"Name":"containerInsights","Value":"disabled"}] ``` To prevent the existing tests from failing, the clusterSettings is only defined when `containerInsight` prop is explicitly defined(i.e. `true` or `false`, not `undefined`.) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
fixes aws#9149 The clusterSettings should be explicitly defined even when container insights is disabled, because CFn doesn't allow to remove the existing settings (as described in the issue.) By this change, users who sets `containerInsights` prop `false` will see a diff like below, but it won't be a problem because by default container insights is disabled hence no actual change to existing resources: ``` Resources [~] AWS::ECS::Cluster cluster cluster611F8AFF └─ [+] ClusterSettings └─ [{"Name":"containerInsights","Value":"disabled"}] ``` To prevent the existing tests from failing, the clusterSettings is only defined when `containerInsight` prop is explicitly defined(i.e. `true` or `false`, not `undefined`.) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I tried disabling containerInsights of an ECS cluster but it failed.
It seems CFn doesn't support removing the setting but replacing.
Reproduction Steps
c.f. cdk diff when deploying in 2nd step
Error Log
When deploying in 2nd step, an error occurs:
Environment
Other
The cdk diff is supposed to be below:
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: