Terraform: Reverse Terraforming
We have developed the world's first reverse Terraform for your Snowflake Cloud Data Warehouse and will continue to add additional abilities that enable you to take your existing Cloud DW footprint and align it with your existing Terraform investments.
Our customers tell us the main use case for this feature is when they have completed a proof-of-value (POV) for Snowflake and as the solution starts moving into the next phase of development, when considering leveraging existing of future use of Infrastructure-as-a-Service (IaaS) and Terraform is the IaaS of choice, conducting a blueprint extraction from the PoV is a tremendous time-saver.
How does it work?
In DLH.io there is an option to articulate the currently deployed Snowflake Cloud Data Warehouse as a set Terraform scripts (.ts files) and state. This is perhaps a snapshot but the most important thing is that it is a complete Terraform configuration for Snowflake that can be now used to deploy the same structure of objects to another Snowflake account.
DLH.io Reverse Terraform of Snowflake service will:
- Communicate with your Snowflake account
- Extract all core objects you select and convert them into Terraform syntax and files
Once the files are extracted you can see the format of the files. You may need to unzip the deployed files for larger accounts that are reversed terraformed.
Once you've completed the process and downloaded your DLH.io Reverse Terraform Snowflake TF files:
- Navigate to your Terraform repository folder in your terminal where your Terraform project exists and you have just copied the output files from DLH.io Terraform Reverse Snowflake
- Initialize your the terraform setup by running,
- Run the terraform import commands by copy pasting them into the terminal or run them as a shell script file
- The above step will generate a tfstate file
- Run terraform plan . if all the resources are correctly imported this will indicate that there are no changes between the existing snowflake infrastructure and the terraform state (tfstate file). If this step indicates changes then that means that there is a difference between the resources imported and the snowflake existing production infrastructure. Any changes will have to be managed on a case by case basis.
- After the tfstate file is in sync with the snowflake production state, any changes made in terraform will involve the below steps -
- Make the change in .tf state file of the resource.
- Run terraform plan to confirm the change
- Run terraform apply to compliment the change in Snowflake