Skip to content

Commit

Permalink
fix(aws-ecs): propagate dnsTtl property part of cloudMapOptions
Browse files Browse the repository at this point in the history
Fixes #6223
  • Loading branch information
efekarakus committed Feb 19, 2020
1 parent b47eccc commit d2b0bbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
Expand Up @@ -514,7 +514,8 @@ export abstract class BaseService extends Resource
namespace: sdNamespace,
name: options.name,
dnsRecordType: dnsRecordType!,
customHealthCheck: { failureThreshold: options.failureThreshold || 1 }
customHealthCheck: { failureThreshold: options.failureThreshold || 1 },
dnsTtl: options.dnsTtl,
});

const serviceArn = cloudmapService.serviceArn;
Expand Down
Expand Up @@ -1359,7 +1359,8 @@ export = {
taskDefinition,
cloudMapOptions: {
name: 'myApp',
dnsRecordType: cloudmap.DnsRecordType.SRV
dnsRecordType: cloudmap.DnsRecordType.SRV,
dnsTtl: cdk.Duration.seconds(10),
}
});

Expand All @@ -1368,7 +1369,7 @@ export = {
DnsConfig: {
DnsRecords: [
{
TTL: 60,
TTL: 10,
Type: "SRV"
}
],
Expand Down

0 comments on commit d2b0bbc

Please sign in to comment.