Terraform module that creates AWS cloud map namespaces and services within local VPCs on AWS.
data "aws_vpc" "vpc" {
default = true
}
module "namespace" {
source = "https://github.com/aerojam95/aws-cloud-map.git"
region = "eu-west-2"
tags = {
"Example" = "aws-cloup-map-namespace",
"GitHubRepo" = "aws-cloud-map"
}
vpc_id = data.aws_vpc.vpc.id
vpc_arn = [data.aws_vpc.vpc.arn]
name = local.name
description = "Example AWS cloud map namespace with local default VPC access"
namespace_tags = {
"Name" = example-namespace
}
}
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 5.0 |
Name | Version |
---|---|
aws | >= 5.0 |
No modules required.
Name | Description | Type | Default | Required |
---|---|---|---|---|
region | An AWS region for the VPC infrastructure to be deployed | string |
null |
yes |
tags | A map of tags to add to all resources | map(string) |
{} |
no |
vpc_id | ID of VPC in which to deploy | string |
null |
yes |
vpc_arn | ARN of VPC in which to deploy | list(string) |
[] |
yes |
create_namespace | Controls if cloud map namespace should be created | bool |
true |
no |
create_aws_cloud_map_iam_role | Controls if an iam role for cloud map namespace should be created | bool |
true |
no |
name | The name of the namespace and service | string |
null |
no |
description | The description of the service | string |
null |
no |
namespace_tags | Additional tags for the namespace | map(string) |
{} |
no |
create_namespace_service | Controls if cloud map namespace service should be created | bool |
false |
no |
create_dns_config | Controls if DNS configurations for cloud map namespace services should be created | bool |
false |
no |
create_health_check_config | Controls if health checks are implemented | bool |
false |
no |
create_health_check_custom_config | Controls if custom health checks are implemented | bool |
false |
no |
namespace_service_name | The name of the AWS cloud map namespace service | string |
null |
no |
force_destroy | A boolean that indicates all instances should be deleted from the service so that the service can be destroyed without error. These instances are not recoverable | bool |
false |
no |
ttl | The amount of time, in seconds, that you want DNS resolvers to cache the settings for this resource record set | number |
10 |
no |
dns_record_type | The type of the resource, which indicates the value that Amazon Route 53 returns in response to DNS queries | string |
A |
no |
routing_policy | The routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service | string |
MULTIVALUE |
no |
failure_threshold | The number of consecutive health checks. Maximum value of 10 | number |
10 |
no |
resource_path | The path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service | string |
/ |
no |
health_check_type | The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy | string |
HTTPS |
no |
custom_failure_threshold | The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10 | number |
1 |
no |
Name | Description |
---|---|
namespace_id | The ID of the cloud map namespace |
namespace_arn | The ARN of the cloud map namespace |
namespace_hosted_zone | The ID for the hosted zone that AWS Route 53 creates when you create a namespace |
namespace_tags | The tags of the cloud map namespace resource tags |
aws_cloud_map_iam_role_arn | The ARN of the IAM role used when pushing logs to Cloudwatch log group |
namespace_service_id | The ID of the namespace service |
namespace_service_arn | The ARN of the namespace service |
namespace_service_tags_all | A map of tags assigned to the resource, including those inherited from the provider |