364 Commits

Author SHA1 Message Date
d04cc7477c [deploy-opentofu] 2025-09-10 22:01:24 +00:00
0b0e3db854 [deploy-opentofu] 2025-09-10 20:35:02 +00:00
fe6663673e LICENSE MIT
LICENSE MIT
2025-09-10 20:09:50 +00:00
2fcac46684 Update secrets/vaultwarden.secrets.tfvars 2025-09-08 16:14:59 +00:00
041f77429e Update secrets/proxmox.secrets.tfvars 2025-09-08 16:14:14 +00:00
88ab62e984 remove cat 2025-09-08 14:56:14 +00:00
df781f735e [deploy-opentofu] bw unlock correction 2025-09-08 14:50:29 +00:00
1b1b393991 [deploy-opentofu] bw unlock correction 2025-09-08 14:46:55 +00:00
2264ff0488 [deploy-opentofu] bw unlock correction 2025-09-08 14:40:10 +00:00
306b5eb9e7 [deploy-opentofu] bw unlock correction 2025-09-08 14:34:36 +00:00
ac1960d922 [deploy-opentofu] 2025-09-08 14:30:13 +00:00
70950eadb6 Update .gitea/workflows/ci-test.yaml 2025-09-07 23:28:23 +00:00
774001b5aa [deploy-opentofu] 2025-09-07 23:23:10 +00:00
c5d5cf2a10 [deploy-opentofu] 2025-09-07 23:15:36 +00:00
40007ba35f [deploy-opentofu] 2025-09-07 23:03:42 +00:00
c83f0f4aaa [deploy-opentofu] 2025-09-07 22:57:44 +00:00
82eddfd517 [deploy-opentofu] 2025-09-07 22:52:17 +00:00
727809dd6c [deploy-opentofu] 2025-09-07 22:49:02 +00:00
10e9475483 Update secrets/vault-secrets-map.json 2025-09-07 22:41:55 +00:00
0aad474652 [deploy-opentofu] 2025-09-07 22:37:17 +00:00
ba9652301a [deploy-opentofu] 2025-09-07 22:33:20 +00:00
e24dcb720e [deploy-opentofu] 2025-09-07 22:25:29 +00:00
b96751a4ce Update .gitea/workflows/ci-test.yaml 2025-09-07 22:17:55 +00:00
db2568ba7e [deploy-opentofu] 2025-09-07 22:11:57 +00:00
70d52b9784 [deploy-opentofu] 2025-09-07 22:03:48 +00:00
f96803b9be [deploy-opentofu] 2025-09-07 21:54:18 +00:00
b196c2ffd2 Update main.tf 2025-09-07 21:40:24 +00:00
cc06ed6c09 Update .gitea/workflows/ci-test.yaml 2025-09-07 21:29:58 +00:00
2155c97a3c [deploy-opentofu] 2025-09-07 21:22:08 +00:00
79397d70f1 [deploy-opentofu] 2025-09-07 21:15:48 +00:00
c3b3e828b0 [deploy-opentofu] 2025-09-07 21:10:00 +00:00
239313d556 Update secrets/vault-secrets-map.json 2025-09-07 21:08:36 +00:00
34c3ed14d6 [deploy-opentofu] 2025-09-07 21:03:20 +00:00
ea6271cd50 [deploy-opentofu] 2025-09-07 20:45:51 +00:00
65f6deccda [deploy-opentofu] 2025-09-07 20:39:19 +00:00
a04643f51e [deploy-opentofu] 2025-09-07 20:34:59 +00:00
493cae1f9a Update secrets/vault-secrets-map.json 2025-09-07 20:31:32 +00:00
419496ec3c Update .gitea/workflows/ci-test.yaml 2025-09-07 20:30:39 +00:00
0785512528 [deploy-opentofu] 2025-09-07 20:24:28 +00:00
6f6cff06e1 get via vaultwarden 2025-09-07 19:47:42 +01:00
f55b0d07b0 Update .gitea/workflows/ci-test.yaml 2025-09-01 16:48:52 +00:00
ab48730a54 Update .gitea/workflows/ci-test.yaml 2025-09-01 16:46:14 +00:00
e7dad50119 Update secrets/vaultwarden.secrets.tfvars 2025-09-01 16:16:53 +00:00
dc278c3dad Update .gitea/workflows/ci-test.yaml 2025-08-29 09:35:33 +00:00
a25012c4d9 testando o [deploy-opentofu] 2025-08-28 21:01:47 +00:00
0df8fc03a0 Update proxmox.tf 2025-08-28 17:10:29 +00:00
021ab2b057 Update proxmox.tf 2025-08-28 17:01:47 +00:00
37f5c52cc0 Update cloud-init-base.yaml 2025-08-28 16:57:04 +00:00
492bfc9519 Update proxmox.tf 2025-08-28 16:56:09 +00:00
db3fdaa087 Add cloud-init-wrapper.yaml.tftpl 2025-08-28 16:52:38 +00:00
9c0adce319 Update .gitea/workflows/ci-test.yaml 2025-08-28 16:51:11 +00:00
f071302722 revert 0d2aa11fca
revert Update .gitea/workflows/ci-test.yaml
2025-08-28 16:50:07 +00:00
cb04a5aa5c Update proxmox.tf 2025-08-28 16:12:25 +00:00
937231e815 Update proxmox.tf 2025-08-27 23:39:21 +00:00
31f0ffd1c6 Update proxmox.tf 2025-08-27 23:31:24 +00:00
2a895a8924 Update proxmox.tf 2025-08-27 23:26:10 +00:00
5d5f1b8a20 Update proxmox.tf 2025-08-27 22:54:37 +00:00
197a1656cb Update proxmox.tf 2025-08-27 22:49:23 +00:00
0a5caedfcd Update proxmox.tf 2025-08-27 22:42:39 +00:00
5f01a1ab40 Update cloud-init-base.yaml 2025-08-27 22:32:29 +00:00
5ae6d0f51c Update proxmox.tf 2025-08-27 22:23:01 +00:00
21f8b84b7d Update cloud-init-base.yaml 2025-08-27 22:03:18 +00:00
1b6c25cae3 Update cloud-init-base.yaml 2025-08-27 21:49:34 +00:00
680633fefe Update cloud-init-vm.yaml.tftpl 2025-08-27 21:42:50 +00:00
40d55dfd23 Update cloud-init-base.yaml 2025-08-27 21:41:22 +00:00
0fd1686f2a Update cloud-init-base.yaml 2025-08-27 20:44:26 +00:00
ae89f7062c Update cloud-init-vm.yaml.tftpl 2025-08-27 20:18:34 +00:00
783c4fcb33 Update merge_yaml.py 2025-08-27 20:10:20 +00:00
0d2aa11fca Update .gitea/workflows/ci-test.yaml 2025-08-27 20:06:05 +00:00
a6a980f24c Update merge_yaml.py 2025-08-27 19:58:06 +00:00
013518813f Update merge_yaml.py 2025-08-27 19:06:39 +00:00
82243fa145 Update cloud-init-vm.yaml.tftpl 2025-08-27 19:02:17 +00:00
2bfaa72d81 Update cloud-init-vm.yaml.tftpl 2025-08-27 19:00:51 +00:00
62af6c9c28 Update cloud-init-vm.yaml.tftpl 2025-08-27 18:36:14 +00:00
79a8acb794 Update cloud-init-vm.yaml.tftpl 2025-08-27 18:19:17 +00:00
13d33506e6 Update cloud-init-vm.yaml.tftpl 2025-08-27 18:06:33 +00:00
3b6f28c522 Update cloud-init-vm.yaml.tftpl 2025-08-27 17:36:12 +00:00
c160abf546 Update cloud-init-vm.yaml.tftpl 2025-08-27 17:18:02 +00:00
31434adc99 Update cloud-init-vm.yaml.tftpl 2025-08-27 17:00:14 +00:00
d42e297ca6 Update cloud-init-vm.yaml.tftpl 2025-08-27 14:13:19 +00:00
ec340b7f6b Update cloud-init-vm.yaml.tftpl 2025-08-27 14:02:41 +00:00
e866b5c2cf Update cloud-init-vm.yaml.tftpl 2025-08-27 13:52:41 +00:00
bf045fa7e8 Update cloud-init-vm.yaml.tftpl 2025-08-27 13:47:09 +00:00
6a18aa937b Update merge_yaml.py 2025-08-27 13:34:28 +00:00
d6a27d8f4f Update .gitea/workflows/ci-test.yaml 2025-08-27 13:31:31 +00:00
0a9d8a08de Update cloud-init-vm.yaml.tftpl 2025-08-27 13:20:57 +00:00
214a587e0f Update cloud-init-base.yaml 2025-08-27 13:20:39 +00:00
c7e9308a7a Update .gitea/workflows/ci-test.yaml 2025-08-27 13:10:48 +00:00
3ae0671e6d Update proxmox.tf 2025-08-27 11:33:36 +00:00
8e40b70b0f Update proxmox.tf 2025-08-27 11:25:34 +00:00
9fd88af475 Update proxmox.tf 2025-08-27 10:25:15 +00:00
08f2896c85 Update proxmox.tf 2025-08-27 10:17:40 +00:00
c49e9e6f55 Update proxmox.tf 2025-08-27 10:17:06 +00:00
017865126d python 2025-08-27 10:14:14 +00:00
95b9e4490b Add merge_yaml.py 2025-08-27 10:11:31 +00:00
2eb54cf48e Update proxmox.tf 2025-08-27 09:40:40 +00:00
86edcc3bf7 Update .gitea/workflows/ci-test.yaml 2025-08-27 09:32:42 +00:00
35a8f17063 Update .gitea/workflows/ci-test.yaml 2025-08-27 09:26:03 +00:00
cb6c6acd30 Update .gitea/workflows/ci-test.yaml 2025-08-27 09:18:06 +00:00
c496743fcf Update proxmox.tf 2025-08-27 09:13:17 +00:00
f0dcae1694 Update proxmox.tf 2025-08-27 09:09:04 +00:00
a216874980 Update proxmox.tf 2025-08-27 09:08:39 +00:00
aa63551529 Update proxmox.tf 2025-08-27 08:55:44 +00:00
7e1682b967 Update proxmox.tf 2025-08-27 08:41:44 +00:00
db9e04b0d8 Update proxmox.tf 2025-08-27 08:14:14 +00:00
3a09ab7222 Update proxmox.tf 2025-08-26 20:21:20 +00:00
efa41de3c6 Update proxmox.tf 2025-08-26 20:09:30 +00:00
6839b201c9 Update proxmox.tf 2025-08-26 20:04:29 +00:00
c63d01b7e6 Update proxmox.tf 2025-08-26 20:01:05 +00:00
48506d756a Update proxmox.tf 2025-08-26 19:46:24 +00:00
c633e14add Update proxmox.tf 2025-08-26 19:37:37 +00:00
b72966ae33 Update proxmox.tf 2025-08-26 19:33:14 +00:00
b2862089bf Update proxmox.tf 2025-08-26 19:28:49 +00:00
1676ce77ed Update proxmox.tf 2025-08-26 19:17:49 +00:00
59154e65fd Update proxmox.tf 2025-08-26 19:14:38 +00:00
f46e3007e9 Update proxmox.tf 2025-08-26 19:10:03 +00:00
08258abb83 Update proxmox.tf 2025-08-26 19:05:17 +00:00
0475a56863 Update proxmox.tf 2025-08-26 18:56:51 +00:00
dcf9395ca3 Update proxmox.tf 2025-08-26 18:53:17 +00:00
028bbb58d6 Update proxmox.tf 2025-08-26 18:49:31 +00:00
a8c97a6c88 Update proxmox.tf 2025-08-26 18:44:45 +00:00
104aa039d1 Update proxmox.tf 2025-08-26 18:35:29 +00:00
d1304f045f Update proxmox.tf 2025-08-26 18:23:57 +00:00
73c3603883 Update proxmox.tf 2025-08-26 18:13:45 +00:00
a04a7303f1 Update proxmox.tf 2025-08-26 18:07:34 +00:00
5559ecf0be Update proxmox.tf 2025-08-26 17:37:13 +00:00
70dc5ea228 Update proxmox.tf 2025-08-26 17:27:16 +00:00
cbf9c9db6f Update .gitea/workflows/ci-test.yaml 2025-08-26 17:22:02 +00:00
a6d3326ecb Update proxmox.tf 2025-08-26 17:16:50 +00:00
b36eaf88db Update proxmox.tf 2025-08-26 17:02:22 +00:00
084189f173 create cloud-init-base.yaml 2025-08-26 17:01:39 +00:00
2d1792d0dd create cloud-init-vm.yaml.tftpl 2025-08-26 16:59:44 +00:00
28f183d71b Update proxmox.tf 2025-08-26 16:01:30 +00:00
6aa9a02f48 datastore => data_store 2025-08-26 15:20:07 +00:00
95e93539d2 Update proxmox.variables.tf 2025-08-26 14:56:56 +00:00
7b64634e07 Update proxmox.tf 2025-08-26 14:32:23 +00:00
af66f5fceb Update proxmox.tf 2025-08-26 14:04:52 +00:00
bc73c25329 Update proxmox.tf 2025-08-26 14:01:07 +00:00
95243a04ff Update proxmox.tf 2025-08-26 13:49:09 +00:00
58644bdfa9 Update proxmox.tf 2025-08-26 13:37:28 +00:00
c8989775c9 not saved file 2025-08-26 14:19:56 +01:00
4ccb20b3c0 multiple vms 2025-08-26 14:17:45 +01:00
777c8cd299 Update proxmox.tf 2025-08-26 12:20:01 +00:00
d416cda06e Update proxmox.variables.tf 2025-08-26 11:32:00 +00:00
9842d62927 Merge branch 'fenix-admin' of https://gitea.fenix-dev.com/fenix-gitea-admin/iac-teste into fenix-admin 2025-08-25 18:41:02 +01:00
a6ca011a07 dockerfile for runner 2025-08-25 18:40:53 +01:00
d1ac4fefaa Update proxmox.tf 2025-08-25 14:30:31 +00:00
a871d0846b Update proxmox.tf 2025-08-25 14:19:17 +00:00
7d0b01884c Update .gitea/workflows/ci-test.yaml 2025-08-25 14:00:03 +00:00
adadbd8ba1 Update proxmox.tf 2025-08-25 13:56:31 +00:00
e072fde014 Update proxmox.tf 2025-08-25 13:49:10 +00:00
ceff6237c8 Update .gitea/workflows/ci-test.yaml 2025-08-25 13:36:56 +00:00
9405261065 Update proxmox.tf 2025-08-25 13:28:16 +00:00
3e7fb1ccf7 Update proxmox.tf 2025-08-25 13:22:47 +00:00
55a30eff95 Update proxmox.tf 2025-08-25 13:19:02 +00:00
4d754965f0 Update proxmox.tf 2025-08-25 13:15:41 +00:00
3bc674db75 Update proxmox.tf 2025-08-25 12:57:07 +00:00
55e91cd67b Update proxmox.tf 2025-08-25 12:19:12 +00:00
988caf7622 Update proxmox.tf 2025-08-25 12:13:17 +00:00
2625e00049 Update proxmox.tf 2025-08-25 12:00:52 +00:00
bac6ed1e99 Update proxmox.tf 2025-08-25 11:39:53 +00:00
d332046433 Update proxmox.tf 2025-08-25 11:24:41 +00:00
8e703a3ba0 Update proxmox.tf 2025-08-25 11:13:12 +00:00
9585a0a3c7 Update proxmox.tf 2025-08-25 11:01:57 +00:00
8c97379bf2 Update proxmox.tf 2025-08-25 10:51:27 +00:00
4f74ce2e2f Update proxmox.tf 2025-08-25 10:45:51 +00:00
d705e9bab7 Update main.tf 2025-08-25 10:39:04 +00:00
3a20d5a85c Update main.tf 2025-08-25 10:35:44 +00:00
f9198a0db5 Update proxmox.tf 2025-08-25 10:29:57 +00:00
d6c06f74c2 Update main.tf 2025-08-25 10:29:22 +00:00
76b07b969d Update proxmox.tf 2025-08-25 10:13:48 +00:00
beb8cf79a8 Update proxmox.tf 2025-08-25 10:10:19 +00:00
fb2909679a Update proxmox.tf 2025-08-25 10:05:06 +00:00
fe65d8905f Update proxmox.tf 2025-08-25 08:24:40 +00:00
6cbc25dbfe Update proxmox.tf 2025-08-25 08:17:01 +00:00
a3fb1722dc Update proxmox.tf 2025-08-25 08:12:27 +00:00
cd7812edac Update proxmox.tf 2025-08-24 22:57:55 +00:00
2da3deb733 Update proxmox.tf 2025-08-24 22:48:36 +00:00
ed01981656 Update proxmox.tf 2025-08-24 22:29:44 +00:00
6555c64767 Update proxmox.tf 2025-08-24 22:23:30 +00:00
30ba47cc20 Update proxmox.tf 2025-08-24 22:22:06 +00:00
6ad858a264 Update main.tf 2025-08-24 22:20:43 +00:00
746ead6f27 Update proxmox.tf 2025-08-24 22:11:44 +00:00
420329b48b Update proxmox.tf 2025-08-24 22:08:07 +00:00
cac47fe6f5 Update proxmox.tf 2025-08-24 22:03:29 +00:00
d278f781e2 Update proxmox.tf 2025-08-24 21:56:03 +00:00
390e3275a8 Update proxmox.tf 2025-08-24 21:51:37 +00:00
2f1a188a8c Update proxmox.tf 2025-08-24 21:47:15 +00:00
0c3a40743c Update proxmox.tf 2025-08-24 20:58:51 +00:00
207bf91976 Update proxmox.tf 2025-08-24 20:48:26 +00:00
9072fa8f77 Update proxmox.tf 2025-08-24 20:38:17 +00:00
7cd4eedd6e Update proxmox.tf 2025-08-24 19:58:18 +00:00
030a761b08 Update proxmox.tf 2025-08-24 17:55:42 +00:00
553deaa557 Update proxmox.tf 2025-08-24 17:48:32 +00:00
7d590e5374 Update .gitea/workflows/ci-test.yaml 2025-08-24 17:09:51 +00:00
b0bb4e476e Update .gitea/workflows/ci-test.yaml 2025-08-24 17:06:06 +00:00
b0b81e74de Update .gitea/workflows/ci-test.yaml 2025-08-24 17:02:15 +00:00
1768c89c72 Update .gitea/workflows/ci-test.yaml 2025-08-24 16:33:35 +00:00
41baae0ab8 Update .gitea/workflows/ci-test.yaml 2025-08-24 16:32:18 +00:00
93cd83eff6 Merge pull request 'main' (#82) from main into fenix-admin
Reviewed-on: fenix-gitea-admin/iac-teste#82
2025-08-24 16:31:13 +00:00
0cd06acaae Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#81) from fenix-gitea-admin-patch-3 into main
Reviewed-on: fenix-gitea-admin/iac-teste#81
2025-08-24 16:26:07 +00:00
1b997fd59f Update .gitea/workflows/ci-test.yaml 2025-08-24 16:25:31 +00:00
744a7dccd2 Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#80) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#80
2025-08-24 16:21:12 +00:00
8f7c198194 Update .gitea/workflows/ci-test.yaml 2025-08-24 16:20:41 +00:00
e1dba805bb Merge pull request 'fenix-admin' (#79) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#79
2025-08-24 16:18:27 +00:00
b31d09964f Update proxmox.tf 2025-08-24 16:16:39 +00:00
cf4211614d Update .gitea/workflows/ci-test.yaml 2025-08-24 16:10:49 +00:00
de25f44681 Merge pull request 'Update proxmox.tf' (#78) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#78
2025-08-23 18:33:04 +00:00
0dd13874fc Update proxmox.tf 2025-08-23 18:31:15 +00:00
528751a115 Merge pull request 'Update proxmox.tf' (#77) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#77
2025-08-23 18:28:39 +00:00
7dca8f289b Update proxmox.tf 2025-08-23 18:27:18 +00:00
d92e87d359 Merge pull request 'fenix-admin' (#76) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#76
2025-08-23 18:23:55 +00:00
ac37f39b7b Update proxmox.tf 2025-08-23 18:22:23 +00:00
9f90cdb77c Merge pull request 'fenix-gitea-admin-patch-2' (#75) from fenix-gitea-admin-patch-2 into fenix-admin
Reviewed-on: fenix-gitea-admin/iac-teste#75
2025-08-23 18:21:18 +00:00
73d29d1c48 Merge pull request 'Update proxmox.tf' (#74) from fenix-gitea-admin-patch-2 into main
Reviewed-on: fenix-gitea-admin/iac-teste#74
2025-08-23 18:17:32 +00:00
76999cca6f Update proxmox.tf 2025-08-23 18:16:06 +00:00
ffce16f7df Merge pull request 'Update proxmox.variables.tf' (#73) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#73
2025-08-23 17:41:33 +00:00
ea67f17120 Update proxmox.variables.tf 2025-08-23 17:32:31 +00:00
a3d56c08f9 Merge pull request 'Update proxmox.tf' (#72) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#72
2025-08-23 17:27:03 +00:00
0d1f6b3dbb Update proxmox.tf 2025-08-23 17:26:20 +00:00
7b01b9be41 Merge pull request 'Update proxmox.tf' (#71) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#71
2025-08-23 17:23:33 +00:00
a67d446d88 Update proxmox.tf 2025-08-21 21:40:30 +00:00
8719299715 Merge pull request 'fenix-admin' (#70) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#70
2025-08-21 21:30:10 +00:00
7114594e50 Update proxmox.tf 2025-08-21 21:23:08 +00:00
6e5796725e Update proxmox.variables.tf 2025-08-21 21:19:30 +00:00
a876f4b802 Merge pull request 'Update proxmox.tf' (#69) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#69
2025-08-21 13:58:59 +00:00
b7352f62e0 Update proxmox.tf 2025-08-21 13:50:15 +00:00
ca2af765fc Merge pull request 'fenix-admin' (#68) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#68
2025-08-21 13:43:39 +00:00
cdfa58fcb6 Update proxmox.tf 2025-08-21 13:41:31 +00:00
7901c8a26a Merge pull request 'main' (#67) from main into fenix-admin
Reviewed-on: fenix-gitea-admin/iac-teste#67
Reviewed-by: fenix <tomaslimpinho@gmail.com>
2025-08-21 13:39:00 +00:00
30e0e59d9c Merge pull request 'Update proxmox.tf' (#66) from fenix-gitea-admin-patch-1 into main
Reviewed-on: fenix-gitea-admin/iac-teste#66
Reviewed-by: fenix <tomaslimpinho@gmail.com>
2025-08-21 13:34:41 +00:00
828cca57ea Update proxmox.tf 2025-08-21 13:33:06 +00:00
b8ab83704d Merge pull request 'Update proxmox.tf' (#65) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#65
Reviewed-by: fenix <tomaslimpinho@gmail.com>
2025-08-21 11:21:42 +00:00
a7e98686a4 Update proxmox.tf 2025-08-21 11:15:57 +00:00
1dc68e8deb Merge pull request 'disco usando imagem local' (#64) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#64
2025-08-21 11:12:07 +00:00
3de0ad5094 disco usando imagem local 2025-08-21 11:11:01 +00:00
c0f46d1f47 Merge pull request 'Update proxmox.tf' (#63) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#63
2025-08-20 22:57:30 +00:00
db0cff084a Update proxmox.tf 2025-08-20 22:56:32 +00:00
dc8c381748 Merge pull request 'Update proxmox.tf' (#62) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#62
2025-08-20 22:47:32 +00:00
6a54d21cf9 Update proxmox.tf 2025-08-20 22:46:58 +00:00
174c04a4b7 Merge pull request 'Update proxmox.tf' (#61) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#61
2025-08-20 22:40:59 +00:00
bc47153593 Update proxmox.tf 2025-08-20 22:40:22 +00:00
951f313d2e Merge pull request 'teste diferent proxmox cloud-init' (#60) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#60
2025-08-20 22:37:56 +00:00
53e7114e97 Update proxmox.tf 2025-08-20 22:36:52 +00:00
aa17346efb Update proxmox.tf 2025-08-20 22:12:10 +00:00
5f31d61ce7 Merge pull request 'fenix-admin' (#59) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#59
2025-08-20 22:03:53 +00:00
090602c1e1 Update proxmox.tf 2025-08-20 22:03:14 +00:00
19eb5d8fad Update proxmox.variables.tf 2025-08-20 22:01:03 +00:00
4aef5237dc Update proxmox.tf 2025-08-20 22:00:42 +00:00
ed4de014e1 Merge pull request 'Update proxmox.tf' (#58) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#58
2025-08-20 21:51:51 +00:00
f5bf70c63f Update proxmox.tf 2025-08-20 21:50:41 +00:00
16455359c4 Merge pull request 'Update proxmox.tf' (#57) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#57
2025-08-20 21:46:08 +00:00
054ba99c75 Update proxmox.tf 2025-08-20 21:45:22 +00:00
f3750f3c34 Merge pull request 'Update proxmox.tf' (#56) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#56
2025-08-20 21:42:49 +00:00
edaa244d1b Update proxmox.tf 2025-08-20 21:42:06 +00:00
394af3027f Merge pull request 'Update proxmox.tf' (#55) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#55
2025-08-20 21:35:44 +00:00
da4b8a223a Update proxmox.tf 2025-08-20 21:35:02 +00:00
f3ad759d88 Merge pull request 'Update proxmox.tf' (#54) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#54
2025-08-20 21:13:29 +00:00
02cfb80dfc Update proxmox.tf 2025-08-20 21:12:01 +00:00
20ba7bd363 Merge pull request 'Update proxmox.tf' (#53) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#53
2025-08-20 20:23:02 +00:00
70848f6c6f Update proxmox.tf 2025-08-20 20:22:19 +00:00
ba7e93eae7 Merge pull request 'proxmox fedora iso' (#52) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#52
2025-08-20 20:19:56 +00:00
7a584f6d0e proxmox fedora iso 2025-08-20 20:19:16 +00:00
d527cccf7c Merge pull request 'Update proxmox.tf' (#51) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#51
2025-08-20 20:07:55 +00:00
e0dcc1ae2d Update proxmox.tf 2025-08-20 20:07:11 +00:00
fef1249fff Merge pull request 'fenix-admin' (#50) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#50
2025-08-20 19:59:24 +00:00
b193570245 Update proxmox.tf 2025-08-20 19:58:42 +00:00
d098735343 Update proxmox.tf 2025-08-20 19:55:52 +00:00
cdc2dbcb08 Merge pull request 'Update proxmox.tf' (#49) from fenix-gitea-admin-patch-1 into main
Reviewed-on: fenix-gitea-admin/iac-teste#49
2025-08-20 19:54:41 +00:00
815b663fbf Update proxmox.tf 2025-08-20 19:53:52 +00:00
105cac421b Merge pull request 'Update proxmox.tf' (#48) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#48
2025-08-20 19:51:01 +00:00
1f29f17945 Update proxmox.tf 2025-08-20 19:50:01 +00:00
a90190e2e5 Merge pull request 'Update proxmox.tf' (#47) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#47
2025-08-20 19:46:26 +00:00
5341a4bda9 Update proxmox.tf 2025-08-20 19:45:26 +00:00
a7dc3d3e25 Merge pull request 'Update proxmox.tf' (#46) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#46
2025-08-20 19:42:38 +00:00
dcd64139bb Update proxmox.tf 2025-08-20 19:41:30 +00:00
d4b93a100c Merge pull request 'Update proxmox.tf' (#45) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#45
2025-08-20 19:37:41 +00:00
2bace4b7ca Update proxmox.tf 2025-08-20 19:36:38 +00:00
64d23baa15 Merge pull request 'Update proxmox.tf' (#44) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#44
2025-08-20 18:46:52 +00:00
9eac67a86f Update proxmox.tf 2025-08-20 18:46:06 +00:00
c001492fdb Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#43) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#43
2025-08-20 18:29:23 +00:00
3aa34d3f61 Update .gitea/workflows/ci-test.yaml 2025-08-20 18:28:18 +00:00
b325cfa575 Merge pull request 'Update .gitea/workflows/ci-test.yaml' (#42) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#42
2025-08-20 18:20:48 +00:00
a06362e607 Update .gitea/workflows/ci-test.yaml 2025-08-20 18:20:02 +00:00
5adcb5240d Merge pull request 'fenix-admin' (#41) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#41
2025-08-20 18:16:34 +00:00
bbacb525e4 Update proxmox.tf 2025-08-20 18:15:27 +00:00
55ea9b7b02 Update .gitea/workflows/ci-test.yaml 2025-08-20 18:15:01 +00:00
0354bbb330 Merge pull request 'agent' (#40) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#40
2025-08-20 18:07:39 +00:00
3a132bc95f agent 2025-08-20 18:07:06 +00:00
08b85dcb68 Merge pull request 'Update proxmox.tf' (#39) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#39
2025-08-20 17:57:34 +00:00
eb81b5132d Update proxmox.tf 2025-08-20 17:56:39 +00:00
b26970f6fb Merge pull request 'Update proxmox.tf' (#38) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#38
2025-08-20 17:51:56 +00:00
ccc4c10c03 Update proxmox.tf 2025-08-20 17:51:12 +00:00
cf4b993199 Merge pull request 'Update proxmox.tf' (#37) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#37
2025-08-20 17:49:10 +00:00
da4d9a256e Update proxmox.tf 2025-08-20 17:47:29 +00:00
82e2b34526 Merge pull request 'Update proxmox.tf' (#36) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#36
2025-08-20 17:03:29 +00:00
f4f3142ba9 Update proxmox.tf 2025-08-20 17:02:38 +00:00
806c2943f1 Merge pull request 'proxmox ip' (#35) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#35
2025-08-20 16:59:42 +00:00
c8fa2c27a5 proxmox ip 2025-08-20 16:58:32 +00:00
3e6af8157a Merge pull request 'Update proxmox.tf' (#34) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#34
2025-08-20 16:22:02 +00:00
84bfa669f6 Update proxmox.tf 2025-08-20 16:20:45 +00:00
65c1f5490d Merge pull request 'Update proxmox.tf' (#33) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#33
2025-08-20 16:16:46 +00:00
01785179e3 Update proxmox.tf 2025-08-20 16:12:24 +00:00
cdc1555247 Merge pull request 'VM01' (#32) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#32
2025-08-20 15:56:58 +00:00
91527a265a VM01 2025-08-20 16:55:22 +01:00
7e2269f4e1 Merge pull request 'depends_on' (#31) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#31
2025-08-20 15:43:31 +00:00
6cf5c0d0e0 depends_on 2025-08-20 16:42:34 +01:00
5fb200f0ce Merge pull request 'name change' (#30) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#30
2025-08-20 15:32:08 +00:00
1a7e3e414d name change 2025-08-20 16:31:03 +01:00
b69d3ccd4d Merge pull request 'new name iso' (#29) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#29
2025-08-20 15:26:22 +00:00
443a4417d9 new name iso 2025-08-20 16:25:16 +01:00
abd8aebc81 Merge pull request 'a' (#28) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#28
2025-08-20 15:10:51 +00:00
8819a61856 a 2025-08-20 16:09:41 +01:00
db60d721bd Merge pull request 'upgrade' (#27) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#27
2025-08-20 14:54:43 +00:00
29cc9bc0a2 upgrade 2025-08-20 15:53:58 +01:00
bb85e2a264 Merge pull request 'var correction' (#26) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#26
2025-08-20 14:49:20 +00:00
81f5db6516 var correction 2025-08-20 15:48:08 +01:00
7e15d5e7cf Merge pull request 'a' (#25) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#25
2025-08-20 14:44:47 +00:00
b4e66758ac a 2025-08-20 15:43:58 +01:00
c1c81bcd45 Merge pull request 'proxmox template' (#24) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#24
2025-08-20 14:40:25 +00:00
79f2c04501 proxmox template 2025-08-20 15:39:28 +01:00
ea0c836507 Merge pull request 'desc' (#23) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#23
2025-08-20 14:03:00 +00:00
700e77907d desc 2025-08-20 15:02:18 +01:00
ababcb5d39 Merge pull request 'version and rc changed because the next version doesnt permite not using a clone' (#22) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#22
2025-08-20 13:59:51 +00:00
9d9fa099a8 version and rc changed because the next version doesnt permite not using a clone 2025-08-20 14:58:31 +01:00
5d774f9e11 Merge pull request 'changing rc' (#21) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#21
2025-08-20 13:54:22 +00:00
ec4e59ac1c changing rc 2025-08-20 14:53:37 +01:00
2cfeb2d0f4 Merge pull request 'efidisk out' (#20) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#20
2025-08-20 13:45:52 +00:00
4e1b898a4c efidisk out 2025-08-20 14:45:06 +01:00
a8aa6dc45d Merge pull request 'proxmox' (#19) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#19
2025-08-20 13:41:11 +00:00
f14798afe2 proxmox 2025-08-20 14:40:03 +01:00
e9577f56ee Merge pull request 'iso' (#18) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#18
2025-08-19 22:24:58 +00:00
9e973b780b iso 2025-08-19 23:22:31 +01:00
b053156208 Merge pull request 'a' (#17) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#17
2025-08-19 21:52:50 +00:00
a8f79c226b a 2025-08-19 22:51:40 +01:00
48579cd3f5 Merge pull request 'ns mais' (#16) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#16
2025-08-19 21:45:17 +00:00
586ddcac65 ns mais 2025-08-19 22:44:16 +01:00
3a25842b69 Merge pull request ', => ;' (#15) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#15
2025-08-19 21:29:53 +00:00
82ac5d4e3c , => ; 2025-08-19 22:29:03 +01:00
a9de170697 Merge pull request 'boot = order' (#14) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#14
2025-08-19 21:24:05 +00:00
b8370dba5e boot = order 2025-08-19 22:23:05 +01:00
f9fda17fdf Merge pull request 'boot order' (#13) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#13
2025-08-19 21:19:22 +00:00
cea4e9353c boot order 2025-08-19 22:18:27 +01:00
4ce42b0d4c Merge pull request 'boot and boot_order' (#12) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#12
2025-08-19 21:14:28 +00:00
b06cb577bd boot and boot_order 2025-08-19 22:13:18 +01:00
a4162db0b9 Merge pull request '; => ,' (#11) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#11
2025-08-19 21:08:35 +00:00
d5c7d47dbe ; => , 2025-08-19 22:07:44 +01:00
119930261f Merge pull request 'a' (#10) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#10
2025-08-19 21:04:18 +00:00
503e4c395c a 2025-08-19 22:03:19 +01:00
cdecff0e7e Merge pull request 'proxmox ip and description' (#9) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#9
2025-08-19 21:01:16 +00:00
b7137ad7c9 proxmox ip and description 2025-08-19 22:00:13 +01:00
26086902c4 Merge pull request 'disk scsi' (#8) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#8
2025-08-19 20:16:06 +00:00
aab3067910 disk scsi 2025-08-19 21:15:03 +01:00
689ae249ce Merge pull request 'ops3' (#7) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#7
2025-08-19 20:11:05 +00:00
c54cf9da4d ops3 2025-08-19 21:10:18 +01:00
781c15963d Merge pull request 'ops2' (#6) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#6
2025-08-19 20:07:39 +00:00
0936832363 ops2 2025-08-19 21:06:33 +01:00
651c94bdca Merge pull request 'ops' (#5) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#5
2025-08-19 20:04:12 +00:00
6ae0ca4982 ops 2025-08-19 21:01:48 +01:00
ff9efdb7c8 Merge pull request 'proxmox vm01' (#4) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#4
2025-08-19 19:59:34 +00:00
5c1d553e38 a 2025-08-19 20:58:43 +01:00
dbc6443b8a proxmox vm01 2025-08-19 20:53:40 +01:00
a145182ead Merge pull request 'Update documentation/start.txt' (#2) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#2
2025-08-19 17:57:09 +00:00
bf198d3a0d Update documentation/start.txt 2025-08-19 17:53:55 +00:00
14 changed files with 599 additions and 26 deletions

View File

@ -15,8 +15,22 @@ jobs:
PM_API_TOKEN_SECRET: ${{ secrets.PM_API_TOKEN_SECRET }} PM_API_TOKEN_SECRET: ${{ secrets.PM_API_TOKEN_SECRET }}
BW_EMAIL: ${{ secrets.BW_EMAIL }} BW_EMAIL: ${{ secrets.BW_EMAIL }}
BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_PASSWORD: ${{ secrets.BW_PASSWORD }}
BW_CLIENTID: ${{ secrets.BW_CLIENTID }}
BW_CLIENTSECRET: ${{ secrets.BW_CLIENTSECRET }}
VAULTWARDEN_LINK: ${{secrets.VAULTWARDEN_LINK }}
steps: steps:
- name: Verificar se commit pede por [deploy-opentofu]
if: "!contains(gitea.event.head_commit.message, '[deploy-opentofu]')"
run: |
echo "Commit não contém [deploy-opentofu], a pipeline será ignorada."
exit 1
- name: Executar deploy opentofu
run: echo "Commit contém [deploy-opentofu], a pipeline será executada."
- name: Updating apt-get - name: Updating apt-get
run: | run: |
apt-get update -y apt-get update -y
@ -26,28 +40,148 @@ jobs:
with: with:
path: infra/iac path: infra/iac
- name: cloning iac secrets repository #- name: cloning iac secrets repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
repository: fenix-gitea-admin/iac-teste-secrets # repository: fenix-gitea-admin/iac-opentofu-private-secrets
token: ${{ secrets.GGITEA_TOKEN }} # token: ${{ secrets.GGITEA_TOKEN }}
path: infra/secrets # path: infra/secrets
- name: vaultwarden login
- name: Install cloudflare prerequisites
run: |
apt-get install -y curl ca-certificates jq openssh-client net-tools iproute2
- name: Install cloudflared
run: |
# pacote .deb oficial - funcionará numa runner Ubuntu x86_64
curl -L -o cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
dpkg -i cloudflared.deb
cloudflared --version
- name: Install dante-server
run: |
apt-get install -y dante-server
- name: Configure dante-server
run: |
cat <<EOF | tee /etc/danted.conf
logoutput: stderr
internal: 127.0.0.1 port = 1080
external: lo
method: none
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect
}
# encaminhar tudo para o listener TCP do cloudflared
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: connect udpassociate bind
log: connect disconnect
}
EOF
- name: vaultwarden urls as secrets
working-directory:
run: |
bw config server $VAULTWARDEN_LINK
bw login --apikey
BW_SESSION=$(bw unlock "$BW_PASSWORD" --raw)
bw get item "iac.proxmox-ssh-link" --session "$BW_SESSION" | jq -r '.notes' > "proxmox-ssh-link.txt"
- name: Start cloudflared Access TCP -> SOCKS5 (background)
env:
CF_SVC_ID: ${{ secrets.CF_SVC_ID }}
CF_SVC_SECRET: ${{ secrets.CF_SVC_SECRET }}
run: |
Hostname=$(cat proxmox-ssh-link.txt)
# Inicia cloudflared access tcp/ssh com service token e listener socks local
# O binário 'cloudflared' tem variações de flags entre versões; estes flags funcionam nas versões recentes.
nohup cloudflared access tcp \
--hostname "$Hostname" \
--listener "tcp://127.0.0.1:1081" \
--service-token-id "$CF_SVC_ID" \
--service-token-secret "$CF_SVC_SECRET" \
> cloudflared.log 2>&1 &
# espera a porta do listener estar pronta (timeout 30s)
for i in $(seq 1 30); do
ss -tnl | grep -q ":1081" && break
sleep 1
done
if ! ss -tnl | grep -q ":1081"; then
echo "SOCKS listener not ready after 30s, printing cloudflared.log"
tail -n +1 cloudflared.log
cat cloudflared.log
exit 1
fi
echo "cloudflared socks listener ready at $SOCKS_LISTENER"
sleep 1
# opcional: ver primeiros logs
tail -n 50 cloudflared.log || true
- name: Start dante-server
run: |
pkill danted || true
danted -f /etc/danted.conf -D > dante.log 2>&1 &
sleep 3
cat dante.log
- name: vaultwarden getsecrets
working-directory: infra/iac working-directory: infra/iac
run: | run: |
BW_SESSION=$(bw login) BW_SESSION=$(bw unlock "$BW_PASSWORD" --raw)
# Ler o arquivo de referência
for secret in $(jq -c '.secrets[]' secrets/vault-secrets-map.json); do
name=$(echo "$secret" | jq -r '.name')
type=$(echo "$secret" | jq -r '.type')
output=$(echo "$secret" | jq -r '.output')
echo "$name $type $output"
item_id=$(bw get item "$name" | jq -r '.id')
echo "$item_id"
mkdir -p "$(dirname "$output")"
echo "dir made"
if [ "$type" == "attachment" ]; then
echo "attachment get"
bw get attachment "$output" --itemid "$item_id" --output "$output" --session "$BW_SESSION"
elif [ "$type" == "note" ]; then
echo "note get"
bw get item "$name" --session "$BW_SESSION" | jq -r '.notes' > "$output"
fi
done
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install ruamel.yaml
- name: Init OpenTofu - name: Init OpenTofu
working-directory: infra/iac working-directory: infra/iac
run: tofu init run: |
tofu init
- name: Plan - name: Plan
working-directory: infra/iac working-directory: infra/iac
run: | run: |
# Find all .auto.tfvars in the secrets folder # Find all .tfvars in the secrets folder
VAR_FILES="" VAR_FILES=""
for f in ../secrets/secrets/*.auto.tfvars; do ls -la ../secrets/secrets
for f in ../secrets/secrets/*.tfvars; do
echo "found - $f"
VAR_FILES="$VAR_FILES -var-file=$f" VAR_FILES="$VAR_FILES -var-file=$f"
done done
tofu plan $VAR_FILES -out=./tfplan | tee ./tfplan.txt tofu plan $VAR_FILES -out=./tfplan | tee ./tfplan.txt

18
LICENSE Normal file
View File

@ -0,0 +1,18 @@
MIT License
Copyright (c) 2025 fenix-gitea-admin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.

19
cloud-init-base.yaml Normal file
View File

@ -0,0 +1,19 @@
locale: "pt_PT.UTF-8"
keyboard:
layout: "pt"
variant: "nodeadkeys"
users:
- default
ssh_pwauth: true
package_update: true
packages:
- qemu-guest-agent
- net-tools
- curl
runcmd:
- systemctl enable qemu-guest-agent
- systemctl start qemu-guest-agent
- echo "done" > /tmp/cloud-config.done

36
cloud-init-vm.yaml.tftpl Normal file
View File

@ -0,0 +1,36 @@
package_update: true
%{ if length(each.value.extra_packages) > 0 ~}
packages:
%{ for pkg in each.value.extra_packages ~}
- ${pkg}
%{ endfor ~}
%{ endif ~}
%{ if length(each.value.extra_users) > 0 ~}
users:
%{ for u in each.value.extra_users ~}
- name: ${u.name}
groups:
%{ if length(u.groups) > 0 ~}
%{ for g in u.groups ~}
- ${g}
%{ endfor ~}
%{ endif ~}
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
%{ endfor ~}
chpasswd:
list: ${"|"}
%{ for u in each.value.extra_users ~}
${u.name}:${u.password}
%{ endfor ~}
expire: false
%{ endif ~}
%{ if length(each.value.extra_runcmd) > 0 ~}
runcmd:
%{ for cmd in each.value.extra_runcmd ~}
- ${cmd}
%{ endfor ~}
%{ endif ~}

View File

@ -0,0 +1,2 @@
#cloud-config
${content}

23
documentation/Dockerfile Normal file
View File

@ -0,0 +1,23 @@
FROM ghcr.io/opentofu/opentofu:1.9-minimal AS tofu
FROM ubuntu:24.04
# Copy the tofu binary
COPY --from=tofu /usr/local/bin/tofu /usr/local/bin/tofu
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
nodejs \
npm \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L -o /tmp/bw.zip https://github.com/bitwarden/cli/releases/download/v1.22.1/bw-linux-1.22.1.zip \
&& unzip /tmp/bw.zip -d /usr/local/bin \
&& chmod +x /usr/local/bin/bw \
&& rm /tmp/bw.zip
WORKDIR /workspace

View File

@ -5,6 +5,7 @@ https://opentofu.org/docs/intro/ - quick start and explaning who to work in team
https://opentofu.org/docs/intro/ - CICD for opentofu explained https://opentofu.org/docs/intro/ - CICD for opentofu explained
tofu init tofu init
tofu plan --var-file=opentofu-varfile.json tofu plan --var-file=opentofu-varfile.json
yes yes

10
main.tf
View File

@ -1,9 +1,5 @@
terraform { terraform {
required_providers { required_providers {
random = {
source = "hashicorp/random"
version = "~> 3.6"
}
vaultwarden = { vaultwarden = {
source = "ottramst/vaultwarden" source = "ottramst/vaultwarden"
version = "0.4.4" version = "0.4.4"
@ -13,8 +9,8 @@ terraform {
version = ">= 0.15.0" version = ">= 0.15.0"
} }
proxmox = { proxmox = {
source = "telmate/proxmox" source = "bpg/proxmox"
version = "3.0.2-rc03" version = "= 0.75.0"
} }
} }
backend "consul" { backend "consul" {
@ -24,5 +20,3 @@ terraform {
lock = true # enable state locking lock = true # enable state locking
} }
} }
provider "random" {}

45
merge_yaml.py Normal file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env python3
from ruamel.yaml import YAML
import sys
import json
from collections.abc import Mapping
def deep_merge_yaml(dict1, dict2):
result = dict1.copy()
for key, value in dict2.items():
if key in result:
if isinstance(result[key], list) and isinstance(value, list):
result[key] = result[key] + value
elif isinstance(result[key], Mapping) and isinstance(value, Mapping):
result[key] = deep_merge_yaml(result[key], value)
else:
result[key] = value
else:
result[key] = value
return result
def main():
input_data = json.load(sys.stdin)
file1 = input_data["file1"]
file2 = input_data["file2"]
yaml = YAML()
yaml.indent(mapping=2, sequence=4, offset=2)
with open(file1, "r") as f1, open(file2, "r") as f2:
yaml1 = yaml.load(f1)
yaml2 = yaml.load(f2)
merged = deep_merge_yaml(yaml1, yaml2)
from io import StringIO
output = StringIO()
yaml.dump(merged, output)
print(json.dumps({
"merged_yaml": output.getvalue()
}))
if __name__ == "__main__":
main()

View File

@ -1,3 +1,179 @@
provider "proxmox" { provider "proxmox" {
pm_api_url = var.proxmox_server endpoint = var.proxmox_server
api_token = var.proxmox_apikey
ssh {
agent = true
username = var.proxmox_username_ssh
socks5_server = var.proxmox_server_ssh
password = var.proxmox_password_ssh
node {
name = "fenix"
address = "127.0.0.1"
port = 1081
}
} }
}
resource "proxmox_virtual_environment_download_file" "latest_ubunto_cloud_img" {
content_type = "iso"
datastore_id = "local"
node_name = "fenix"
url = "https://cloud-images.ubuntu.com/jammy/20250725/jammy-server-cloudimg-amd64.img"
file_name = "jammyservercloudimgamd64.img"
}
resource "proxmox_virtual_environment_file" "cloud_init_yaml" {
node_name = "fenix"
datastore_id = "local-snippets"
content_type = "snippets"
source_raw {
file_name = "user-data-cloud-config.yaml"
data = file("${path.module}/cloud-init-base.yaml")
}
}
locals {
rendered_yaml_per_vm ={
for vm in var.proxmox_k8s_vms : vm.name =>
templatefile("${path.module}/cloud-init-vm.yaml.tftpl",
{
each = {
value = vm
}
})
}
}
data "external" "merged_yaml" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
depends_on = [local_file.rendered_yaml_file]
program = ["python3", "${path.module}/merge_yaml.py"]
query = {
file1 = "${path.module}/cloud-init-base.yaml"
file2 = "${path.module}/cloud-init-extra-${each.key}.yaml"
}
}
resource "local_file" "rendered_yaml_file" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
content = local.rendered_yaml_per_vm[each.key]
filename = "${path.module}/cloud-init-extra-${each.key}.yaml"
}
# Gerar um snippet cloud-init por VM
resource "proxmox_virtual_environment_file" "vm_user_data" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
node_name = "fenix"
datastore_id = "local-snippets"
content_type = "snippets"
source_raw {
file_name = "cloud-init-iac-k8s-${each.key}.yaml"
data = templatefile("${path.module}/cloud-init-wrapper.yaml.tftpl", {
content = data.external.merged_yaml[each.key].result["merged_yaml"]
})
}
}
resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
depends_on = [proxmox_virtual_environment_download_file.latest_ubunto_cloud_img, proxmox_virtual_environment_file.cloud_init_yaml]
name = "proxmox-kubernetes-VM-template"
node_name = "fenix"
vm_id = 1002
template = true
started = false
agent {
enabled = true
}
tags = ["opentofu", "kubernetes", "fedora"]
machine = "q35"
bios = "seabios"
description = "kubernetes VM Template created via iac"
cpu {
cores = 2
}
memory {
dedicated = 4096
}
disk {
datastore_id = "local-lvm"
file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id
interface = "scsi0"
file_format = "qcow2"
}
# Configuração da interface de rede
network_device {
bridge = "vmbr0"
}
initialization {
dns {
servers = ["1.1.1.1"]
}
ip_config {
ipv4 {
address = "dhcp"
}
}
user_data_file_id = proxmox_virtual_environment_file.cloud_init_yaml.id
}
}
resource "proxmox_virtual_environment_vm" "k8s_vms" {
for_each = { for vm in var.proxmox_k8s_vms : vm.name => vm }
depends_on = [proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template]
name = each.value.name
node_name = each.value.node_name
vm_id = each.value.vm_id
clone {
vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id
}
cpu {
cores = each.value.cores
}
memory {
dedicated = each.value.memory
}
disk {
datastore_id = each.value.data_store
size = each.value.disk_size
interface = "scsi1"
}
initialization {
ip_config {
ipv4 {
address = each.value.ip
gateway = each.value.gateway
}
}
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
}
agent {
enabled = true
}
}

View File

@ -3,3 +3,54 @@ variable "proxmox_server" {
type = string type = string
sensitive = false sensitive = false
} }
variable "proxmox_server_ssh" {
description = "Proxmox server ssh url"
type = string
sensitive = false
}
variable "proxmox_username_ssh" {
description = "Proxmox server ssh username"
type = string
sensitive = false
}
variable "proxmox_password_ssh" {
description = "Proxmox server ssh password"
type = string
sensitive = true
}
variable "proxmox_apikey" {
description = "Proxmox server api key"
type = string
sensitive = true
}
variable "node_name" {
default = "fenix"
}
# Lista de VMs (override de valores específicos)
variable "proxmox_k8s_vms" {
type = list(object({
name = string
vm_id = number
node_name = string
ip = string
cores = optional(number)
memory = optional(number)
data_store = optional(string)
gateway = string
disk_size = optional(number)
extra_users = optional(list(object({
name = string
password = string
groups = list(string)
})))
extra_packages = optional(list(string))
extra_runcmd = optional(list(string))
}))
}

View File

@ -3,3 +3,56 @@ PM_API_TOKEN_ID = "tokenid"
PM_API_TOKEN_SECRET = "tokensecret" PM_API_TOKEN_SECRET = "tokensecret"
# tokenid is read automatically from PM_API_TOKEN_ID # tokenid is read automatically from PM_API_TOKEN_ID
# token is read automatically from PM_API_TOKEN_SECRET # token is read automatically from PM_API_TOKEN_SECRET
proxmox_server = "https://proxmox.example.com:443/api2/json"
proxmox_apikey = "user@pam!token=fdjkdslfjdsflkj"
proxmox_server_ssh = "127.0.0.1:1080"
proxmox_username_ssh = "user"
proxmox_password_ssh = "password"
# tokenid is read automatically from PM_API_TOKEN_ID
# token is read automatically from PM_API_TOKEN_SECRET
proxmox_k8s_vms = [
{
name = "k8s-master-01"
vm_id = 3001
node_name = "node"
ip = "192.168.1.99/24"
cores = 2
memory = 2000
disk_size = 32
data_store = "local-lvm"
gateway = "192.168.1.1"
extra_users = [
{
name = "user"
password = "pass"
groups = ["sudo"]
}
]
extra_packages = []
extra_runcmd = []
},
{
name = "k8s-worker-01"
vm_id = 3002
node_name = "node"
ip = "192.168.1.101/24"
cores = 1
memory = 2000
disk_size = 32
data_store = "local-lvm"
gateway = "192.168.1.1"
extra_users = [
{
name = "user"
password = "pass"
groups = ["sudo"]
}
]
extra_packages = []
extra_runcmd = []
},
]

View File

@ -0,0 +1,19 @@
{
"secrets": [
{
"name": "iac.opentofu.consul.secrets",
"type": "note",
"output": "../secrets/secrets/consul.secrets.tfvars"
},
{
"name": "iac.opentofu.proxmox.secrets",
"type": "note",
"output": "../secrets/secrets/proxmox.secrets.tfvars"
},
{
"name": "iac.opentofu.vaultwarden.secrets",
"type": "note",
"output": "../secrets/secrets/vaultwarden.secrets.tfvars"
}
]
}

View File

@ -4,3 +4,5 @@ vaultwarden_master_password = "SuperSecretMasterPassword"
vaultwarden_admin_token = "tokenadmin" vaultwarden_admin_token = "tokenadmin"
vaultwarden_client_id = "clientid" vaultwarden_client_id = "clientid"
vaultwarden_client_secret = "clientsecret" vaultwarden_client_secret = "clientsecret"
# email is read automatically from BW_EMAIL
# password is read automatically from BW_PASSWORD