We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29b8ed1 commit a1156a9Copy full SHA for a1156a9
1 file changed
dns.tf
@@ -1,4 +1,11 @@
1
2
+check "dns_configuration" {
3
+ assert {
4
+ condition = !(var.base_domain != "" && var.app_subdomain != "" && !var.enable_cloudflare_dns)
5
+ error_message = "Base domain and app subdomain are configured but enable_cloudflare_dns is false. DNS record will not be created."
6
+ }
7
+}
8
+
9
# DNS CNAME record for application subdomain pointing to Google Cloud Run
10
resource "cloudflare_record" "app" {
11
count = var.enable_cloudflare_dns && var.base_domain != "" ? 1 : 0
0 commit comments