Adding first files
This commit is contained in:
38
provider.tf
Normal file
38
provider.tf
Normal file
@@ -0,0 +1,38 @@
|
||||
# Proxmox Provider
|
||||
# ---
|
||||
# Initial Provider Configuration for Proxmox
|
||||
|
||||
terraform {
|
||||
|
||||
#required_version = "= 0.13.0"
|
||||
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "Telmate/proxmox"
|
||||
version = "3.0.1-rc4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "proxmox_api_url" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "proxmox_api_token_id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "proxmox_api_token_secret" {
|
||||
type = string
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
|
||||
pm_api_url = var.proxmox_api_url
|
||||
pm_api_token_id = var.proxmox_api_token_id
|
||||
pm_api_token_secret = var.proxmox_api_token_secret
|
||||
|
||||
# (Optional) Skip TLS Verification
|
||||
pm_tls_insecure = true
|
||||
|
||||
}
|
||||
42
test-srv.tf
Normal file
42
test-srv.tf
Normal file
@@ -0,0 +1,42 @@
|
||||
resource "proxmox_lxc" "LXC" {
|
||||
target_node = "pve"
|
||||
hostname = "testsrv"
|
||||
vmid = 999
|
||||
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
|
||||
password = "terraform"
|
||||
unprivileged = true
|
||||
nesting = true
|
||||
cores = 5
|
||||
memory = 4096
|
||||
swap = 1024
|
||||
start = true
|
||||
tags = "terraform"
|
||||
nameserver = "192.168.0.24"
|
||||
ssh_public_keys = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINFw70PrMsilcsqCrwW1I6PAt3anQbhmVg+t/HUfomug ryan@mxDesktop"
|
||||
|
||||
rootfs {
|
||||
storage = "nvme"
|
||||
size = "32G"
|
||||
}
|
||||
|
||||
mountpoint{
|
||||
key = "0"
|
||||
slot = 0
|
||||
storage = "Cephtest"
|
||||
mp = "/data"
|
||||
size = "400G"
|
||||
}
|
||||
|
||||
network {
|
||||
name = "eth0"
|
||||
bridge = "vmbr0"
|
||||
ip = "192.168.0.243/24"
|
||||
gw = "192.168.0.1"
|
||||
|
||||
}
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "./.ansible.d/setup.sh"
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user