Skip to content

aws-appmesh: Add IPv6 support #20737

@AKBarcenas

Description

@AKBarcenas

Describe the feature

AWS App Mesh has released support for IPv6 and new fields have been exposed on the APIs as part of this release.

https://aws.amazon.com/about-aws/whats-new/2022/05/aws-app-mesh-supports-ipv6/
aws/aws-app-mesh-roadmap#314

The proposal here is to add support for App Mesh's newly added IPv6 capabilities.

Use Case

Without this feature, CDK users will be unable to configure IPv6 within App Mesh.

Proposed Solution

The primary changes will be to add an IP preference that covers all of the preference types supported in App Mesh and to expose the new fields where this IP preference can be applied within the mesh and virtual node resources.

Mesh

new appmesh.Mesh(stack, 'mesh', {
  meshName: 'mesh',
  meshServiceDiscovery: {
    ipPreference: appmesh.IpPreference.IPV4_PREFERRED
  },
});

Virtual Node

declare const mesh: appmesh.Mesh;

const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
    vpc,
    name: 'domain.local',
});
const service = namespace.createService('service');

/**
 * CloudMap Service Discovery
 */

const cloudNode = mesh.addVirtualNode('virtual-node', {
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8081,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: cdk.Duration.seconds(5),
      path: '/health-check-path',
      timeout: cdk.Duration.seconds(2),
      unhealthyThreshold: 2,
    }),
  })],
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
},
appmesh.IpPreference.IPV4_PREFERRED);

/**
 * DNS Service Discovery
 */

const dnsNode = mesh.addVirtualNode('virtual-node', {
  serviceDiscovery: appmesh.ServiceDiscovery.dns(`service`, appmesh.DnsResponseType.ENDPOINTS, appmesh.IpPreference.IPV4_PREFERRED),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8081,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: cdk.Duration.seconds(5),
      path: '/health-check-path',
      timeout: cdk.Duration.seconds(2),
      unhealthyThreshold: 2,
    }),
  })],
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});

Other Information

No response

Acknowledgements

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

CDK version used

2.28.0

Environment details (OS name and version, etc.)

macOS Catalina, Version 10.15.7 (19H1824)

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-appmeshRelated to AWS App Mesheffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.in-progressThis issue is being actively worked on.p2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions