Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: validation_allow_overwrite_records variable to allow overwrite records #11

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ repos:
rev: v2.1.0
hooks:
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ module "acm" {

| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| create\_certificate | Whether to create ACM certificate | string | `"true"` | no |
| domain\_name | A domain name for which the certificate should be issued | string | `""` | no |
| create\_certificate | Whether to create ACM certificate | string | `true` | no |
| domain\_name | A domain name for which the certificate should be issued | string | `` | no |
| subject\_alternative\_names | A list of domains that should be SANs in the issued certificate | list | `[]` | no |
| tags | A mapping of tags to assign to the resource | map | `{}` | no |
| validate\_certificate | Whether to validate certificate by creating Route53 record | string | `"true"` | no |
| validation\_method | Which method to use for validation. DNS or EMAIL are valid, NONE can be used for certificates that were imported into ACM and then into Terraform. | string | `"DNS"` | no |
| wait\_for\_validation | Whether to wait for the validation to complete | string | `"true"` | no |
| zone\_id | The ID of the hosted zone to contain this record. | string | `""` | no |
| validate\_certificate | Whether to validate certificate by creating Route53 record | string | `true` | no |
| validation\_allow\_overwrite\_records | Whether to allow overwrite of Route53 records | string | `true` | no |
| validation\_method | Which method to use for validation. DNS or EMAIL are valid, NONE can be used for certificates that were imported into ACM and then into Terraform. | string | `DNS` | no |
| wait\_for\_validation | Whether to wait for the validation to complete | string | `true` | no |
| zone\_id | The ID of the hosted zone to contain this record. | string | `` | no |

## Outputs

Expand Down
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ resource "aws_route53_record" "validation" {
type = "${lookup(aws_acm_certificate.this.domain_validation_options[count.index], "resource_record_type")}"
ttl = 60
records = ["${lookup(aws_acm_certificate.this.domain_validation_options[count.index], "resource_record_value")}"]

allow_overwrite = "${var.validation_allow_overwrite_records}"
}

resource "aws_acm_certificate_validation" "this" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ variable "validate_certificate" {
default = true
}

variable "validation_allow_overwrite_records" {
description = "Whether to allow overwrite of Route53 records"
default = true
}

variable "wait_for_validation" {
description = "Whether to wait for the validation to complete"
default = true
Expand Down