Files
iac-homelab/terraform/prod/providers.tf
darnodo 5189398f8d
Some checks failed
Terraform CI/CD / Validate (pull_request) Failing after 3s
Terraform CI/CD / Plan (pull_request) Has been skipped
Terraform CI/CD / Apply (pull_request) Has been skipped
chore: allow tfvars and set min terraform version
- Update .gitignore to remove `*.tfvars` exclusion, allowing variable definition files to be tracked in version control.
- Enforce a minimum Terraform version of 1.5.0 in `terraform/prod/providers.tf` to ensure compatibility with modern features.
2025-12-08 09:55:43 +01:00

51 lines
1.5 KiB
HCL

# =====================================================================
# Déclaration des Providers Terraform
#
# Ce fichier indique à Terraform quels "plugins" il doit
# télécharger pour interagir avec les API externes (Proxmox, etc.)
# et comment les configurer.
# =====================================================================
terraform {
required_version = ">= 1.5.0"
# ---------------------------------------------------------------------------
# Backend S3 - Stockage distant du state Terraform
#
# Utilise Scaleway Object Storage (compatible S3) pour stocker
# le fichier terraform.tfstate de manière centralisée et sécurisée.
#
# Variables d'environnement requises :
# - AWS_ACCESS_KEY_ID : Clé d'accès Scaleway
# - AWS_SECRET_ACCESS_KEY : Clé secrète Scaleway
# ---------------------------------------------------------------------------
backend "s3" {
bucket = "netlab-terraform-backend"
key = "prod/terraform.tfstate"
region = "fr-par"
endpoint = "https://s3.fr-par.scw.cloud"
# Paramètres requis pour Scaleway (non-AWS S3)
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
}
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.89.0"
}
}
}
provider "proxmox" {
endpoint = var.proxmox_url
api_token = var.proxmox_api_token
insecure = true
ssh {
agent = true
username = "root"
}
}