How to use Terraformer and Terraform together?

Viewed 32

Problem

I have a Google Cloud project that's already setup and works properly. This is my prod environment.

I want to copy the infrastructure from prod environment and put it into a different Google Cloud project in order to setup my staging environments.

I can successfully pull the resources from one my prod environment using Terraformer, and I can successfully deploy resources using Terraform into my staging environment.

But when I try to pull the resources from my prod environment and push those same resources to my staging environment, I constantly run into problems when I run terraform apply. Such as a 409 error (entity already exists) which is impossible since my staging environment is totally empty.

I've looked at countless guides online and all of them explain how to use terraformer to pull resources but none of them show how to actually deploy those resources.

Things I've Tried

I've googled my issues and have tried:

  • Using modules
  • Using workspaces
  • Using different directories
  • Literally copy and pasting the resource details and the relevant variables changed to match the new environment.

All of these have resulted in a 409 error or terraform telling me that the infrastructure matches the configuration.

What exactly am I doing wrong? Some guidance would be really appreciated.

0 Answers
Related