-
Notifications
You must be signed in to change notification settings - Fork 4k
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] Escape hatches do not work for FargateService #10666
Comments
@justin8 If you dig into the code of CDK you find out what defaultChild actually does. It will find a child node named either "Resource" or "Default" in the construct. However, unfortunately, the FargateService doesn't have such a resource and thus it fails. The workaround is to make use of the children() accessor method which returns an array of all children of the node. In this case there is only a single one (and arguably should be made the default) of type CfnService. This is also the one you want if you want to make changes to the construct's underlying Cfn resource. I was able to use the following code to add the "FARGATE_SPOT" capacity provider to an "ApplicationLoadBalancedFargateService"
Hope it helps. |
Closing this as a duplicate of #14665 -- we'll track this issue there! |
|
When attempting to override any property of the underlying CfnResource it appears that
.node.defaultChild
is always undefined.Reproduction Steps
What did you expect to happen?
To be able to override properties
What actually happened?
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: