fix: tolerate proxmox self-signed tls
This commit is contained in:
parent
230fd06ea2
commit
a95ce14f82
|
|
@ -33,17 +33,9 @@ resource "null_resource" "stage_talos_image" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create all required VLAN interfaces based on the unique bridges map
|
|
||||||
resource "proxmox_virtual_environment_network_linux_vlan" "cluster_vlan" {
|
|
||||||
for_each = {}
|
|
||||||
|
|
||||||
node_name = each.value.proxmox_node
|
|
||||||
name = "${each.value.phys_iface}.${each.value.vlan_id}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create all required network bridges
|
# Create all required network bridges
|
||||||
resource "proxmox_virtual_environment_network_linux_bridge" "cluster_bridge" {
|
resource "proxmox_virtual_environment_network_linux_bridge" "cluster_bridge" {
|
||||||
for_each = local.unique_bridges
|
for_each = {}
|
||||||
|
|
||||||
node_name = each.value.proxmox_node
|
node_name = each.value.proxmox_node
|
||||||
name = each.value.bridge_name
|
name = each.value.bridge_name
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import argparse
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import ssl
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
@ -16,7 +17,8 @@ def api_request(base_url, token, method, path, data=None):
|
||||||
req.add_header("Content-Type", "application/x-www-form-urlencoded")
|
req.add_header("Content-Type", "application/x-www-form-urlencoded")
|
||||||
else:
|
else:
|
||||||
payload = None
|
payload = None
|
||||||
with urllib.request.urlopen(req, data=payload) as response:
|
context = ssl._create_unverified_context()
|
||||||
|
with urllib.request.urlopen(req, data=payload, context=context) as response:
|
||||||
return json.loads(response.read().decode())
|
return json.loads(response.read().decode())
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ variable "node_interfaces" {
|
||||||
variable "create_vlan_interface" {
|
variable "create_vlan_interface" {
|
||||||
description = "Whether to create VLAN interfaces (true for tagged VLANs, false for untagged)"
|
description = "Whether to create VLAN interfaces (true for tagged VLANs, false for untagged)"
|
||||||
type = bool
|
type = bool
|
||||||
default = true
|
default = false
|
||||||
}
|
}
|
||||||
|
|
||||||
# --- Registry Proxy Configuration ---
|
# --- Registry Proxy Configuration ---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue