How to import existing Aurora PostgreSQL into terraform

0

Hi, I have some RDS but i want to import them into terraform, so they can be easier to manage, i saw that there is an import command but I'm not sure if using this will be the best approach because if i understood correctly it may also delete services, what would be the best way to migrate an existing Aurora PostgreSQL to terraform? and a short example or some articles that would help would be nice :)

2 Respostas
0

Hello.

When you want to manage existing AWS resources like an RDS instance with Terraform, the terraform import command is indeed the way to go.https://developer.hashicorp.com/terraform/cli/import

Regards, Andrii

profile picture
ESPECIALISTA
respondido há 7 meses
0
  1. Firstly you need to build your Terraform code to match the configuration of the RDS instances.
  2. Secondly, you would then need to import each RDS into your Terraform state using the import command.
  3. Thirdly, you should run a terrform plan to align and see any differences between the State and the .tf files.

Using the Plan ensures that when you run an apply you will not see any unexpected changes such as a destroy.

profile picture
ESPECIALISTA
respondido há 7 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas