Skip to content

Commit

Permalink
aws-acm-cert Add workaround for TF bug (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarrien authored Oct 4, 2019
1 parent 3479268 commit f4e551e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
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
}

0 comments on commit f4e551e

Please sign in to comment.