Skip to content
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

(cdk_ecs): interactive property missing in container definition #24326

Closed
mdeshmu opened this issue Feb 24, 2023 · 4 comments · Fixed by #28536
Closed

(cdk_ecs): interactive property missing in container definition #24326

mdeshmu opened this issue Feb 24, 2023 · 4 comments · Fixed by #28536
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@mdeshmu
Copy link

mdeshmu commented Feb 24, 2023

Describe the bug

We are trying to use this property https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CfnTaskDefinition.ContainerDefinitionProperty.html#interactive in a fargate task but when we add it using

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.FargateTaskDefinition.html#addwbrcontainerid-props

We get error "interactive" does not exist in type 'ContainerDefinitionOptions'. How can we solve this ?

One observation: 'interactive' property doesn't exist in non-cfn construct for container definition https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.ContainerDefinitionOptions.html

Expected Behavior

We should be able to specify 'interactive' property

Current Behavior

throws error

Reproduction Steps

try to create a fargate task using cdk and add 'interactive': true to container defintion

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.59.0

Framework Version

No response

Node.js Version

14.x

OS

Amazon Linux 2

Language

Typescript

Language Version

3.9.10

Other information

No response

@mdeshmu mdeshmu added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Feb 24, 2023
@mdeshmu
Copy link
Author

mdeshmu commented Feb 25, 2023

From #16025 (comment), containerDefinitions is a Lazy Value, which means we can't use escape hatches to modify the properties that aren't exposed to our L2 constructs.

Is there any other workaround? If not, can we please add it as a feature please.

@pahud
Copy link
Contributor

pahud commented Feb 28, 2023

We probably need to add this in the ContainerDefinitionOptions so it could be rendered as expected. I am making it a p2 feature request and any PR submission is welcome and appreciated.

@pahud pahud added p2 feature-request A feature should be added or improved. and removed needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Feb 28, 2023
@mdeshmu
Copy link
Author

mdeshmu commented Feb 28, 2023

@pahud I can raise for this one if time permits. Any sample PR would be useful to follow.

@pahud pahud added the effort/medium Medium work item – several days of effort label Feb 28, 2023
@mergify mergify bot closed this as completed in #28536 Jan 2, 2024
mergify bot pushed a commit that referenced this issue Jan 2, 2024
This pull request adds the `interactive` argument to `ContainerDefinitionOptions`. This argument is used when deploying containerized applications that require the allocation of standard input (stdin) or a terminal (tty). This parameter corresponds to `OpenStdin` in the "Create a container" section of the Docker Remote API and the `--interactive` option to `docker run`.

Closes #24326.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Jan 2, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

paulhcsun pushed a commit to paulhcsun/aws-cdk that referenced this issue Jan 5, 2024
…28536)

This pull request adds the `interactive` argument to `ContainerDefinitionOptions`. This argument is used when deploying containerized applications that require the allocation of standard input (stdin) or a terminal (tty). This parameter corresponds to `OpenStdin` in the "Create a container" section of the Docker Remote API and the `--interactive` option to `docker run`.

Closes aws#24326.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants