mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 07:43:07 +00:00
Compare commits
16 Commits
8d96b54738
...
de26dbe2f0
| Author | SHA1 | Date | |
|---|---|---|---|
| de26dbe2f0 | |||
| 8b16085acf | |||
| ac61fdff12 | |||
| 47102e563d | |||
| 3e00706c93 | |||
| d9f9620123 | |||
| 2fc7391161 | |||
| 905b749a09 | |||
| d279104aea | |||
| 992a949b6d | |||
| c75c4869e9 | |||
| 387702c3c3 | |||
| 13872af0ac | |||
| 1bf18d13a3 | |||
| 196b851e42 | |||
| de1ea64e04 |
15
proxmox.tf
15
proxmox.tf
@ -119,6 +119,9 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Configuração da interface de rede
|
# Configuração da interface de rede
|
||||||
|
network_device {
|
||||||
|
bridge = "vmbr0" # rede de gestão para comunicação com Cluster A
|
||||||
|
}
|
||||||
network_device {
|
network_device {
|
||||||
bridge = "vmbr2"
|
bridge = "vmbr2"
|
||||||
}
|
}
|
||||||
@ -132,6 +135,12 @@ initialization {
|
|||||||
address = "dhcp"
|
address = "dhcp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ip_config {
|
||||||
|
ipv4 {
|
||||||
|
address = "dhcp"
|
||||||
|
}
|
||||||
|
}
|
||||||
user_data_file_id = proxmox_virtual_environment_file.cloud_init_yaml.id
|
user_data_file_id = proxmox_virtual_environment_file.cloud_init_yaml.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,6 +178,12 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
|
|||||||
gateway = each.value.gateway
|
gateway = each.value.gateway
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ip_config {
|
||||||
|
ipv4 {
|
||||||
|
address = each.value.ip2
|
||||||
|
gateway = each.value.gateway
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
|
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@ variable "proxmox_k8s_vms" {
|
|||||||
vm_id = number
|
vm_id = number
|
||||||
node_name = string
|
node_name = string
|
||||||
ip = string
|
ip = string
|
||||||
|
ip2 = string
|
||||||
cores = optional(number)
|
cores = optional(number)
|
||||||
memory = optional(number)
|
memory = optional(number)
|
||||||
data_store = optional(string)
|
data_store = optional(string)
|
||||||
|
|||||||
Reference in New Issue
Block a user