AWS CloudMap Service Discovery Instance


I am working with an environment that uses AWS’ CloudMap for Service Discovery. While some AWS services support automated registry of endpoints in Service Discovery (i.e. ECS), other’s do not (RDS, EC2).

It appears that Terraform supports provisioning a CloudMap Service (service_discovery_service), however, I cannot figure out if I can register specific endpoints to the Service via Terraform.

I know that you can create a DNS Record in a Private Route53 Zone, however, this does not appear to work when the Private Route53 Zone is managed by CloudMap.

In the AWS Console, you would manually register instances by selecting the Namespace from the CloudMap Service, selecting the Service, then selecting ‘Register Service Instance’. This presents an interface where you may register an instance via IP or CNAME. This may also be achieved by AWS CLI.

I am wondering if this resource can be created via Terraform and, if not, how I may go about requesting support for this in a future Terraform version.