From 4d2fbe91cfa251067fa42b5293b7a686fbf556a0 Mon Sep 17 00:00:00 2001 From: CaerusKaru Date: Tue, 21 May 2019 03:17:00 -0500 Subject: [PATCH] fix(ec2): allow disabling privateDnsEnabled on VPCs (#2596) Fixes #2556. --- packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts index 6aa22630d51c4..bbe83e76efa24 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc-endpoint.ts @@ -372,7 +372,7 @@ export class InterfaceVpcEndpoint extends VpcEndpoint implements IInterfaceVpcEn const subnetIds = subnets.subnetIds; const endpoint = new CfnVPCEndpoint(this, 'Resource', { - privateDnsEnabled: props.privateDnsEnabled || true, + privateDnsEnabled: props.privateDnsEnabled !== undefined ? props.privateDnsEnabled : true, policyDocument: new Token(() => this.policyDocument), securityGroupIds: [this.securityGroupId], serviceName: props.service.name,