Genesys Cloud Developer Forum

CX as Code : Import vs Apply

Apologies for my ignorance. I just started exploring the CX as Code.
What is difference of import and apply? In my case, I already exported the whole configuration of my Test Org using the terraform. I'm planning to copy the configuration to our new DR org( still blank so I can play with it).
Wondering how would it differ if I create new .tf files in DR directory and use apply vs. using the import command?

Next plan is to export the configuration of our Production Org. Will it affect the performance of production instance if I use terraform to export all resource_types in one apply? We have about 11k users configured in that org.
Thank you.

Hi Michael,

Import is used to import existing infrastructure into your Terraform state.
Apply is used to create infrastructure using tf config files.

For your use case, you'll need to run apply with the exported config against your DR org in order to create those resources.

I wouldn't expect any performance issues to be caused by running an export. The API should well be able to handle it. The API returns 429 responses to avoid getting overloaded with requests and the terraform provider is able to handle these responses and apply exponential retry logic if necessary.

Thank you Ronin for the response.