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
resource "aws_service_discovery_service" "kibana" {
name = "dashboard"
dns_config {
namespace_id = aws_service_discovery_private_dns_namespace.web.id
dns_records {
ttl = 30
resource "aws_service_discovery_service" "proxy_sd" {
name = "proxy"
dns_config {
namespace_id = aws_service_discovery_private_dns_namespace.proxy.id
resource "aws_service_discovery_service" "auth" {
name = "auth"
dns_config {
namespace_id = aws_service_discovery_private_dns_namespace.saas.id
resource "aws_service_discovery_service" "frontend" {
name = "front"
dns_config {
namespace_id = aws_service_discovery_private_dns_namespace.internal.id
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
Parameters
-
arn
optional computed - string -
description
optional - string -
id
optional computed - string -
name
required - string -
namespace_id
optional computed - string -
tags
optional - map from string to string -
dns_config
list block-
namespace_id
required - string -
routing_policy
optional - string -
dns_records
list block
-
-
health_check_config
list block-
failure_threshold
optional - number -
resource_path
optional - string -
type
optional - string
-
-
health_check_custom_config
list block-
failure_threshold
optional - number
-
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
-
Type
optional - String -
Description
optional - String -
HealthCheckCustomConfig
optional - HealthCheckCustomConfig -
DnsConfig
optional - DnsConfig -
NamespaceId
optional - String -
HealthCheckConfig
optional - HealthCheckConfig -
Tags
optional - List of Tag -
Name
optional - String
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.