JSON / YAML zu Terraform HCL Variablen- & Locals-Generator
Konvertieren Sie JSON- und YAML-Payloads in Terraform HCL-Typbeschränkungen (type = object({...})), Standardwerte, locals-Blöcke und terraform.tfvars-Definitionen.
variable "app_config" {
description = "Auto-generated Terraform variable constraint for app_config"
type = object({
cidr_block = string
enable_dns_hostnames = bool
enable_dns_support = bool
max_azs = number
nat_gateways = list(string)
subnets = list(object({
az = string
cidr = string
is_public = bool
name = string
route_table_id = string
}))
tags = map(string)
vpc_name = string
})
default = {
cidr_block = "10.100.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
max_azs = 3
nat_gateways = ["nat-08127394821a", "nat-09823412344b"]
subnets = [
{
az = "us-east-1a"
cidr = "10.100.1.0/24"
is_public = true
name = "public-1a"
route_table_id = "rtb-01a9b2c3d4"
},
{
az = "us-east-1b"
cidr = "10.100.2.0/24"
is_public = true
name = "public-1b"
route_table_id = "rtb-01a9b2c3d4"
},
{
az = "us-east-1a"
cidr = "10.100.10.0/24"
is_public = false
name = "private-app-1a"
route_table_id = "rtb-09f8e7d6c5"
},
{
az = "us-east-1b"
cidr = "10.100.11.0/24"
is_public = false
name = "private-app-1b"
route_table_id = "rtb-09f8e7d6c5"
}
]
tags = {
CostCenter = "infra-0091"
Environment = "production"
ManagedBy = "terraform"
Owner = "cloud-platform-team"
}
vpc_name = "prod-useast1-vpc"
}
}
100% clientseitige AST-Synthese
Das gesamte JSON- und YAML-Parsing, die AST-Baumdurchquerung und die Terraform-HCL-Typsynthese werden lokal im Arbeitsspeicher Ihres Browsers ohne Netzwerkanfragen oder Telemetrie ausgeführt.
Terraform 1.3+ Konformität & Optionals
Erkennt fehlende oder nullable Felder automatisch und kapselt sie in die standardmäßige optional(type, default)-Syntax, um Laufzeit-Typfehler bei Terraform plan zu verhindern.
Multi-Dialekt Infrastruktur-Export
Exportiert nahtlos produktionsreife variables.tf-Typbeschränkungen, terraform.tfvars-Wertdefinitionen, locals.tf-Konfigurationsblöcke und tfvars.json-Dateien.