about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-05-29T10·53+0300
committerclbot <clbot@tvl.fyi>2023-05-31T11·43+0000
commit70b87c1797832bb4930fd6bce779c272119c4479 (patch)
tree62053f78a86f69f97dfdd9cb4d0ef5338c1eb15e
parent830bc9961af0947a5e14948808f19145afa7ddc7 (diff)
feat(corp/ops): configure bucket hosting configuration r/6225
This doesn't have redirects for weird routes yet, but I think that's
doable somehow.

Change-Id: Iaaac711304f9b2bd8ea04302940e9e9259cd67c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8663
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
-rw-r--r--corp/ops/yandex/rih.tf17
1 files changed, 17 insertions, 0 deletions
diff --git a/corp/ops/yandex/rih.tf b/corp/ops/yandex/rih.tf
index 765c14461168..de51ad738e80 100644
--- a/corp/ops/yandex/rih.tf
+++ b/corp/ops/yandex/rih.tf
@@ -31,6 +31,15 @@ resource "yandex_storage_bucket" "rih_storage_bucket" {
   secret_key = yandex_iam_service_account_static_access_key.rih_sa_static_key.secret_key
   bucket     = "russiaishiring.com"
   folder_id  = local.rih_folder_id
+  acl        = "public-read"
+
+  https {
+    certificate_id = yandex_cm_certificate.russiaishiring_com.id
+  }
+
+  website {
+    index_document = "index.html"
+  }
 }
 
 resource "yandex_cm_certificate" "russiaishiring_com" {
@@ -50,3 +59,11 @@ resource "yandex_dns_recordset" "acme_russiaishiring_com" {
   data    = [yandex_cm_certificate.russiaishiring_com.challenges[0].dns_value]
   ttl     = 60
 }
+
+resource "yandex_dns_recordset" "aname_russiaishiring_com" {
+  zone_id = yandex_dns_zone.russiaishiring_com.id
+  name    = "russiaishiring.com."
+  type    = "ANAME"
+  data    = ["russiaishiring.com.website.yandexcloud.net"]
+  ttl     = 600
+}