Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Feb 16, 2024
1 parent 37b2818 commit cf42aae
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "Getting Terraform JSON outputs..."
for i in "plex" "swarm_manager" "swarm_worker"; do
for i in "plex" "swarm_manager" "swarm_worker" "hetzner"; do
echo " ... ${i}"
terraform output -raw ${i} > ../.build/${i}.json
echo "<li><a href=\"${i}.json\">${i}</a></li>" >> ../.build/index.html
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.terraform
*.tfstate
*.tfstate*
14 changes: 14 additions & 0 deletions terraform/files/sections/base_hetzner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
variant: flatcar
version: 1.0.0

storage:
disks:
- device: /dev/sdb

files:
- path: /etc/systemd/system.conf.d/10-env-base.conf
mode: 0644
contents:
inline: |
[Manager]
DefaultEnvironment=FC_TEST_VAR=hello-world
11 changes: 11 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,14 @@ data "ct_config" "plex" {
file("files/sections/nfs.yml")
]
}

data "ct_config" "hetzner" {
content = file("files/sections/base_hetzner.yml")
strict = true
pretty_print = false

snippets = [
# Sectionss
file("files/sections/users.yml")
]
}
4 changes: 4 additions & 0 deletions terraform/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ output "swarm_worker" {
output "plex" {
value = data.ct_config.plex.rendered
}

output "hetzner" {
value = data.ct_config.hetzner.rendered
}
58 changes: 42 additions & 16 deletions terraform/terraform.tfstate

Large diffs are not rendered by default.

0 comments on commit cf42aae

Please sign in to comment.