diff --git a/sys/terraform/elb.tf b/sys/terraform/elb.tf index 3e394675..175cc42c 100644 --- a/sys/terraform/elb.tf +++ b/sys/terraform/elb.tf @@ -57,7 +57,7 @@ resource "aws_lb_listener" "elblistener80" { resource "aws_lb_listener" "elblistener443" { load_balancer_arn = aws_lb.elb.arn - certificate_arn = "arn:aws:acm:eu-west-1:478389220392:certificate/2225440f-8847-4834-a90b-4b81a0105955" + certificate_arn = aws_acm_certificate.cert.arn port = 443 default_action { type = "fixed-response" diff --git a/sys/terraform/import.tf b/sys/terraform/import.tf index d7f93a0f..0831c5f0 100644 --- a/sys/terraform/import.tf +++ b/sys/terraform/import.tf @@ -102,3 +102,9 @@ import { to = aws_iam_user_policy.lb_ro id = "github_action_deploy:GitHubActionsDeploy" } + +# ACM +import { + to = aws_acm_certificate.cert + id = "arn:aws:acm:eu-west-1:478389220392:certificate/2225440f-8847-4834-a90b-4b81a0105955" +} diff --git a/sys/terraform/variables.tf b/sys/terraform/variables.tf index 05302a16..91a28656 100644 --- a/sys/terraform/variables.tf +++ b/sys/terraform/variables.tf @@ -8,11 +8,6 @@ variable "ecr_image_tag_php" { type = string } -variable "elb_certificate_arn" { - description = "Specifies the ARN of the Certificate." - type = string -} - variable "environment" { description = "The Environment" type = string