All checks were successful
Update Version / Update Version (push) Successful in 5s
64 lines
1.7 KiB
Markdown
64 lines
1.7 KiB
Markdown
<!--
|
|
git.auengun.net/homelab/opentofu-common
|
|
Copyright (C) 2024 GregoryDosh
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
SPDX-FileCopyrightText: 2024 GregoryDosh
|
|
-->
|
|
|
|
# OpenTofu (Terraform) Common Module
|
|
|
|
A really basic module for me to tinker in my Homelab while doing more ad-hoc IaC.
|
|
|
|
```tf
|
|
locals {
|
|
hostname = "servicename"
|
|
internal_ipv4 = "10.0.20.99"
|
|
}
|
|
|
|
variable "cloudflare_account_id" {
|
|
type = string
|
|
nullable = false
|
|
sensitive = true
|
|
}
|
|
|
|
variable "cloudflare_zone_id" {
|
|
type = string
|
|
nullable = false
|
|
sensitive = true
|
|
}
|
|
|
|
module "servicename" {
|
|
source = "git::https://git.auengun.net/homelab/opentofu-common.git"
|
|
hostname = local.hostname
|
|
internal_ipv4 = local.internal_ipv4
|
|
dns_split_horizon = true
|
|
|
|
cloudflare = {
|
|
enabled = true
|
|
account_id = var.cloudflare_account_id
|
|
zone_id = var.cloudflare_zone_id
|
|
|
|
direct_access = true
|
|
}
|
|
|
|
proxmox_lxc = {
|
|
enabled = true
|
|
tags = [local.hostname]
|
|
app_mp_path = format("/%s", local.hostname)
|
|
}
|
|
}
|
|
```
|