forgejo-autohebergement/terraform/scaleway/root.hcl
Horacio Duran 822e42dbb8 Add Template to deploy forgejo.
This template allows deploying a forgejo en either Scaleway or Hetzner
(untested) without much knowledge about them.
It DOES require knowledge about Terragrunt and ansible. A wizard of
sorts is provided but it will not guarantee success without some
knowledge about the underlying technology.
2026-01-09 16:07:44 +01:00

70 lines
1.4 KiB
HCL

# Scaleway Root Configuration
# This file contains common configuration for all Scaleway resources
locals {
# Project configuration
project_name = "forgejo"
environment = "production"
# Scaleway configuration
region = "fr-par"
zone = "fr-par-1"
# Tags for resource organization
common_tags = {
Project = "forgejo"
Environment = "production"
ManagedBy = "terragrunt"
}
}
# Generate provider configuration
generate "provider" {
path = "provider.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
terraform {
required_version = ">= 1.5.0"
required_providers {
scaleway = {
source = "scaleway/scaleway"
version = "~> 2.31"
}
}
}
provider "scaleway" {
region = "${local.region}"
zone = "${local.zone}"
# Credentials should be set via environment variables:
# SCW_ACCESS_KEY
# SCW_SECRET_KEY
# SCW_DEFAULT_PROJECT_ID
}
EOF
}
# Remote state configuration (adjust for your backend)
remote_state {
backend = "local"
config = {
path = "${get_parent_terragrunt_dir()}/terraform.tfstate"
}
generate = {
path = "backend.tf"
if_exists = "overwrite_terragrunt"
}
}
# Input values available to all child configurations
inputs = {
project_name = local.project_name
environment = local.environment
region = local.region
zone = local.zone
common_tags = local.common_tags
}