AWS Cloud Map Service

This page shows how to write Terraform and CloudFormation for AWS Cloud Map Service and write them securely.

aws_service_discovery_service (Terraform)

The Service in AWS Cloud Map can be configured in Terraform with the resource name aws_service_discovery_service. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

service_discovery_service.tf#L11
resource "aws_service_discovery_service" "kibana" {
  name = "dashboard"
  dns_config {
    namespace_id = aws_service_discovery_private_dns_namespace.web.id
    dns_records {
      ttl = 30
service_discovery.tf#L6
resource "aws_service_discovery_service" "proxy_sd" {
  name = "proxy"

  dns_config {
    namespace_id = aws_service_discovery_private_dns_namespace.proxy.id

cloudmap.tf#L14
resource "aws_service_discovery_service" "auth" {
  name = "auth"

  dns_config {
    namespace_id = aws_service_discovery_private_dns_namespace.saas.id

ecs.tf#L14
resource "aws_service_discovery_service" "frontend" {
  name = "front"

  dns_config {
    namespace_id = aws_service_discovery_private_dns_namespace.internal.id

service-registry.tf#L6
resource "aws_service_discovery_service" "kad-kafka-schema-registry" {
  name = "kad-kafka-schema-registry"
  dns_config {
    namespace_id = aws_service_discovery_private_dns_namespace.kad-service-discovery.id
    dns_records {
      ttl  = 10

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a Service Discovery Service resource.

AWS::ServiceDiscovery::Service (CloudFormation)

The Service in ServiceDiscovery can be configured in CloudFormation with the resource name AWS::ServiceDiscovery::Service. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

A complex type that contains information about a service, which defines the configuration of the following entities:+ For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53: + A + AAAA + A and AAAA + SRV + CNAME+ Optionally, a health check

Frequently asked questions

What is AWS Cloud Map Service?

AWS Cloud Map Service is a resource for Cloud Map of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Cloud Map Service?

For Terraform, the exNihlio/terraform, MiguelIsaza95/movie-analyst-containers and wwalpha/aws-multi-tenant-with-serverless source code examples are useful. See the Terraform Example section for further details.