Skip to main content
Cloud DevOps Solutions
Get a quote Talk to an engineer

ClickOps to Terraform Migration

We migrate your AWS or Azure infrastructure from ClickOps to Terraform IaC, discovering all existing resources, generating and cleaning up Terraform code, importing state, and setting up drift detection so every future change is a reviewed code change.

Problems we solve

  • AWS or Azure infrastructure built entirely via Console, nobody knows what exists or why
  • Attempts to write Terraform for existing resources create drift and state conflicts
  • Fear of running terraform apply, last time it destroyed a resource group by accident
  • Security groups and IAM policies cannot be version-reviewed before changes go live
  • Duplicated environments: staging was "copied" from production manually 6 months ago

What's included

Infrastructure discovery: automated inventory of all cloud resources via AWS Config or Azure Resource Graph
Terraform code generation using Terraformer (AWS) or aztfexport (Azure)
Code cleanup and modularisation of generated Terraform
State import: all existing resources brought under Terraform state management
Atlantis or GitHub Actions for PR-based plan/apply workflow
Drift detection CI job that alerts on out-of-band changes
Team training session: Terraform workflow, state management, and common failure modes
Documentation: Terraform runbook and contribution guidelines

Our approach

  1. 01

    Infrastructure discovery

    We run Steampipe or AWS Config queries to produce a resource inventory. We identify which resources are safe to import, which need recreation, and which should be excluded from Terraform.

  2. 02

    Code generation

    Terraformer (AWS) or aztfexport (Azure) generates initial Terraform HCL from existing resources. The output is raw and needs review, but it gives a starting point for every discovered resource.

  3. 03

    Code refinement

    Generated code is cleaned up: magic strings replaced with variables, resources grouped into logical modules, naming conventions applied, and unnecessary attributes removed. This is the most labour-intensive phase.

  4. 04

    State import

    We run terraform import or use import blocks to bring existing resources into state. We verify the state matches reality with terraform plan, a clean plan (no changes) confirms a successful import.

  5. 05

    Drift detection and CI

    A scheduled GitHub Actions or Atlantis job runs terraform plan on a schedule and alerts on any drift between state and actual infrastructure. New resources must be created via Terraform only, ClickOps can be restricted by policy.

Tech stack

TerraformTerraformeraztfexportSteampipeAWS ConfigAzure Resource GraphAtlantisGitHub ActionstflintcheckovOpen Policy Agent

Results

We publish results only when a client has approved them. See how we publish case studies and a sample report.

FAQ

What is ClickOps and why should I stop doing it?
ClickOps means managing infrastructure by clicking through cloud consoles instead of using code. It creates infrastructure that cannot be reproduced, audited, or reviewed. A team member leaving takes undocumented knowledge with them. Terraform fixes this by making every infrastructure change a code change.
What is Terraformer?
Terraformer is an open-source tool that reverse-engineers existing cloud resources into Terraform HCL and state files. It supports several providers, including AWS, GCP and Azure. The generated code requires cleanup but provides a starting point for migration.
What is drift in Terraform?
Drift occurs when actual cloud resources differ from what Terraform state believes they are, usually because someone made a change via the Console or CLI outside of Terraform. terraform plan detects drift by comparing state to live resources. Undetected drift causes unexpected changes on the next apply.
Will the migration break our running infrastructure?
Not by itself. Importing resources into Terraform state does not modify them. The terraform import command only updates the state file. Changes only happen when you run terraform apply with a non-empty plan.
How do we prevent ClickOps from happening again?
Three layers: (1) SCPs (AWS) or Azure Policy restrict who can create or modify controlled resource types outside the pipeline role, (2) CI drift detection alerts on any changes made outside Terraform, (3) team culture change supported by runbooks and contribution guidelines.

Ready to get started?

Book a free technical consultation. No commitment, just an honest conversation about your goals.

Written by Saddique Khan, AWS & Azure Certified · Last updated October 2025