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

Cannot set PropagateTags to ECS Service by using LoadBalancedFargateService. #3979

Closed
NomadBlacky opened this issue Sep 6, 2019 · 3 comments
Assignees
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container @aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature-request A feature should be added or improved.

Comments

@NomadBlacky
Copy link

❓ General Issue

The Question

I used CDK v1.6.1 and the following code.

import cdk = require("@aws-cdk/core");
import ec2 = require("@aws-cdk/aws-ec2");
import ecs = require("@aws-cdk/aws-ecs");
import patterns = require("@aws-cdk/aws-ecs-patterns");

export class MyAppStack extends cdk.Stack {
    constructor(scope: cdk.Construct, id: string, props: cdk.StackProps) {
        super(scope, id, props);

        const vpc = new ec2.Vpc(this, "ExampleVPC", {
            maxAzs: 2
        });

        const cluster = new ecs.Cluster(this, "MyAppCluster", {
            vpc: vpc
        });

        new patterns.LoadBalancedFargateService(this, "MyFagateService", {
            cluster: cluster,
            cpu: 256,
            memoryLimitMiB: 512,
            desiredCount: 1,
            image: ecs.ContainerImage.fromRegistry('nginx'),
            publicLoadBalancer: true,
            containerPort: 80,
        });
    }
}

I updated CDK to v1.7.0 and executed cdk diff.

Stack MyAppStack
Resources
[~] AWS::ECS::Service MyFagateService/Service/Service MyFagateServiceXXXXXXXX replace
 ├─ [~] EnableECSManagedTags (requires replacement)
 └─ [-] PropagateTags (requires replacement)
     └─ SERVICE

PropagateTags=SERVICE will be deleted.
I think this is because the default PropagateTags value is now undefined. (1f589a3)

I want to set PropagateTags=SERVICE to ECS Service. but, I seem LoadBalancedFargateServiceProps doesn't have propagateTags property.

Is there a way to set PropagateTags property?

Environment

  • CDK CLI Version: 1.7.0 (build 8870695)
  • Module Version:
  • OS: Ubuntu
  • Language: TypeScript

Other information

@NomadBlacky NomadBlacky added the needs-triage This issue or PR still needs to be triaged. label Sep 6, 2019
@SomayaB SomayaB added guidance Question that needs advice or information. @aws-cdk/aws-ecs Related to Amazon Elastic Container labels Sep 6, 2019
@SomayaB SomayaB added the @aws-cdk/aws-ecs-patterns Related to ecs-patterns library label Sep 6, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Sep 9, 2019

I believe this will come in on the next release.

@rix0rrr rix0rrr added feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 23, 2019
rix0rrr pushed a commit that referenced this issue Sep 27, 2019
Add propagateTaskTagsFrom and EcsManagedTags properties to constructs in ecs-patterns.

Deprecate `propagateTaskTagsFrom` in favor of `propagateTags` everywhere.

Addresses: #3979
@piradeepk
Copy link
Contributor

This issue will be resolved in the next release.

@piradeepk
Copy link
Contributor

Resolved as part of: #4213. Please let us know if this does not resolve your issue.

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 @aws-cdk/aws-ecs-patterns Related to ecs-patterns library feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants