18 Commits

Author SHA1 Message Date
91c89163ab [deploy-opentofu]
[deploy-opentofu]
2026-04-07 21:22:58 +00:00
765d969477 [deploy-opentofu]
[deploy-opentofu]
2026-04-07 21:15:45 +00:00
e09fa70452 consul
consul
2026-04-07 20:52:23 +00:00
705c5df1f5 [deploy-opentofu]
[deploy-opentofu]
2025-12-09 19:38:15 +00:00
88de7affda [deploy-opentofu]
[deploy-opentofu]
2025-12-09 13:40:55 +00:00
4934c33104 c
c
2025-12-08 15:26:32 +00:00
d2241e2dfa Update proxmox.variables.tf 2025-12-08 15:25:54 +00:00
6fc1890c1c [deploy-opentofu]
[deploy-opentofu]
2025-12-08 15:18:37 +00:00
3e49c091f5 a
a
2025-12-08 15:17:35 +00:00
39cb2a6c20 [deploy-opentofu]
[deploy-opentofu]
2025-12-08 15:05:01 +00:00
c11f2e3c25 a
a
2025-12-08 15:04:19 +00:00
badfc5fa24 [deploy-opentofu]
[deploy-opentofu]
2025-12-08 14:42:03 +00:00
d3db951dfa [deploy-opentofu]
[deploy-opentofu]
2025-12-08 14:33:59 +00:00
7a32716a23 Update proxmox.variables.tf 2025-12-08 14:26:40 +00:00
1a8f746bbd Update proxmox.tf 2025-12-02 14:14:36 +00:00
c70b254a84 [deploy-opentofu] 2025-11-07 17:21:29 +00:00
fb1f46a27d Update proxmox.tf 2025-11-05 19:15:36 +00:00
3a6706b9bc Update proxmox.tf 2025-11-05 14:33:56 +00:00
4 changed files with 24 additions and 18 deletions

View File

@ -1 +1,3 @@
the most stable branch is main, dev is where tests are made, and the remaining branches are personal and can undergo changes at any time the most stable branch is main, dev is where tests are made, and the remaining branches are personal and can undergo changes at any time
i had to redo consul

View File

@ -19,7 +19,7 @@ resource "proxmox_virtual_environment_download_file" "latest_ubunto_cloud_img" {
content_type = "iso" content_type = "iso"
datastore_id = "local" datastore_id = "local"
node_name = "fenix" node_name = "fenix"
url = "https://cloud-images.ubuntu.com/jammy/20251023/jammy-server-cloudimg-amd64.img" url = "https://cloud-images.ubuntu.com/jammy/20260218/jammy-server-cloudimg-amd64.img"
file_name = "jammyservercloudimgamd64.img" file_name = "jammyservercloudimgamd64.img"
} }
@ -105,6 +105,7 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
cpu { cpu {
cores = 2 cores = 2
type = "host"
} }
memory { memory {
@ -116,14 +117,13 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id
interface = "scsi0" interface = "scsi0"
file_format = "qcow2" file_format = "qcow2"
size = 64
} }
# Configuração da interface de rede # Configuração da interface de rede
network_device { network_device {
bridge = "vmbr0" # rede de gestão para comunicação com Cluster A bridge = "vmbr0" # rede de gestão para comunicação com Cluster B
vlan_id = 20
} }
initialization { initialization {
dns { dns {
@ -149,10 +149,12 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
clone { clone {
vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id
full = true
} }
cpu { cpu {
cores = each.value.cores cores = each.value.cores
type = "host"
} }
memory { memory {
@ -165,6 +167,16 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
interface = "scsi1" interface = "scsi1"
} }
# Bloco dinâmico para lista de hostpci
dynamic "hostpci" {
for_each = try(each.value.hostpci, [])
content {
device = hostpci.value.device
pcie = try(hostpci.value.pcie, true)
mapping = hostpci.value.mapping
}
}
initialization { initialization {
ip_config { ip_config {
ipv4 { ipv4 {

View File

@ -42,6 +42,11 @@ variable "proxmox_k8s_vms" {
ip = string ip = string
ip2 = string ip2 = string
ip3 = string ip3 = string
hostpci = optional(list(object({
pcie = bool
device = string
mapping = string
})))
cores = optional(number) cores = optional(number)
memory = optional(number) memory = optional(number)
data_store = optional(string) data_store = optional(string)

View File

@ -10,19 +10,6 @@ provider "vaultwarden" {
admin_token = var.vaultwarden_admin_token admin_token = var.vaultwarden_admin_token
} }
resource "vaultwarden_account_register" "vaultwarden-acount-fenix" {
name = "fenix"
email = var.vaultwarden_email
password = var.vaultwarden_master_password
}
resource "bitwarden_item_login" "administrative-user" {
name = "teste"
username = "teste"
password = "teste"
collection_ids = [vaultwarden_organization_collection.vaultwarden-collection-iac.id]
}
resource "vaultwarden_organization" "vaultwarden-organization-fenix-iac" { resource "vaultwarden_organization" "vaultwarden-organization-fenix-iac" {
name = "fenix-iac" name = "fenix-iac"
} }