iac_modules/terraform-hcl-standard/vultr-vps/envs/ai-workspace/variables.tf
Haitao Pan de7fe511d7 feat(vultr-vps): ai-workspace IaC env with YAML+Jinja2 render and Ansible linkage
- envs/ai-workspace: hosts.yaml -> generate.py renders explicit Terraform
  module/resource blocks via Jinja2 (no for_each/count); terraform runtime
  output merged with YAML -> cmdb.json + inventory.ini for Ansible.
- modules/compute: backups bool -> "enabled"/"disabled" (vultr provider
  2.19+); add required_providers to compute & iam modules.
- skills/terraform-yaml-render-pattern + terraform-hcl-standard/AGENTS.md:
  binding spec for the render pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 20:57:19 +08:00

29 lines
939 B
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.

# 全局变量。值由 generate.py 从 hosts.yaml 的 global 段渲染进
# terraform.auto.tfvars.json 后传入(即 “YAML 描述资源信息 -> variables.tf”
# 逐主机的资源不走变量,而是由 generate.py 用 Jinja2 渲染成 generated_hosts.tf
# 里的显式 module/resource 块(不使用 for_each/count 等 HCL 控制结构)。
variable "vultr_api_key" {
description = "Vultr API Key请通过环境变量 TF_VAR_vultr_api_key 提供(勿写入 YAML/tfvars"
type = string
sensitive = true
}
variable "region" {
description = "默认部署区域,主机未单独指定 region 时使用"
type = string
default = "nrt"
}
variable "name_prefix" {
description = "实例 label 前缀"
type = string
default = "ai-workspace"
}
variable "user_data_file" {
description = "cloud-init 脚本路径"
type = string
default = "cloud-init.yaml"
}