feat(gitops): implement NATS JetStream and TrueNAS staging provisioning (Phase 5)
This commit is contained in:
parent
2b533f4375
commit
2340c5a0e7
3 changed files with 160 additions and 0 deletions
|
|
@ -4,6 +4,10 @@ terraform {
|
|||
source = "bpg/proxmox"
|
||||
version = "~> 0.61.0"
|
||||
}
|
||||
truenas = {
|
||||
source = "deevus/truenas"
|
||||
version = "~> 0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17,10 +21,25 @@ variable "pr_number" {
|
|||
type = string
|
||||
}
|
||||
|
||||
variable "truenas_snapshot_id" {
|
||||
description = "The ID of the TrueNAS snapshot to clone"
|
||||
type = string
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
# Relies on PROXMOX_VE_ENDPOINT and PROXMOX_VE_API_TOKEN environment variables
|
||||
}
|
||||
|
||||
provider "truenas" {
|
||||
# Relies on TRUENAS_API_KEY and TRUENAS_BASE_URL environment variables
|
||||
}
|
||||
|
||||
resource "truenas_dataset" "staging_clone" {
|
||||
pool = "tank"
|
||||
path = "production/staging-pr-${var.pr_number}"
|
||||
snapshot_id = var.truenas_snapshot_id
|
||||
}
|
||||
|
||||
resource "proxmox_virtual_environment_vm" "staging_vm" {
|
||||
name = "staging-pr-${var.pr_number}"
|
||||
description = "Ephemeral staging environment for PR #${var.pr_number}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue