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 <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2023-05-29 13:53:01 +03:00 committed by clbot
parent 830bc9961a
commit 70b87c1797

View file

@ -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
}