mirror of
https://github.com/devitq/yandexcloud-k3s.git
synced 2026-09-22 03:50:36 +00:00
feat(terraform): updated configs for yc lab
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
resource "yandex_api_gateway" "frontend" {
|
||||
name = "frontend"
|
||||
description = "API Gateway for frontend"
|
||||
execution_timeout = "300"
|
||||
|
||||
connectivity {
|
||||
network_id = yandex_vpc_network.default.id
|
||||
}
|
||||
|
||||
custom_domains {
|
||||
fqdn = local.final_frontend_domain
|
||||
certificate_id = yandex_cm_certificate.default.id
|
||||
}
|
||||
|
||||
log_options {
|
||||
log_group_id = yandex_logging_group.api_gateway.id
|
||||
min_level = "INFO"
|
||||
}
|
||||
|
||||
spec = templatefile("${path.module}/configs/api_gateway/spec.yaml", {
|
||||
bucket_name = yandex_storage_bucket.frontend.bucket
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
resource "yandex_cm_certificate" "default" {
|
||||
name = replace(lower(var.domain), ".", "-")
|
||||
description = "Default certificate for all resources"
|
||||
deletion_protection = true
|
||||
|
||||
domains = tolist([var.domain, "*.${var.domain}"])
|
||||
|
||||
managed {
|
||||
challenge_type = "DNS_CNAME"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
resource "yandex_storage_bucket" "frontend" {
|
||||
bucket = local.final_frontend_domain
|
||||
default_storage_class = "STANDARD"
|
||||
force_destroy = false
|
||||
max_size = 104857600
|
||||
|
||||
anonymous_access_flags {
|
||||
config_read = false
|
||||
list = true
|
||||
read = true
|
||||
}
|
||||
}
|
||||
|
||||
resource "yandex_storage_bucket" "frontend_develop" {
|
||||
bucket = local.final_frontend_develop_domain
|
||||
default_storage_class = "STANDARD"
|
||||
force_destroy = false
|
||||
max_size = 104857600
|
||||
|
||||
anonymous_access_flags {
|
||||
config_read = false
|
||||
list = true
|
||||
read = true
|
||||
}
|
||||
}
|
||||
|
||||
resource "yandex_storage_bucket_iam_binding" "frontend_bucket_push" {
|
||||
bucket = yandex_storage_bucket.frontend.bucket
|
||||
role = "storage.editor"
|
||||
|
||||
members = [
|
||||
"serviceAccount:${yandex_iam_service_account.frontend_push_sa.id}",
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user