forked from fediversity/fediversity
32 lines
650 B
HCL
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
|
|
}
|