Skip to content

Commit 8a56b35

Browse files
authored
feat: Allow custom Route53 record name (including empty) (#120)
1 parent 784b2d1 commit 8a56b35

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ No requirements.
176176
| private\_subnets | A list of private subnets inside the VPC | `list(string)` | `[]` | no |
177177
| public\_subnet\_ids | A list of IDs of existing public subnets inside the VPC | `list(string)` | `[]` | no |
178178
| public\_subnets | A list of public subnets inside the VPC | `list(string)` | `[]` | no |
179+
| route53\_record\_name | Name of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB. | `string` | `null` | no |
179180
| route53\_zone\_name | Route53 zone name to create ACM certificate in and main A-record, without trailing dot | `string` | `""` | no |
180181
| security\_group\_ids | List of one or more security groups to be added to the load balancer | `list(string)` | `[]` | no |
181182
| ssm\_kms\_key\_arn | ARN of KMS key to use for encryption and decryption of SSM Parameters. Required only if your key uses a custom KMS key and not the default key | `string` | `""` | no |

main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ resource "aws_route53_record" "atlantis" {
291291
count = var.create_route53_record ? 1 : 0
292292

293293
zone_id = data.aws_route53_zone.this[0].zone_id
294-
name = var.name
294+
name = var.route53_record_name != null ? var.route53_record_name : var.name
295295
type = "A"
296296

297297
alias {

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ variable "route53_zone_name" {
110110
default = ""
111111
}
112112

113+
variable "route53_record_name" {
114+
description = "Name of Route53 record to create ACM certificate in and main A-record. If null is specified, var.name is used instead. Provide empty string to point root domain name to ALB."
115+
type = string
116+
default = null
117+
}
118+
113119
variable "create_route53_record" {
114120
description = "Whether to create Route53 record for Atlantis"
115121
type = bool

0 commit comments

Comments
 (0)