Skip to content

Commit 9837917

Browse files
committed
feat: support letsencrypt_enabled on canonical domain
Add letsencrypt variable (default: true) to control automatic Let's Encrypt TLS certificate provisioning on the canonical domain. Set to false when using a custom certificate (e.g. wildcard). Replaces the outdated comment about unsupported TLS attributes in domains.tf. Requires scalingo provider ~> 2.7 (letsencrypt_enabled added in v2.3.0).
1 parent 862ae93 commit 9837917

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

domains.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ resource "scalingo_domain" "canonical_domain" {
55
canonical = true
66
common_name = var.domain
77

8-
# Attributes not supported by the provider on v2.2 :
9-
# tlscert - optional: SSL Certificate you want to associate with the domain
10-
# tlskey - optional: Private key used to create the SSL certificate
8+
letsencrypt_enabled = var.letsencrypt
119
}
1210

1311
resource "scalingo_domain" "domain_aliases" {

variables.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ variable "addons" {
157157
# }
158158

159159
variable "domain" {
160-
description = "Main domain name of the application, known as \"canonical domain\" in Scalingo's dashboard. Note that SSL configuration must be completed through the dashboard."
160+
description = "Main domain name of the application, known as \"canonical domain\" in Scalingo's dashboard."
161161
type = string
162162
default = null
163163
nullable = true
@@ -168,6 +168,13 @@ variable "domain" {
168168
}
169169
}
170170

171+
variable "letsencrypt" {
172+
description = "Enable Let's Encrypt automatic TLS for the canonical domain. Set to false when using a custom certificate."
173+
type = bool
174+
default = true
175+
nullable = false
176+
}
177+
171178
variable "domain_aliases" {
172179
description = "List of others domain names for the application"
173180
type = list(string)

0 commit comments

Comments
 (0)