-
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.ExternalService: enableExecuteCommand is shown as not supported (while in fact it is supported) #31181
Comments
Reproducible using customer code.
The exception is thrown due to validation check here. Looking at the commit history, the validation is in place since last 3 years per commit 3592b26. @hrko Good afternoon. Could you please point me to documentation or example which demonstrates that Thanks, |
@ashishdhingra As an example, extract a CfnService from an ExternalService and then enableExecuteCommand can be enabled for that CfnService. The example is shown in the following code: const ecsService = new ecs.ExternalService(this, 'ExternalService', {
serviceName: "EcsAnywhereService",
cluster: EcsAnywhereCluster,
taskDefinition,
desiredCount: 1,
});
+ const cfnService = ecsService.node.defaultChild as ecs.CfnService;
+ cfnService.enableExecuteCommand = true; Once the above example code is deployed, you can use (I did not find either a statement in the documentation that |
@hrko Thanks for sharing your inputs. I was able to run Thanks, |
Describe the bug
When creating an ExternalService, specifying the
enableExecuteCommand: true
option for the property will result in the following error when runningcdk synth
.However, the
enableExecuteCommand
option is actually supported by the ExternalService as well, and can be manually enabled using the AWS CLI.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
When creating an ExternalService, the
enableExecuteCommand: true
option can be set for the property.Current Behavior
When creating an ExternalService, setting the
enableExecuteCommand: true
option to the property causes an error when executingcdk synth
.Reproduction Steps
A code snippet that reproduces the problem is like as follows:
Click here to show entire stack code
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.154.0 (build 0fc07f3)
Framework Version
No response
Node.js Version
v20.17.0
OS
Debian GNU/Linux 11 (bullseye)
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: