Skip to content

Commit 196e972

Browse files
committed
fix(sdn): corrected tests
1 parent 9840cf4 commit 196e972

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

example/resource_virtual_environment_download_file.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ resource "proxmox_virtual_environment_download_file" "release_20250610_ubuntu_24
44
content_type = "vztmpl"
55
datastore_id = "local"
66
node_name = var.virtual_environment_node_name
7-
url = var.release_20240725_ubuntu_24_noble_lxc_img_url
8-
checksum = var.release_20240725_ubuntu_24_noble_lxc_img_checksum
7+
url = var.release_20250610_ubuntu_24_noble_lxc_img_url
8+
checksum = var.release_20250610_ubuntu_24_noble_lxc_img_checksum
99
checksum_algorithm = "sha256"
1010
upload_timeout = 4444
1111
overwrite_unmanaged = true

example/resource_virtual_environment_sdn.tf

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ resource "proxmox_virtual_environment_sdn_vnet" "vnet_simple" {
2424
isolate_ports = "0"
2525
vlanaware = "0"
2626
zonetype = proxmox_virtual_environment_sdn_zone.zone_simple.type
27+
depends_on = [ proxmox_virtual_environment_sdn_zone.zone_simple ]
2728
}
2829

2930
resource "proxmox_virtual_environment_sdn_vnet" "vnet_vlan" {
@@ -32,6 +33,7 @@ resource "proxmox_virtual_environment_sdn_vnet" "vnet_vlan" {
3233
alias = "vnet in zoneVLAN"
3334
tag = 1000
3435
zonetype = proxmox_virtual_environment_sdn_zone.zone_vlan.type
36+
depends_on = [ proxmox_virtual_environment_sdn_zone.zone_vlan ]
3537
}
3638

3739
# --- SDN Subnets ---
@@ -48,6 +50,7 @@ resource "proxmox_virtual_environment_sdn_subnet" "subnet_simple" {
4850
]
4951
gateway = "10.10.0.1"
5052
snat = true
53+
depends_on = [ proxmox_virtual_environment_sdn_vnet.vnet_simple ]
5154
}
5255

5356
resource "proxmox_virtual_environment_sdn_subnet" "subnet_simple2" {
@@ -62,6 +65,7 @@ resource "proxmox_virtual_environment_sdn_subnet" "subnet_simple2" {
6265
]
6366
gateway = "10.40.0.1"
6467
snat = true
68+
depends_on = [ proxmox_virtual_environment_sdn_vnet.vnet_simple ]
6569
}
6670

6771
resource "proxmox_virtual_environment_sdn_subnet" "subnet_vlan" {
@@ -76,21 +80,25 @@ resource "proxmox_virtual_environment_sdn_subnet" "subnet_vlan" {
7680
]
7781
gateway = "10.20.0.100"
7882
snat = false
83+
depends_on = [ proxmox_virtual_environment_sdn_vnet.vnet_vlan ]
7984
}
8085

8186
# --- Data Sources ---
8287

8388
data "proxmox_virtual_environment_sdn_zone" "zone_ex" {
84-
name = "ZoneEx"
89+
name = "zoneS"
90+
depends_on = [ proxmox_virtual_environment_sdn_zone.zone_simple ]
8591
}
8692

8793
data "proxmox_virtual_environment_sdn_vnet" "vnet_ex" {
88-
name = "VnetEx"
94+
name = "vnetM"
95+
depends_on = [ proxmox_virtual_environment_sdn_vnet.vnet_simple ]
8996
}
9097

9198
data "proxmox_virtual_environment_sdn_subnet" "subnet_ex" {
92-
subnet = "ZoneEx-100.100.0.0-24"
99+
subnet = "zoneS-10.10.0.0-24"
93100
vnet = data.proxmox_virtual_environment_sdn_vnet.vnet_ex.id
101+
depends_on = [ proxmox_virtual_environment_sdn_subnet.subnet_simple ]
94102
}
95103

96104
# --- Outputs ---

fwprovider/test/resource_sdn_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ func TestAccResourceSDN(t *testing.T) {
2626
resource "proxmox_virtual_environment_sdn_zone" "zone_simple" {
2727
name = "zoneS"
2828
type = "simple"
29-
nodes = "weisshorn-proxmox"
29+
nodes = "pve"
3030
mtu = 1496
3131
}
3232
3333
resource "proxmox_virtual_environment_sdn_zone" "zone_vlan" {
3434
name = "zoneVLAN"
3535
type = "vlan"
36-
nodes = "weisshorn-proxmox"
36+
nodes = "pve"
3737
mtu = 1500
3838
bridge = "vmbr0"
3939
}
@@ -108,7 +108,7 @@ func TestAccResourceSDN(t *testing.T) {
108108
"name": "zoneS",
109109
"type": "simple",
110110
"mtu": "1496",
111-
"nodes": "weisshorn-proxmox",
111+
"nodes": "pve",
112112
}),
113113
ResourceAttributes("proxmox_virtual_environment_sdn_zone.zone_vlan", map[string]string{
114114
"name": "zoneVLAN",

0 commit comments

Comments
 (0)