Duplicate an existing serverless app infra(built in the console management) using terraformer

0

Hello !I have already an AWS infrastructure built manually. Now i want to practise infrastructure as code so i used a tool called terraformer to extract the existing infra as code. But i can not use this code to create an infra in an other AWS account using terraform command. Could you help me please? when i run terraform apply i have the error : can not read state file

  • if you want to load existing infra use terraform import command. don't touch the state file at any case.

1 réponse
1

Hey - the terraform state file is unique to each deployment. It sounds like your new deployment is trying to reach the old state file.

I'd recommend going through the HashiCorp AWS Terraform tutorials and learning the product, before using another tool to extract IaC from an existing account.

profile pictureAWS
Jake
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions