infrastructure/main.tf

62 lines
1.6 KiB
Terraform
Raw Normal View History

2024-09-25 11:23:52 +00:00
terraform {
backend "s3" {
bucket = var.backend_bucket
access_key = var.backend_access_key
secret_key = var.backend_secret_key
key = "terraform.tfstate"
region = var.backend_region
encrypt = true
endpoints = {
s3 = var.backend_endpoint
}
# Disable AWS-specific features
skip_credentials_validation = true
skip_region_validation = true
skip_requesting_account_id = true
skip_s3_checksum = true
}
}
2024-09-29 23:22:03 +00:00
module "services" {
source = "./modules/services"
2024-09-28 12:14:09 +00:00
2024-09-29 23:26:42 +00:00
authentik_url = var.authentik_url
authentik_token = var.authentik_token
2024-09-25 11:23:52 +00:00
2024-09-29 23:26:42 +00:00
postgresql_host = var.postgresql_host
postgresql_port = var.postgresql_port
postgresql_username = var.postgresql_username
postgresql_password = var.postgresql_password
2024-09-25 11:23:52 +00:00
2024-09-29 23:22:03 +00:00
services = var.services
2024-09-27 23:59:53 +00:00
}
2024-09-29 23:22:03 +00:00
module "infrastructure" {
source = "./modules/infrastructure"
2024-09-25 11:23:52 +00:00
2024-09-30 18:31:04 +00:00
contabo_client_id = var.contabo_client_id
contabo_client_secret = var.contabo_client_secret
contabo_user = var.contabo_user
contabo_pass = var.contabo_pass
2024-09-30 18:00:24 +00:00
2024-09-29 23:26:42 +00:00
hcloud_token = var.hcloud_token
2024-09-28 12:14:09 +00:00
2024-09-29 23:26:42 +00:00
ovh_application_key = var.ovh_application_key
ovh_application_secret = var.ovh_application_secret
ovh_consumer_key = var.ovh_consumer_key
2024-09-28 12:14:09 +00:00
2024-09-29 23:26:42 +00:00
scaleway_access_key = var.scaleway_access_key
scaleway_secret_key = var.scaleway_secret_key
scaleway_project_id = var.scaleway_project_id
scaleway_organization_id = var.scaleway_organization_id
2024-09-29 23:22:03 +00:00
2024-09-29 23:26:42 +00:00
tailscale_api_key = var.tailscale_api_key
tailscale_tailnet = var.tailscale_tailnet
2024-09-29 23:22:03 +00:00
2024-09-29 23:26:42 +00:00
default_ssh_key = var.default_ssh_key
2024-09-29 23:22:03 +00:00
hosts = var.hosts
services = var.services
}