From 70b87c1797832bb4930fd6bce779c272119c4479 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 29 May 2023 13:53:01 +0300 Subject: [PATCH] feat(corp/ops): configure bucket hosting configuration 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 Autosubmit: tazjin --- corp/ops/yandex/rih.tf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/corp/ops/yandex/rih.tf b/corp/ops/yandex/rih.tf index 765c14461..de51ad738 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 +}