First commit, basic dev infra working

+43
.gitignore
···
···
+
# Created by https://www.toptal.com/developers/gitignore/api/ansible,terraform
+
# Edit at https://www.toptal.com/developers/gitignore?templates=ansible,terraform
+
+
### Ansible ###
+
*.retry
+
+
### Terraform ###
+
# Local .terraform directories
+
**/.terraform/*
+
+
# .tfstate files
+
*.tfstate
+
*.tfstate.*
+
+
# Crash log files
+
crash.log
+
crash.*.log
+
+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
+
# password, private keys, and other secrets. These should not be part of version
+
# control as they are data points which are potentially sensitive and subject
+
# to change depending on the environment.
+
*.tfvars
+
*.tfvars.json
+
+
# Ignore override files as they are usually used to override resources locally and so
+
# are not checked in
+
override.tf
+
override.tf.json
+
*_override.tf
+
*_override.tf.json
+
+
# Include override files you do wish to add to version control using negated pattern
+
# !example_override.tf
+
+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
+
# example: *tfplan*
+
+
# Ignore CLI configuration files
+
.terraformrc
+
terraform.rc
+
+
# End of https://www.toptal.com/developers/gitignore/api/ansible,terraform
+1
README.md
···
···
+
# Tangled Knot IAC
+23
infra/dev/.terraform.lock.hcl
···
···
+
# This file is maintained automatically by "tofu init".
+
# Manual edits may be lost in future updates.
+
+
provider "registry.opentofu.org/lxc/incus" {
+
version = "1.0.0"
+
constraints = "1.0.0"
+
hashes = [
+
"h1:60Pdmig/YGfoubppeZzkOLbEJO5r14N49pg30et4nkE=",
+
"zh:05b9c9d6934cf657653b4e75fb31845bad3d4c65f9a87a710e65405521bec1b4",
+
"zh:12ce15d9234ec68fff961dda83f0c7b2c2ed2011fc816f00b3cd3b5a408080d8",
+
"zh:14ab1a712d78037013dfc16d8d3b36f3b479aca2f93e222e9befca880c180d1e",
+
"zh:180b4a2bcaa66f9b8e3c660500c0f5e20c5449bdfb8b20384693f3358ccc8a55",
+
"zh:3f38c9ceb5f2a1e6a5ef82af158e1d211032408b8bdc71b42ccb7fbc722335cb",
+
"zh:42c640a13186c9a02a2fbd75846ab31f24e722ff5270f0133519108a60a38258",
+
"zh:44e5f5595029914d5fe1db2175d1ba33fcbdc4cb551702570846e236bcaf1aa2",
+
"zh:5971304c486478d27062d80b61f49559e39164053458015ece42683aeff47c08",
+
"zh:72113b3aff6f77b177369010f16147bf6c4269420c4db32ad9a6d63182a10874",
+
"zh:774e607d54a5889c612b8d8a1ca576355d0c5e1921ea1d8fb9a18191791f440b",
+
"zh:aa722a1262ee8df025140ebe594514ddcf03cc37f1bd008249401fc9bbd7f6e2",
+
"zh:df91629cf7098cee682ffce3670786b849a672e81dc7f6b547db65a60e2bb261",
+
"zh:e5e6581eb12db0bf8bde2acdbec8dcc305a1b67cb8e1ae90967ca1eebbf9a3e3",
+
]
+
}
+33
infra/dev/main.tf
···
···
+
terraform {
+
required_providers {
+
incus = {
+
source = "lxc/incus"
+
version = "1.0.0"
+
}
+
}
+
}
+
+
provider "incus" {}
+
+
resource "incus_instance" "knot0" {
+
name = "nudo0"
+
project = "tangled"
+
image = "images:ubuntu/24.04"
+
type = "virtual-machine"
+
+
config = {
+
"boot.autostart" = "false"
+
"limits.cpu" = 2
+
"limits.memory" = "2GB"
+
}
+
+
profiles = ["default"]
+
+
wait_for {
+
type = "ipv4"
+
}
+
}
+
+
output "knot0_ipv4" {
+
value = incus_instance.knot0.ipv4_address
+
}