change test for available_ip by available_ip

This commit is contained in:
Nicolas Boufidjeline 2022-06-29 22:33:26 +02:00
parent af8d274163
commit 10415c275d
No known key found for this signature in database
GPG Key ID: 8DC009DF411D3BE1

View File

@ -2,14 +2,14 @@ data "netbox_prefix" "network" {
cidr = var.netbox_prefix
}
resource "netbox_available_ip_address" "test" {
resource "netbox_available_ip_address" "available_ip" {
prefix_id = data.netbox_prefix.network.id
description = var.name
dns_name = var.dns_name
}
output "ip_addr" {
value = netbox_available_ip_address.test.ip_address
value = netbox_available_ip_address.available_ip.ip_address
}
data "xenorchestra_sr" "local_storage" {
@ -39,7 +39,7 @@ resource "xenorchestra_vm" "bar" {
ssh_keys = var.ssh_keys
})
cloud_network_config = templatefile("cloud_network_config.tftpl", {
ip = "${replace(netbox_available_ip_address.test.ip_address, "var.netmask_netbox", var.netmask)}"
ip = "${replace(netbox_available_ip_address.available_ip.ip_address, "var.netmask_netbox", var.netmask)}"
gateway = var.gateway
})
name_label = var.name
@ -75,7 +75,7 @@ resource "local_file" "inventory" {
filename = "inventory"
content = <<EOF
[all]
${split("/", netbox_available_ip_address.test.ip_address)[0]}
${split("/", netbox_available_ip_address.available_ip.ip_address)[0]}
EOF
}