sless-primer/PG_TEST/main.tf
Repinoid 333093ab6c Add PG_TEST example - PostgreSQL testing suite
Example Terraform configuration for testing PostgreSQL integration:
- main.tf: VPC and database setup
- postgres.tf: Database resource definitions
- outputs.tf: Output values for connection
- test_basic.sh: Basic connectivity tests
- test_lifecycle.sh: Full lifecycle testing
- terraform.tfvars.example: Configuration template
- .gitignore: Ignore sensitive data and terraform artifacts
2026-04-04 08:38:55 +03:00

60 lines
1.8 KiB
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 2026-04-01 main.tf: провайдеры и объявления переменных.
// Этот файл не нужно редактировать. Все настройки в terraform.tfvars.
terraform {
required_providers {
nubes = {
source = "terra.k8c.ru/nubes/nubes"
version = "5.0.55"
}
}
}
// Объявления переменных
// Значения задаются в terraform.tfvars не трогать этот файл.
variable "api_token" {
type = string
sensitive = true
description = "Nubes API token"
}
variable "s3_uid" {
type = string
sensitive = true
description = "UUID S3-bucket для бэкапов PostgreSQL"
}
variable "realm" {
type = string
description = "Realm — идентификатор зоны/проекта в Nubes"
}
variable "pg_resource_name" {
type = string
description = "Имя инстанса PostgreSQL (уникально в рамках realm)"
}
variable "pg_username" {
type = string
description = "Имя пользователя PostgreSQL"
}
variable "pg_db_name" {
type = string
description = "Имя создаваемой базы данных"
}
variable "pg_role" {
type = string
description = "Роль пользователя"
}
// Провайдер
provider "nubes" {
api_token = var.api_token
log_level = "debug"
api_endpoint = "https://deck-api-test.ngcloud.ru/api/v1/index.cfm"
}