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
-
arnoptional computed - string -
descriptionoptional - string -
idoptional computed - string -
namerequired - string -
namespace_idoptional computed - string -
tagsoptional - map from string to string -
dns_configlist block-
namespace_idrequired - string -
routing_policyoptional - string -
dns_recordslist block
-
-
health_check_configlist block-
failure_thresholdoptional - number -
resource_pathoptional - string -
typeoptional - string
-
-
health_check_custom_configlist block-
failure_thresholdoptional - 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
-
Typeoptional - String -
Descriptionoptional - String -
HealthCheckCustomConfigoptional - HealthCheckCustomConfig -
DnsConfigoptional - DnsConfig -
NamespaceIdoptional - String -
HealthCheckConfigoptional - HealthCheckConfig -
Tagsoptional - List of Tag -
Nameoptional - 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.