diff --git a/README.md b/README.md index c4aead1..e0bbfcc 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,13 @@ Change logs are auto-generated with commitizen. ## Modules -| Name | Source | Version | -|------|--------|---------| -| [cname\_cluster\_domain](#module\_cname\_cluster\_domain) | git@github.e.it.census.gov:terraform-modules/aws-dns//cname | n/a | +No modules. ## Resources | Name | Type | |------|------| +| [aws_route53_record.entry](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource | | [aws_route53_vpc_association_authorization.self_zone_east](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_vpc_association_authorization) | resource | | [aws_route53_vpc_association_authorization.self_zone_west](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_vpc_association_authorization) | resource | | [aws_route53_zone.cluster_domain](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone) | resource | @@ -48,7 +47,7 @@ Change logs are auto-generated with commitizen. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | -| [istio\_ingress\_lb](#input\_istio\_ingress\_lb) | The istio ingress load balancer DNS. | `string` | n/a | yes | +| [istio\_ingress\_lb](#input\_istio\_ingress\_lb) | The istio ingress load balancer DNS. | `map(string)` |
{
"dns_name": "abc-123.elb.region.amazonaws.com",
"zone_id": "ZABC123455"
} | no |
| [os\_username](#input\_os\_username) | OS username from environment variable, ideally as $USER | `string` | `null` | no |
| [region](#input\_region) | AWS config region | `string` | `""` | no |
| [region\_map](#input\_region\_map) | AWS region map | `map(string)` | {
"east": "us-gov-east-1",
"west": "us-gov-west-1"
} | no |
diff --git a/main.tf b/main.tf
index b719ff3..c7eb1f2 100644
--- a/main.tf
+++ b/main.tf
@@ -90,12 +90,14 @@ resource "aws_route53_zone_association" "self_zone_west" {
# Cluster DNS CNAME MAPPED TO INGRESS NLB
###################################################################
-module "cname_cluster_domain" {
- # tflint-ignore: terraform_module_pinned_source
- source = "git@github.e.it.census.gov:terraform-modules/aws-dns//cname"
-
- name = format("*.%v", local.cluster_domain_name)
- values = [var.istio_ingress_lb]
- zone = aws_route53_zone.cluster_domain.zone_id
- enable_heritage = false
+resource "aws_route53_record" "entry" {
+ zone_id = aws_route53_zone.cluster_domain.zone_id
+ name = "*.${local.cluster_domain_name}"
+ type = "CNAME"
+
+ alias {
+ name = var.istio_ingress_lb.dns_name
+ zone_id = var.istio_ingress_lb.zone_id
+ evaluate_target_health = true
+ }
}
diff --git a/variables.tf b/variables.tf
index 576605a..a17a541 100644
--- a/variables.tf
+++ b/variables.tf
@@ -49,7 +49,11 @@ variable "os_username" {
variable "istio_ingress_lb" {
description = "The istio ingress load balancer DNS."
- type = string
+ type = map(string)
+ default = {
+ dns_name = "abc-123.elb.region.amazonaws.com"
+ zone_id = "ZABC123455"
+ }
}
variable "region_map" {