Move tfvars into variables defaults

This commit is contained in:
Tobias Reisinger 2024-09-27 01:51:58 +02:00
parent 73bce8f6e5
commit 9ee92797e1
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 58 additions and 39 deletions

View file

@ -51,7 +51,7 @@ resource "hcloud_server" "nodes" {
ssh_keys,
user_data
]
prevent_destroy = true
prevent_destroy = true
}
}

View file

@ -1,24 +0,0 @@
hosts = {
"node001" = {
hostname = "node001"
rdns = "node001.serguzim.net"
provider = "contabo"
ipv4_address = "144.91.106.67",
ipv6_address = "2a02:c207:2051:6620::1"
},
"node002" = {
hostname = "node002"
rdns = "node002.serguzim.net"
provider = "contabo"
ipv4_address = "62.171.181.192",
ipv6_address = "2a02:c207:2036:6681::1"
},
"node003" = {
hostname = "node003"
rdns = "mail.serguzim.me"
provider = "hetzner"
image = "debian-12"
server_type = "cx32"
datacenter = "fsn1-dc14"
},
}

View file

@ -0,0 +1,19 @@
backend_access_key = ""
backend_secret_key = ""
backend_endpoint = ""
backend_region = ""
backend_bucket = ""
hcloud_token = ""
ovh_application_key = ""
ovh_application_secret = ""
ovh_consumer_key = ""
scaleway_organization_id = ""
scaleway_project_id = ""
scaleway_access_key = ""
scaleway_secret_key = ""
tailscale_api_key = ""
tailscale_tailnet = ""

View file

@ -1,14 +0,0 @@
service_buckets = {
"linkwarden" = {
name = "linkwarden"
bucket = "linkwarden.serguzim.me"
},
"harbor" = {
name = "harbor"
bucket = "harbor.serguzim.me"
}
"forgejo" = {
name = "forgejo"
bucket = "forgejo.serguzim.me"
}
}

View file

@ -68,6 +68,20 @@ variable "service_buckets" {
name = string
bucket = string
}))
default = {
"linkwarden" = {
name = "linkwarden"
bucket = "linkwarden.serguzim.me"
},
"harbor" = {
name = "harbor"
bucket = "harbor.serguzim.me"
}
"forgejo" = {
name = "forgejo"
bucket = "forgejo.serguzim.me"
}
}
}
variable "hosts" {
@ -81,4 +95,28 @@ variable "hosts" {
server_type = optional(string)
datacenter = optional(string)
}))
default = {
"node001" = {
hostname = "node001"
rdns = "node001.serguzim.net"
provider = "contabo"
ipv4_address = "144.91.106.67",
ipv6_address = "2a02:c207:2051:6620::1"
},
"node002" = {
hostname = "node002"
rdns = "node002.serguzim.net"
provider = "contabo"
ipv4_address = "62.171.181.192"
ipv6_address = "2a02:c207:2036:6681::1"
},
"node003" = {
hostname = "node003"
rdns = "mail.serguzim.me"
provider = "hetzner"
image = "debian-12"
server_type = "cx32"
datacenter = "fsn1-dc14"
},
}
}