the existing infrastructure

This commit is contained in:
Platform team
2026-11-02 09:55:39 +00:00
commit b2c2460a52
21 changed files with 537 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# Illustrative only: swap in vsphere_virtual_machine, proxmox_vm_qemu,
# kubevirt_virtual_machine or a cloud provider's instance resource.
resource "terraform_data" "vm" {
input = {
name = "${var.environment}-${var.name}"
template = var.template
cpu = var.cpu
memory_mb = var.memory_gb * 1024
disks = var.disks
vlan = var.vlan
ip = var.ip
backup_policy = var.backup_policy
tags = var.tags
}
}
output "id" { value = terraform_data.vm.id }
+24
View File
@@ -0,0 +1,24 @@
variable "name" { type = string }
variable "environment" { type = string }
variable "template" { type = string }
variable "cpu" { type = number }
variable "memory_gb" { type = number }
variable "disks" {
type = list(object({
size_gb = number
tier = optional(string, "standard")
}))
}
variable "vlan" { type = number }
variable "ip" {
type = string
default = null
}
variable "backup_policy" {
type = string
default = null
}
variable "tags" {
type = map(string)
default = {}
}