Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlucci committed Nov 27, 2023
2 parents 014a3b7 + 4db19fe commit 0e9f150
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
on:
workflow_call:
inputs:
additional_certificate_arns:
# Arrays are not supported by Github resuable workflow inputs. It might be best to
# move back to defining each environment workflow completely independently.
default: "[]"
description: "A set of additional ACM certificate ARNs to be assigned to the ALB listener."
required: false
type: string
aws_region:
description: The AWS region target for deployment
required: true
Expand Down Expand Up @@ -64,6 +71,7 @@ jobs:
- name: Terraform Apply
run: |
terraform apply -auto-approve \
-var="additional_certificate_arns=${{ inputs.additional_certificate_arns }}" \
-var="aws_region=${{ inputs.aws_region }}" \
-var="aws_replication_region=${{ inputs.aws_replication_region }}" \
-var="dns_name=${{ inputs.dns_name }}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
aws_region: us-east-1
aws_replication_region: us-west-2
aws_s3_terraform_state_object_key: production.tfstate
dns_name: aws-ecs-demo.carlucci.network
dns_name: prod.aws-ecs-demo.carlucci.network
environment_name: prod
vpc_cidr_index: 0
secrets:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.3.0

* Additional ACM certificate assignment

# 0.2.1

* HOTFIX: Fix production dns_name in manifest
Expand Down
8 changes: 8 additions & 0 deletions terraform/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,11 @@ resource "aws_lb_listener" "https" {
port = 443
protocol = "HTTPS"
}

# Support the assigment of external certificates by ARN
resource "aws_lb_listener_certificate" "additional" {
for_each = var.additional_certificate_arns

listener_arn = aws_lb_listener.https.arn
certificate_arn = each.value
}
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "additional_certificate_arns" {
default = []
description = "A set of additional ACM certificate ARNs to be assigned to the ALB listener."
type = set(string)
}

variable "aws_region" {
default = "us-east-1"
description = "The AWS region name in which the main infrastructure should be deployed."
Expand Down

0 comments on commit 0e9f150

Please sign in to comment.