-
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
aws-stepfunctions-tasks: Custom resources being provisioned when passing in subnets
to EcsRunTask
#26013
Comments
EcsRunTask
subnets
to EcsRunTask
You will need to provide ec2.SubnetSelection to the subnet property. Looking at your code, you are not actually providing the SubnetSelection and the subnetsFromParameter actually returns |
Ah, that's just a prop for a wrapper around
|
@marsavar Good afternoon. Could you please confirm if your are unblocked and if this issue could be closed? Thanks, |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Describe the bug
I'm attempting to cloudform an
EcsRunTask
(with no context file).Not passing the
subnet
prop results in this error:This is somewhat expected, CDK doesn't know at compile time what subnet groups are in a VPC.
Passing in an array of private subnets (whose ids are stored in an SSM param) causes CDK to provision custom resources when passing the
subnets
prop toEcsRunTask
.For reasons I don't fully understand, CDK attempts to cloudform a lambda to be served from an S3 bucket. The following parameters are also created:
Because these parameters do not have any values, it is not possible to update the stack.
Expected Behavior
I expect CDK to reference the private subnets I'm passing to the
EcsRunTask
construct.Current Behavior
synth
works as expected, but updating the stack with the newly generated template fails due to the parameters not having values.The parameters being generated are
and the custom resource (a node lambda):
Reproduction Steps
This is a complex construct that requires several props to be defined, so I'm including an example for our repository.
https://github.com/guardian/cdk/blob/effb29ee6aaa8cd72bd10102649991eb55067c3c/src/constructs/ecs/ecs-task.ts#L206-L223
Removing the
subnets
prop gets rid of the custom resources.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.78.0
Framework Version
No response
Node.js Version
v18.16.0
OS
macOS Monterey 12.6.2
Language
Typescript
Language Version
TypeScript 4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: