Skip to content

Commit

Permalink
fix(opengb): opengb. -> backend. (#919)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Jun 18, 2024
1 parent 538d9b8 commit dfe5f8b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
5 changes: 2 additions & 3 deletions infra/tf/dns/cert_packs.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
# Required if:
#
# - OpenGB is enabled so requires access to `*.opengb.{domain_main}`
# - OpenGB is enabled so requires access to `*.backend.{domain_main}`
# - Main domain is not at the root of the zone, we need to provide a cert pack for the domain.
# - Using the old `{service}.api.{domain}` format, which requires two levels of subdomains.
needs_main_cert_pack = var.opengb_enabled || var.dns_deprecated_subdomains || data.cloudflare_zone.main.name != var.domain_main
Expand Down Expand Up @@ -41,8 +41,7 @@ resource "cloudflare_certificate_pack" "main" {
"*.api.${var.domain_main}",
],
var.opengb_enabled ? [
"*.opengb.${var.domain_main}",
"db.opengb-internal.${var.domain_main}"
"*.backend.${var.domain_main}",
] : []
])
)))
Expand Down
3 changes: 1 addition & 2 deletions infra/tf/tls/cloudflare.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ resource "cloudflare_origin_ca_certificate" "rivet_gg" {
"api.${var.domain_main}",
],
var.opengb_enabled ? [
"*.opengb.${var.domain_main}",
"db.opengb-internal.${var.domain_main}"
"*.backend.${var.domain_main}",
] : []
])
request_type = "origin-rsa"
Expand Down
6 changes: 1 addition & 5 deletions lib/bolt/core/src/dep/terraform/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,7 @@ async fn vars(ctx: &ProjectContext) {
// OpenGB
extra_dns.push(json!({
"zone_name": "main",
"name": format!("*.opengb.{domain_main}"),
}));
extra_dns.push(json!({
"zone_name": "main",
"name": format!("db.opengb-internal.{domain_main}"),
"name": format!("*.backend.{domain_main}"),
}));

// Add services
Expand Down
2 changes: 1 addition & 1 deletion lib/util/core/src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ pub fn opengb_env(project_name_id: &str, env_name_id: &str) -> GlobalResult<Stri
let domain_main = unwrap!(domain_main(), "dns not enabled");

Ok(format!(
"https://{}--{}.opengb.{}/",
"https://{}--{}.backend.{}/",
project_name_id,
env_name_id,
domain_main,
Expand Down

0 comments on commit dfe5f8b

Please sign in to comment.