Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 8910dd8

Browse files
committed
k8s: use manually-created cert instead of managing one
We used to manage our own certs, but that proved a bit hard given that *.linaro.org domains belonged to another account. Thanks to Kelley Spoon, certs are now configured outside of terraform.
1 parent a85cc9f commit 8910dd8

File tree

6 files changed

+11
-45
lines changed

6 files changed

+11
-45
lines changed

terraform/k8s.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,21 @@ resource "kubernetes_namespace" "qareports_k8s_namespace" {
1111
}
1212
}
1313

14+
#
15+
# Use a manually-created, ACM-issued, DNS-validated certificate
16+
#
17+
data "aws_acm_certificate" "qareports_acm_certificate" {
18+
domain = "${var.canonical_dns_name}"
19+
types = ["AMAZON_ISSUED"]
20+
most_recent = true
21+
}
22+
1423
resource "kubernetes_service" "qareports_web_service" {
1524
metadata {
1625
name = "qareports-web-service"
1726
namespace = "qareports-${var.environment}"
1827
annotations {
19-
"service.beta.kubernetes.io/aws-load-balancer-ssl-cert" = "${aws_acm_certificate.qareports_acm_certificate.arn}"
28+
"service.beta.kubernetes.io/aws-load-balancer-ssl-cert" = "${data.aws_acm_certificate.qareports_acm_certificate.arn}"
2029
"service.beta.kubernetes.io/aws-load-balancer-backend-protocol" = "http"
2130
"service.beta.kubernetes.io/aws-load-balancer-ssl-ports" = "443"
2231
}

terraform/loadbalancer.tf

Lines changed: 0 additions & 35 deletions
This file was deleted.

terraform/production.tfvars

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
environment = "production"
22
canonical_dns_name = "qa-reports.linaro.org"
3-
dns_name = "qa-reports.ctt.linaro.org"
43
mq_node_type = "t3.micro"
54
db_node_type = "t3.xlarge"
65
db_storage = 749
76
db_max_storage = 3000
8-
db_engine_version = "9.6.18"
7+
db_engine_version = "12.3"
98
db_parameter_group = "default.postgres12"
10-
dns_validation_method = "EMAIL"

terraform/staging.tfvars

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
environment = "staging"
22
canonical_dns_name = "staging-qa-reports.linaro.org"
3-
dns_name = "staging-qa-reports.ctt.linaro.org"
43
mq_node_type = "t3a.nano"
54
db_node_type = "t2.medium"
65
db_storage = 500
76
db_max_storage = 750
87
db_engine_version = "12.3"
98
db_parameter_group = "default.postgres12"
10-
dns_validation_method = "EMAIL"

terraform/testing.tfvars

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
environment = "testing"
22
canonical_dns_name = "testing-qa-reports.linaro.org"
3-
dns_name = "testing-qa-reports.ctt.linaro.org"
43
mq_node_type = "t3.nano"
54
db_node_type = "t3.medium"
65
db_storage = 500
76
db_max_storage = 600
87
db_engine_version = "12.3"
98
db_parameter_group = "default.postgres12"
10-
dns_validation_method = "EMAIL"

terraform/variables.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ variable "db_username" { type = "string" }
2020
variable "db_password" { type = "string" }
2121
variable "route53_zone_id" { type = "string" }
2222
variable "canonical_dns_name" { type = "string" }
23-
variable "dns_name" { type = "string" }
24-
variable "dns_validation_method" { type = "string" }
2523
variable "openid_provider_arn" { type = "string" }
2624
variable "openid_provider_url" { type = "string" }
2725

0 commit comments

Comments
 (0)