Skip to content

Commit

Permalink
Multicert http listener (#66)
Browse files Browse the repository at this point in the history
* Adding SNI cert support

* Updated README.md

* adding default value

* adding default value

* adding default value

* Adding missing sni resource

* Updated README.md

* Fixing typo in reource reference

* Fixing typo in resource reference

* Fixing count reference

Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
  • Loading branch information
jamengual and actions-bot committed Dec 12, 2020
1 parent f65bf47 commit 61bef2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,15 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
## Usage


**IMPORTANT:** The `master` branch is used in `source` just as an example. In your code, do not pin to `master` because there may be breaking changes between releases.
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-alb/releases).
**IMPORTANT:** We do not pin modules to versions in our examples because of the
difficulty of keeping the versions in the documentation in sync with the latest released versions.
We highly recommend that in your code you pin the version to the exact version you are
using so that your infrastructure remains stable, and update versions in a
systematic way so that they do not catch you by surprise.

Also, because of a bug in the Terraform registry ([hashicorp/terraform#21417](https://github.com/hashicorp/terraform/issues/21417)),
the registry shows many of our inputs as required when in fact they are optional.
The table below correctly indicates which inputs are required.


For a complete example, see [examples/complete](examples/complete).
Expand Down
6 changes: 6 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,9 @@ resource "aws_lb_listener" "https" {
type = "forward"
}
}
resource "aws_lb_listener_certificate" "https_sni" {
count = module.this.enabled && var.https_enabled && var.additional_certs != [] ? length(var.additional_certs) : 0
listener_arn = join("", aws_lb_listener.https.*.arn)
certificate_arn = var.additional_certs[count.index]
}

0 comments on commit 61bef2b

Please sign in to comment.