terraform { required_providers { brf = { source = "brftech/brf" version = "~> 0.1" } } } variable "brf_api_key" { type = string sensitive = true description = "BRF Stack API anahtariniz (brf__) — panelden alin." } variable "db_password" { type = string sensitive = true } provider "brf" { api_key = var.brf_api_key # ya da: export BRF_API_KEY=brf_... # BRF Stack API sunucusu IP ile adreslendigi icin sertifika dogrulamasi atlanir: insecure_skip_verify = true } # Sanal makine resource "brf_virtual_machine" "web" { name = "web-1" instance_type = "u1.medium" os_image = "ubuntu" disk_gb = 50 ssh_keys = ["ssh-ed25519 AAAA... siz@bilgisayar"] external = true external_ports = [22, 80, 443] } # Yonetilen PostgreSQL resource "brf_postgres" "appdb" { name = "appdb" size_gb = 20 replicas = 2 version = 17 users = { appuser = { password = var.db_password } } databases = { app = { admins = ["appuser"] } } } output "vm_status" { value = brf_virtual_machine.web.status_phase }