I’ve used terraform to create a configuration for my AWS VPC setup. The idea is to use terraform apply
in each deployment as well as terraform destroy -target aws_nat_gateway.nat_gateway
to remove the AWS NAT Gateway as it’s only needed to properly deploy the application.
- How should I share/store my terraform.tfstate in between each deployments?
- I’ve also considered using terraform show command but I don’t know how am I suppose to load it back into terraform State - Terraform by HashiCorp
- Should I also store terraform.tfstate.backup what it’s responsibility?
- Are there other methods to make sure that existing VPC will be use? ( hardcode it’s name like an SQL Table if exists )