mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Compare commits
8 Commits
9edc3fe55d
...
8b16085acf
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b16085acf | |||
| 47102e563d | |||
| d9f9620123 | |||
| 905b749a09 | |||
| 992a949b6d | |||
| 387702c3c3 | |||
| 1bf18d13a3 | |||
| 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
|
||||
network_device {
|
||||
bridge = "vmbr0" # rede de gestão para comunicação com Cluster A
|
||||
}
|
||||
network_device {
|
||||
bridge = "vmbr2"
|
||||
}
|
||||
@ -132,6 +135,12 @@ initialization {
|
||||
address = "dhcp"
|
||||
}
|
||||
}
|
||||
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = "dhcp"
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ variable "proxmox_k8s_vms" {
|
||||
vm_id = number
|
||||
node_name = string
|
||||
ip = string
|
||||
ip2 = string
|
||||
cores = optional(number)
|
||||
memory = optional(number)
|
||||
data_store = optional(string)
|
||||
|
||||
Reference in New Issue
Block a user