mirror of
https://github.com/tolerryan/NewWatari.git
synced 2026-10-12 09:27:42 +00:00
reconfigure for bgp provider
This commit is contained in:
@@ -7,51 +7,68 @@ terraform {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "proxmox_lxc" "downloader" {
|
|
||||||
target_node = "ryuk2"
|
resource "proxmox_virtual_environment_container" "example_template" {
|
||||||
|
description = "Managed by Terraform"
|
||||||
|
start_on_boot = "true"
|
||||||
|
wait_for_ip {
|
||||||
|
ipv4 = true
|
||||||
|
}
|
||||||
|
disk {
|
||||||
|
#datastore_id = var.virtual_environment_storage
|
||||||
|
# ^ Possible template example
|
||||||
|
datastore_id = "local-lvm"
|
||||||
|
size = 4
|
||||||
|
}
|
||||||
|
|
||||||
|
#mount_point {
|
||||||
|
# // volume mount
|
||||||
|
# volume = var.virtual_environment_storage
|
||||||
|
# size = "4G"
|
||||||
|
# path = "mnt/local"
|
||||||
|
#}
|
||||||
|
|
||||||
|
initialization {
|
||||||
|
dns {
|
||||||
|
servers = ["1.1.1.1", "8.8.8.8"]
|
||||||
|
}
|
||||||
|
|
||||||
hostname = "downloader"
|
hostname = "downloader"
|
||||||
vmid = 222
|
|
||||||
ostemplate = "cephfs:vztmpl/debian-13-standard_13.3-sudo_amd64.tar.zst"
|
|
||||||
password = "terraform"
|
|
||||||
unprivileged = true
|
|
||||||
cores = 6
|
|
||||||
memory = 2096
|
|
||||||
swap = 1024
|
|
||||||
start = true
|
|
||||||
tags = "terraform;deb13"
|
|
||||||
nameserver = "192.168.0.224"
|
|
||||||
ssh_public_keys = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINFw70PrMsilcsqCrwW1I6PAt3anQbhmVg+t/HUfomug ryan@mxDesktop"
|
|
||||||
|
|
||||||
features {
|
ip_config {
|
||||||
nesting = true
|
ipv4 {
|
||||||
}
|
address = "192.168.0.22"
|
||||||
|
|
||||||
rootfs {
|
|
||||||
storage = "local-lvm"
|
|
||||||
size = "42G"
|
|
||||||
}
|
|
||||||
|
|
||||||
mountpoint{
|
|
||||||
key = "0"
|
|
||||||
slot = 0
|
|
||||||
storage = "local-lvm"
|
|
||||||
mp = "/data"
|
|
||||||
size = "300G"
|
|
||||||
}
|
|
||||||
|
|
||||||
network {
|
|
||||||
name = "eth0"
|
|
||||||
bridge = "vmbr0"
|
|
||||||
ip = "192.168.0.22/24"
|
|
||||||
gw = "192.168.0.1"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
provisioner "local-exec" {
|
|
||||||
command = "./.ansible.d/setup.sh $IP"
|
|
||||||
environment = {
|
|
||||||
IP = "192.168.0.58"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user_account {
|
||||||
|
# keys = [trimspace(tls_private_key.example.public_key_openssh)]
|
||||||
|
password = "example"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
network_interface {
|
||||||
|
name = "veth0"
|
||||||
|
mtu = 1450
|
||||||
|
}
|
||||||
|
|
||||||
|
#node_name = data.proxmox_virtual_environment_nodes.example.names[0]
|
||||||
|
# ^ possible way to template the node_name
|
||||||
|
node_name = "watari"
|
||||||
|
|
||||||
|
operating_system {
|
||||||
|
template_file_id = "debian-13-standard_13.3-sudo_amd64.tar.zst"
|
||||||
|
type = "debian"
|
||||||
|
}
|
||||||
|
|
||||||
|
tags = [
|
||||||
|
"deb13",
|
||||||
|
"terraform",
|
||||||
|
]
|
||||||
|
|
||||||
|
startup {
|
||||||
|
order = "3"
|
||||||
|
up_delay = "60"
|
||||||
|
down_delay = "60"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user