Patrick de Ruiter d417281ee0
feat: Repurpose module from Ansible EDA to Renovate bot deployment
Complete rewrite of the module to deploy a Renovate bot for automated
dependency management with Gitea integration.

Breaking Changes:
- Module purpose changed from Ansible EDA to Renovate bot
- All variables restructured for Renovate configuration
- State file path updated to home/docker/renovate/renovate.tfstate
- Volumes changed from EDA rulebooks/logs to config/cache
- Container image now uses renovate/renovate:latest

Added:
- Gitea platform integration with token authentication
- Renovate configuration template (config.js.tpl)
- Repository configuration examples
- Gitea Actions workflow examples
- SonarQube integration examples
- Comprehensive documentation (README, QUICKSTART, MIGRATION_GUIDE)
- CHANGELOG.md for version tracking
- Security best practices

Removed:
- All Ansible EDA-specific configuration
- Traefik labels (not needed for Renovate)
- Old EDA documentation files
- example-rulebook.yml

Updated:
- Complete README with Gitea setup instructions
- terraform.tfvars with Renovate configuration
- All resource names from ansible_eda to renovate
- Backend state path

This is version 2.0.0 - not backward compatible with previous EDA version.
See MIGRATION_GUIDE.md for detailed migration instructions.
2025-11-17 00:32:51 +01:00

136 lines
3.4 KiB
HCL

# Renovate Configuration Variables
# Container Configuration
variable "container_name" {
description = "Name of the Renovate container"
type = string
default = "renovate"
}
variable "renovate_image" {
description = "Docker image for Renovate"
type = string
default = "renovate/renovate:latest"
}
variable "restart_policy" {
description = "Restart policy for the container (no, on-failure, always, unless-stopped)"
type = string
default = "unless-stopped"
}
# Resource Limits
variable "memory_limit" {
description = "Memory limit for the container in MB (e.g., 2048 for 2GB)"
type = number
default = 2048
}
variable "memory_swap_limit" {
description = "Memory swap limit for the container in MB (-1 for unlimited)"
type = number
default = -1
}
# Networking
variable "domain" {
description = "Domain name for the application"
type = string
default = "bsdserver.lan"
}
variable "dns_name" {
description = "DNS name for the Renovate service (defaults to container_name if not specified)"
type = string
default = null
}
variable "create_cname_record" {
description = "Whether to create a DNS CNAME record"
type = bool
default = false
}
# Renovate Platform Configuration
variable "renovate_platform" {
description = "Git platform to use (gitea, github, gitlab, etc.)"
type = string
default = "gitea"
}
variable "renovate_endpoint" {
description = "API endpoint for the git platform (e.g., https://gitea.example.com/api/v1/)"
type = string
}
variable "renovate_token" {
description = "Personal access token for Renovate bot authentication"
type = string
sensitive = true
}
variable "renovate_git_author" {
description = "Git author for Renovate commits (e.g., 'Renovate Bot <renovate-bot@example.com>')"
type = string
default = "Renovate Bot <renovate-bot@example.com>"
}
variable "renovate_username" {
description = "Username of the Renovate bot account"
type = string
default = "renovate-bot"
}
variable "renovate_autodiscover" {
description = "Enable autodiscovery of repositories"
type = bool
default = true
}
variable "renovate_onboarding_config" {
description = "Onboarding configuration for Renovate (JSON string)"
type = string
default = "{\"$schema\":\"https://docs.renovatebot.com/renovate-schema.json\",\"extends\":[\"config:recommended\"]}"
}
# Optional GitHub.com token for fetching changelogs
variable "github_com_token" {
description = "GitHub.com token for fetching changelogs (optional)"
type = string
default = ""
sensitive = true
}
# Logging
variable "log_level" {
description = "Log level for Renovate (debug, info, warn, error)"
type = string
default = "info"
}
variable "extra_env_vars" {
description = "Additional environment variables for the container"
type = list(string)
default = []
}
# Config File Management
variable "upload_config_file" {
description = "Whether to upload a config.js file to the container"
type = bool
default = true
}
# Vault Authentication
variable "role_id" {
description = "Role ID for Vault AppRole authentication"
type = string
sensitive = true
}
variable "secret_id" {
description = "Secret ID for Vault AppRole authentication"
type = string
sensitive = true
}