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.
This commit is contained in:
parent
a9f546f92a
commit
822e42dbb8
48 changed files with 6846 additions and 2 deletions
70
terraform/scaleway/root.hcl
Normal file
70
terraform/scaleway/root.hcl
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue