Fediversity/deployment/run/tf-netbox-cluster/main.tf
Kiara Grouwstra cd5d1400bf
assign available netbox IP to a netbox VM
Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
2025-11-14 11:12:34 +01:00

32 lines
650 B
HCL

terraform {
required_providers {
netbox = {
source = "e-breuninger/netbox"
version = "= 5.0.0"
}
}
backend "http" {
}
}
data "netbox_cluster_type" "type" {
name = var.cluster_type_name
}
resource "netbox_cluster" "cluster" {
cluster_type_id = data.netbox_cluster_type.type.id
name = var.name
cluster_group_id = var.cluster_group_id
comments = var.comments
description = var.description
location_id = var.location_id
region_id = var.region_id
site_group_id = var.site_group_id
site_id = var.site_id
tags = var.tags
tenant_id = var.tenant_id
}
output "id" {
value = netbox_cluster.cluster.id
}