terraform state file not found

plombard 11/08/2025
RÉSOLU
plombard
Auteur Actif
Avatar de plombard
plombard
Auteur Actif

J'essaie de lancer un terraform plan sur un nouveau setup et il me dit Error loading state: state file not found. Mon backend est configuré vers un bucket S3. J'ai raté quoi ?

11/08/2025 à 16:59

4 commentaires

teixeira-patricia
Membre Actif
Avatar de teixeira-patricia
teixeira-patricia
Membre Actif

Tu as bien fait un terraform init après avoir configuré ton backend S3 ? Il faut initialiser le backend pour qu'il sache où chercher le state.

Modifié le 23/05/2026 à 16:20
sebastien-thibault
Membre Actif Secouriste
Avatar de sebastien-thibault
sebastien-thibault
Membre Actif Secouriste

Vérifie le nom de ton bucket S3 et la région dans ton bloc backend C'est souvent une typo qui fout la merde.

Modifié le 23/05/2026 à 16:20

Si tu as fait des changements sur la config de ton backend après l'init tu dois faire un terraform init -reconfigure pour que Terraform prenne en compte les nouveaux paramètres.

Modifié le 23/05/2026 à 16:20
plombard
Auteur Actif
Avatar de plombard
plombard
Auteur Actif

C'était le terraform init -reconfigure qui manquait. J'avais changé la clé du state file et j'avais pas re-init. Merci à tous ça a débloqué le truc.

Modifié le 23/05/2026 à 16:20

Laisser une réponse

Vous devez être connecté pour poster un message !

Rejoindre la communauté

Recevoir les derniers articles gratuitement en créant un compte !

S'inscrire
An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.