explaingit

googlecloudplatform/terraformer

14,531GoAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

CLI tool that does reverse Terraform, point it at existing cloud infrastructure and it generates the Terraform config and state files for AWS, GCP, Azure, and many other providers. Archived as of March 2026.

Mindmap

mindmap
  root((Terraformer))
    Inputs
      Cloud credentials
      Provider name
      Resource filters
    Outputs
      HCL files
      Terraform state
      JSON output
    Use Cases
      Adopt Terraform on existing infra
      Migrate clouds
      Audit resources
    Tech Stack
      Go
      Terraform
      HCL
      Cloud SDKs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Generate Terraform config from an existing AWS account so you can manage it as code going forward.

USE CASE 2

Export all GCP resources in a project to HCL, then commit them to a git repo for review.

USE CASE 3

Import a subset of Azure resources filtered by tag or region into a new Terraform module.

USE CASE 4

Audit what is actually deployed in a cloud account by diffing generated HCL against your repo.

Tech stack

GoTerraformHCL

Getting it running

Difficulty · moderate Time to first run · 30min

Project is archived (read-only since March 2026) and needs read-only cloud credentials plus Terraform 0.13+ installed.

License is not stated in the available content.

In plain English

Terraformer is a command line tool that does what its tagline calls "reverse Terraform". Terraform is the popular tool from HashiCorp that lets people describe cloud infrastructure (servers, networks, databases) in text files and then create it. Terraformer goes the other way: you point it at infrastructure that already exists in a cloud account, and it writes out the Terraform configuration files and state files that would have produced it. The README labels this concept "Infrastructure to Code". The README opens with a notice that the project is no longer maintained. As of 16 March 2026 the repository has been archived, is read-only, and will not receive further updates, security patches, or support. The tool was created by the Waze SRE team and the README is careful to say it is not an official Google product, even though the repository lives in the GoogleCloudPlatform GitHub organisation. The list of supported providers is long. The major clouds covered are Google Cloud, AWS, Azure, AliCloud, and IBM Cloud. There are also smaller cloud providers like DigitalOcean, Linode, Vultr, Heroku, Equinix Metal, Fastly, OpenStack, Tencent Cloud, Yandex Cloud, and Ionos Cloud, along with Kubernetes, RabbitMQ, OctopusDeploy, Cloudflare (noted as broken), GitHub, GitLab, Azure DevOps, Datadog, New Relic, PagerDuty, Okta, Auth0, AzureAD, and several community-contributed integrations. Each provider is documented in a separate markdown file under the docs folder. Usage follows a single pattern: pick a provider, then tell the tool which resources to import. Flags include resources for picking services (or * for all), excludes for skipping some, filter for narrowing by attribute or id, regions and projects, and an output format of HCL or JSON. The output can be written to a custom folder tree, and Terraformer can either keep the resulting state file locally or upload it to a Google Cloud Storage bucket and link resources between modules using terraform_remote_state. It requires only read-only credentials, supports Terraform 0.13 onward, and is installed via Homebrew, the Arch User Repository, or a Go build.

Copy-paste prompts

Prompt 1
Install Terraformer with Homebrew and write the exact command to import all EC2 instances and S3 buckets from my AWS account in us-east-1.
Prompt 2
Generate the Terraformer command to export every GCP resource in project my-prod-123, filter by label env=prod, and write HCL to ./tf-import/.
Prompt 3
Terraformer says 'Cloudflare provider is broken' in the README. Show me a workaround using terraform import for Cloudflare DNS records.
Prompt 4
Write a bash script that runs Terraformer against AWS, then runs terraform plan to confirm zero diff.
Prompt 5
The repo is archived. Recommend 2 maintained alternatives to Terraformer for importing AWS infra in 2026 and compare them.
Open on GitHub → Explain another repo

← googlecloudplatform on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.