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.

已提問 2 年前檢視次數 238 次
1 個回答
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南