deploy vault node

This commit is contained in:
Vivian 2021-10-17 15:14:29 +02:00
parent 120ad6fbea
commit 18ec1212b3
No known key found for this signature in database
GPG key ID: A3923C699D1A3BDA
2 changed files with 36 additions and 4 deletions

View file

@ -1,9 +1,15 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.example.com/telmate/proxmox" {
version = "9.9.9"
hashes = [
"h1:BnhIwXbxNF0NLvXes4/WiLGEldeU5UZWlLg3vrO/kog=",
]
}
provider "registry.terraform.io/telmate/proxmox" {
version = "2.8.0"
constraints = "2.8.0"
version = "2.8.0"
hashes = [
"h1:RmEhNI5/T73g8+gSqy20MSgszjTquC+srhIflQWlNRE=",
"zh:210fe85f6bdc51196dbda2c12de5fd0ddd597704fc91f5a08346cebd7493ff42",

30
main.tf
View file

@ -1,8 +1,7 @@
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "2.8.0"
source = "registry.example.com/telmate/proxmox"
}
}
}
@ -20,6 +19,10 @@ resource "proxmox_lxc" "nixos-template" {
ostemplate = "local:vztmpl/nixos-unstable-default_156198829_amd64.tar.xz"
ostype = "unmanaged"
unprivileged = true
vmid = "101"
template = true
memory = 1024
features {
nesting = true
@ -34,6 +37,29 @@ resource "proxmox_lxc" "nixos-template" {
name = "eth0"
bridge = "vmbr0"
ip = "dhcp"
hwaddr = "22:D7:C1:FF:9D:5F"
}
}
resource "proxmox_lxc" "vault" {
target_node = "nuc"
description = "Vault Secrets Management"
hostname = "vault"
unprivileged = true
vmid = "102"
clone = "101"
memory = 1024
rootfs {
storage = "local-zfs"
size = "8G"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "dhcp"
hwaddr = "16:2B:87:55:0C:0C"
}
}