Generating Terraform
AutoCloud has the ability to generate Terraform code, state, and modules from your existing cloud resources on AWS, Azure, and GCP. You can use this functionality to Terraform entire cloud accounts on demand in order to get to full IaC coverage.
AutoCloud provides a view in our "IaC Explorer" page where you can see all of your cloud assets as well as various information about them including:
- The resource name and type
- The IaC status - which is either unmanaged, codified, or drifted
- Security issues (CIS, NIST, PCI)
- Tags
- Resource metadata

If you click on the IaC status of a drifted resource, you can view information about what has drifted from its original state:


Clicking on any red shield icons under the "Issues" column will show you what issues AutoCloud has identified with your cloud resources so you can fix them before you generate Terraform code in order to ensure compliance:



In order to generate Terraform code for existing cloud resources, simply select the resources you wish to codify and click the "Generate Terraform" button.

Terraform will be automatically generated for the resources, and you can customize how Terraform is generated (i.e. the raw code with or without data sources, a TF module, state...). From this screen, you can either download the code and copy it over to the right places, or create a PR against your VCS (GitHub is currently supported) in order to integrate with your existing GitOps workflows.

