Changing namespace? maybe of the resource for machine configuration

This commit is contained in:
vandomej 2025-09-27 21:38:07 -07:00
parent 99c4435b3d
commit 1afd54a973

View file

@ -57,8 +57,8 @@ resource "libvirt_network" "talos_network" {
# Generate machine secrets
resource "talos_machine_secrets" "this" {}
# Create control plane configuration - FIXED: Use the correct data source
data "talos_machine_configuration" "controlplane" {
# Create control plane configuration
data "talos_machine_configuration" "this" {
cluster_name = var.cluster_name
cluster_endpoint = "https://10.5.0.2:6443"
machine_type = "controlplane"
@ -123,7 +123,7 @@ resource "libvirt_domain" "talos-controlplane" {
cmdline = [
{
"talos.platform" = "metal"
"talos.config" = base64encode(data.talos_machine_configuration.controlplane.machine_configuration) # FIXED: Correct attribute
"talos.config" = base64encode(data.talos_machine_configuration.this.machine_configuration) # FIXED: Correct attribute
ip = "10.5.0.2::10.5.0.1:255.255.255.0::eth0:off"
init_on_alloc = "1"
"_" = "slab_nomerge"