examples: DEVfromGround vc_org, NODEJS, VM, POSTGRES updates

This commit is contained in:
Naeel
2026-03-26 08:33:03 +03:00
parent 2b03ba520e
commit 547994dc55
11 changed files with 216 additions and 217 deletions
+32
View File
@@ -0,0 +1,32 @@
// Создано: 2026-03-23
// main.tf — провайдер Nubes + переменные для примера NODEJS.
// Ресурс nubes_nodejs: managed Node.js приложение в облаке (не sless-функция).
terraform {
required_providers {
nubes = {
source = "terra.k8c.ru/nubes/nubes"
version = "5.0.19"
}
}
}
variable "api_token" {
type = string
sensitive = true
}
variable "realm" {
type = string
description = "resource_realm — зона размещения ресурса (например: k8s-3-sandbox-nubes-ru)"
}
variable "git_path" {
type = string
description = "URL git-репозитория с кодом приложения"
}
provider "nubes" {
api_token = var.api_token
api_endpoint = "https://deck-api-test.ngcloud.ru/api/v1/index.cfm"
}
+22
View File
@@ -0,0 +1,22 @@
# Создано: 2026-03-23
# nodejs.tf — ресурс nubes_nodejs: managed Node.js приложение.
# Параметры взяты из документации terra.k8c.ru/docs/nubes/nubes/5.0.19/30_registry/resources/nodejs_params_create/
resource "nubes_nodejs" "app" {
resource_name = "nodejsdemo1"
domain = "domma"
resource_realm = var.realm
git_path = var.git_path
app_version = "23"
resource_c_p_u = 500
resource_memory = 1024
resource_instances = 1
json_env = jsonencode({})
adopt_existing_on_create = true
# health_path не задан — используется дефолтный /
}
output "nodejs_domain" {
description = "Домен развёрнутого Node.js приложения"
value = nubes_nodejs.app.domain
}