Sets up a Service Discovery service using a public DNS namespace.

Terraform Template

resource "aws_service_discovery_public_dns_namespace" "example" {
  description = "example"
  name = "example.terraform.com"
}

resource "aws_service_discovery_service" "example" {

  dns_config {

    dns_records {
      ttl = 10
      type = "A"
    }
    namespace_id = aws_service_discovery_public_dns_namespace.example.id
  }

  health_check_config {
    failure_threshold = 10
    resource_path = "path"
    type = "HTTP"
  }
  name = "example"
}