question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@aws-cdk/ecs: Override container name

See original GitHub issue

Allow to override container name by constructor property.

Use Case

With the current implementation, these will be the same value implicitly. This is confusing for our team because the naming conventions for the names in our current(exists) configuration and the Construct IDs are different. So we need to manage the Construct ID and the name separately.

Proposed Solution

Add containerName property to ContainerDefinitionProps and override containerName by this.

this.containerName = props.containerName ?? this.node.id;

https://github.com/aws/aws-cdk/blob/v1.39.0/packages/%40aws-cdk/aws-ecs/lib/container-definition.ts#L380

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
timohirtcommented, Apr 6, 2021

This error is already fixed. I don’t think this is a feature and thus changed the title of the PR.

1reaction
timohirtcommented, Mar 27, 2021

@karupanerura looking forward to your feedback. I just copy and paste your code in the description.

Read more comments on GitHub >

github_iconTop Results From Across the Web

interface ContainerOverride · AWS CDK
A list of container overrides that specify the name of a container and the overrides it should receive. Example. // The code below...
Read more >
@aws-cdk/aws-ecs-patterns - npm
Start using @aws-cdk/aws-ecs-patterns in your project by running `npm ... but you can override by providing a value for the platformVersion ...
Read more >
In CDK step functions, how to pass the commands or ...
Other things to point out when trigger fargate/ecs from step function, ... import targets = require('@aws-cdk/aws-events-targets'); const ...
Read more >
Amazon Elastic Container Service (ECS) / Fargate
The Jenkins Amazon EC2 Container Service plugin will use this ECS cluster and ... override the Jenkins URL in the Advanced Configuration of...
Read more >
Use the Override ECS Docker Command to Run Database ...
Using overrides allows you to change the default command for the container specified in your task definitions. For example, instead of running ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found