Showcase update - 66063be9
Quote Bot CI/CD Pipeline / check (push) Canceled after 0s
Quote Bot CI/CD Pipeline / Security Scan (push) Canceled after 0s
Quote Bot CI/CD Pipeline / Build and push to Docker Hub (push) Canceled after 0s
Quote Bot CI/CD Pipeline / Deploy to VPS via Ansible (push) Canceled after 0s

This commit is contained in:
GitLab CI/CD
2026-09-13 16:14:43 +00:00
commit 92f86d0d97
20 changed files with 676 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
resource "yandex_compute_filesystem" "shared_disk" {
name = "my-shared-30gb-disk"
type = "network-hdd"
size = 30
zone = "ru-central1-d"
}
data "yandex_compute_image" "ubuntu" {
family = "ubuntu-2404-lts"
}
resource "yandex_compute_instance" "servers" {
count = 2
name = "server-${count.index + 1}"
platform_id = "standard-v3"
zone = "ru-central1-d"
resources {
cores = 2
memory = 2
}
# Указываем загрузочный диск с Ubuntu
boot_disk {
initialize_params {
image_id = data.yandex_compute_image.ubuntu.id
size = 10 # Размер загрузочного диска
}
}
# Подключаем наш общий диск на 30 ГБ
filesystem {
filesystem_id = yandex_compute_filesystem.shared_disk.id
device_name = "shared-disk"
}
# Подключаем сервер к подсети (которая лежит в файле network.tf)
network_interface {
subnet_id = yandex_vpc_subnet.subnet.id
# Даем белый IP только первому серверу
nat = count.index == 0 ? true : false
}
}