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

ECS service cloud map does not honor specified DNS TTL #6223

Closed
fknittel opened this issue Feb 11, 2020 · 0 comments · Fixed by #6370
Closed

ECS service cloud map does not honor specified DNS TTL #6223

fknittel opened this issue Feb 11, 2020 · 0 comments · Fixed by #6370
Assignees
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug. p1

Comments

@fknittel
Copy link

The following Java synthesizes to a CloudFormation template where the DNS TTL is back to the default of 60 seconds instead of the specified 10 seconds:

software.amazon.awscdk.services.ecs.Ec2Service.Builder.create(scope, "ec2-service")
    .cloudMapOptions(software.amazon.awscdk.services.ecs.CloudMapOptions.builder()
        .dnsTtl(Duration.seconds(10))
        .build())
    .build();

Reproduction Steps

  1. Define above ECS service using CDK
  2. Look at synth result

Environment

  • Framework Version: CDK 1.23.0
  • Language : Java

Other

Looks like this line

const cloudmapService = new cloudmap.Service(this, 'CloudmapService', {
namespace: sdNamespace,
name: options.name,
dnsRecordType: dnsRecordType!,
customHealthCheck: { failureThreshold: options.failureThreshold || 1 }
});

should also pass along the options.dnsTtl:

const cloudmapService = new cloudmap.Service(this, 'CloudmapService', {
      namespace: sdNamespace,
      name: options.name,
      dnsRecordType: dnsRecordType!,
      customHealthCheck: { failureThreshold: options.failureThreshold || 1 },
      dnsTtl: options.dnsTtl
    });

This is 🐛 Bug Report

@fknittel fknittel added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 11, 2020
@SomayaB SomayaB added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Feb 11, 2020
@efekarakus efekarakus added p2 and removed needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2020
efekarakus added a commit to efekarakus/aws-cdk that referenced this issue Feb 19, 2020
efekarakus added a commit to efekarakus/aws-cdk that referenced this issue Feb 19, 2020
@efekarakus efekarakus added p1 and removed p2 labels Feb 19, 2020
@mergify mergify bot closed this as completed in #6370 Feb 19, 2020
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 bug This issue is a bug. p1
Projects
None yet
5 participants