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

aws-acm-cert Add workaround for TF bug #138

Merged
merged 1 commit into from
Oct 4, 2019
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
1 change: 1 addition & 0 deletions aws-acm-cert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module "cert" {
| owner | Owner for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
| project | Project for tagging and naming. See [doc](../README.md#consistent-tagging) | string | n/a | yes |
| service | Service for tagging and naming. See [doc](../README.md#consistent-tagging). | string | n/a | yes |
| subject\_alternative\_names\_order | Order to list the subject alternative names in the ACM cert. Workaround for https://github.com/terraform-providers/terraform-provider-aws/issues/8531 | list(string) | `null` | no |
| validation\_record\_ttl | | string | `"60"` | no |

## Outputs
Expand Down
2 changes: 1 addition & 1 deletion aws-acm-cert/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ locals {

resource "aws_acm_certificate" "cert" {
domain_name = "${var.cert_domain_name}"
subject_alternative_names = "${keys(var.cert_subject_alternative_names)}"
subject_alternative_names = var.subject_alternative_names_order == null ? keys(var.cert_subject_alternative_names) : var.subject_alternative_names_order
validation_method = "DNS"
tags = "${local.tags}"

Expand Down
6 changes: 6 additions & 0 deletions aws-acm-cert/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ variable "allow_validation_record_overwrite" {
description = "Allow the overwrite of validation records. This is needed if you are creating certificates in multiple regions."
default = true
}

variable "subject_alternative_names_order" {
type = list(string)
description = "Order to list the subject alternative names in the ACM cert. Workaround for https://github.com/terraform-providers/terraform-provider-aws/issues/8531"
default = null
}