This commit is contained in:
nora 2024-02-04 16:49:07 +01:00
parent 465489b24d
commit dbd662821b
5 changed files with 61 additions and 0 deletions

4
vps-provision/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/.terraform
/.env
# Copy to secrets
/terraform.tfstate*

25
vps-provision/.terraform.lock.hcl generated Normal file
View file

@ -0,0 +1,25 @@
# This file is maintained automatically by "tofu init".
# Manual edits may be lost in future updates.
provider "registry.opentofu.org/contabo/contabo" {
version = "0.1.23"
constraints = "0.1.23"
hashes = [
"h1:8350dn6n8R149cCE6DzDoZtSs8uceTXqJKt5k4AFdtw=",
"zh:19bcf3660ac7545103cf999e0066442f9d6350db9654e1496726520cef287246",
"zh:28548ce7218bc36ce43ed3cdb6bf21a6313ded17ce924ea62a161f95f013211f",
"zh:41169b396e293e34550949ff217414eb168d3c049b5d0d773cbbd9e40242e98d",
"zh:4acbdfb227e635565974f6c2152e172a781000a2afe0216cdbf32baa1fd5482a",
"zh:63c007e7eaa0b0878728e25f5d5dc31de8fc700ccd4df75013d059319caaee94",
"zh:7505443485041c5d65b0c664d962e1fd379a05bb473e8fd2ac4f95d3984c5294",
"zh:954a8a497ab516342c00e80f3a12927928c1437267af9ca7d822ce58063224a8",
"zh:b57737d85aed73ec84c9c709d7a23985d6c61497bf082c1633eaacfb89bbaf53",
"zh:c009f0e49fac46684482f2c6acf5fee50b41cdad6e8883c22a9e95e38afe5dba",
"zh:c02eb8033be219219a72991e76f50af0d115d8c4a482dc6035c58a47cac285c1",
"zh:c5d79f17bf97f67d3d9b0aaa3fbaf14f3e8c690e06f11f099a6610583ef2cf74",
"zh:cf3ea5db022e8198a9510014cadd3bf97307401c3475e7b80e6ec5e494bac77d",
"zh:dbd20779f01363bb59c9376202bf15eab25ee5720d573502778d88935253e000",
"zh:df529bf335c867a6e34c5ac79fcafd062b812ddbc9871695bf2052efde657a3d",
"zh:ef297c827635430079154fce3d0c5258988893c2e4096cd48487cf7950ac9aec",
]
}

15
vps-provision/README.md Normal file
View file

@ -0,0 +1,15 @@
# terraform
Terraform files for my setup.
The state can be found in the password manager
This uses the following environment variables:
```
# contabo
export CNTB_OAUTH2_CLIENT_ID="id"
export CNTB_OAUTH2_CLIENT_SECRET="secret"
export CNTB_OAUTH2_USER="email"
export CNTB_OAUTH2_PASS="password"
```

9
vps-provision/main.tf Normal file
View file

@ -0,0 +1,9 @@
resource "contabo_instance" "vps1" {
display_name = "vps1"
product_id = "V1"
}
resource "contabo_instance" "vps2" {
display_name = "vps2"
product_id = "V1"
}

View file

@ -0,0 +1,8 @@
terraform {
required_providers {
contabo = {
source = "contabo/contabo"
version = "0.1.23"
}
}
}