iac/terraform/main.tf

76 lines
1.8 KiB
Terraform
Raw Normal View History

2024-07-12 23:57:29 -04:00
terraform {
2024-11-03 01:38:02 -04:00
required_version = ">= 1.0.0"
2024-07-12 23:57:29 -04:00
2024-11-03 01:38:02 -04:00
backend "s3" {
2024-10-12 13:23:20 -04:00
bucket = "BigBuckets"
region = "us-ashburn-1"
key = "tf.tfstate"
skip_region_validation = true
skip_credentials_validation = true
skip_requesting_account_id = true
use_path_style = true
skip_s3_checksum = true
skip_metadata_api_check = true
endpoints = {
2024-10-12 13:27:33 -04:00
s3 = var.s3_endpoint
2024-07-12 23:57:29 -04:00
}
2024-10-13 10:48:04 -04:00
access_key = var.aws_access_key_id
secret_key = var.aws_secret_access_key
2024-10-12 13:23:20 -04:00
}
2024-07-12 23:57:29 -04:00
}
2024-11-03 01:38:02 -04:00
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.66.3"
}
}
}
2024-07-12 23:57:29 -04:00
provider "proxmox" {
2024-10-12 13:23:20 -04:00
endpoint = var.virtual_environment_endpoint
password = var.ssh_password
username = "root@pam"
insecure = true
2024-07-12 23:57:29 -04:00
ssh {
agent = true
2024-10-12 13:23:20 -04:00
username = "root"
password = var.ssh_password
node {
name = "prox"
address = var.prox_ip_address
}
2024-07-12 23:57:29 -04:00
node {
2024-10-12 13:23:20 -04:00
name = "pve2"
address = var.pve2_ip_address
2024-07-12 23:57:29 -04:00
}
}
}
2024-11-03 01:38:02 -04:00
module "proxmox" {
source = "./proxmox"
virtual_environment_endpoint = var.virtual_environment_endpoint
virtual_environment_api = var.virtual_environment_api
arrbuntu_ip_address = var.arrbuntu_ip_address
vlan_gateway = var.vlan_gateway
downloaders_ip_address = var.downloaders_ip_address
ssh_password = var.ssh_password
ssh_username = var.ssh_username
prox_ip_address = var.prox_ip_address
npm_ip_address = var.npm_ip_address
init_username = var.init_username
init_password = var.init_password
kasm_ip = var.kasm_ip
kasm_ssh_ip = var.kasm_ssh_ip
ubu_ip_address = var.ubu_ip_address
pve2_ip_address = var.pve2_ip_address
s3_endpoint = var.s3_endpoint
aws_secret_access_key = var.aws_secret_access_key
aws_access_key_id = var.aws_access_key_id
}