Files
iac-homelab/terraform/prod/providers.tf
darnodo 6efb997684
Some checks failed
Terraform CI/CD / Validate (push) Failing after 1s
Terraform CI/CD / Plan (push) Has been skipped
Terraform CI/CD / Apply (push) Has been skipped
chore(terraform): update version constraint and allow tfvars
- Remove `*.tfvars` from .gitignore to allow tracking variable files.
- Enforce Terraform version to be greater than or equal to 1.5.0 in prod configuration.
2025-12-08 10:22:31 +01:00

50 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"
}
}