Git-Based Infrastructure vs ClickOps: Where Git Wins

Where Git-based infrastructure management beats ClickOps: review, repeatability, audit, rollback and drift detection, plus when the console still fits.

Sep 1, 2025 - 12:53
Nov 16, 2026 - 23:11
 0  48
TOPICDevOps BasicsPractical guide
Git-Based Infrastructure vs ClickOps: Where Git Wins

Git-based infrastructure management beats ClickOps whenever a change has to be reviewed, repeated, audited or rolled back. Because the desired state lives in a Git repository, every change has an author, a diff and an approval, and tools such as Terraform or Argo CD can rebuild or correct the environment from that record instead of from someone's memory of the console.

ClickOps means changing cloud resources by clicking through a web console. It is quick for one person exploring a service on a Tuesday afternoon. It gets painful once three teams, two regions and an auditor are involved. This post walks through the specific situations where a Git workflow pays off, the few places where the console is still the sensible choice, and how to move a team from one to the other without stopping delivery. For the wider picture of how GitOps tools fit together, start with our guide to infrastructure as code tools ranked for DevOps.

Key takeaways

  • Git-based management wins on review, repeatability, audit history, rollback and drift detection. ClickOps wins only on speed for one-off exploration.
  • The OpenGitOps project defines four principles: declarative, versioned and immutable, pulled automatically, and continuously reconciled.
  • terraform plan -detailed-exitcode returns 2 when changes exist, which lets a scheduled pipeline flag drift caused by console edits.
  • Argo CD's selfHeal option reverts manual changes made directly in a Kubernetes cluster. It is off by default.
  • Console access does not need to disappear. Make it read-only for most people and keep a documented break-glass path for incidents.

What the two approaches actually mean

In a ClickOps workflow, an engineer opens the AWS, Azure or Google Cloud console, fills in a form and presses create. The resulting resource exists, but the only record of why it looks the way it does is in the engineer's head, maybe a ticket, and the provider's activity log. On AWS that log is CloudTrail, whose event history keeps 90 days of management events per Region by default. It tells you who called which API. It does not tell you what the resource was supposed to look like.

In a Git-based workflow, the desired state is written as code: Terraform or OpenTofu files, CloudFormation templates, Kubernetes manifests, Helm charts or Kustomize overlays. A change starts as a branch, becomes a pull request, gets reviewed and is merged. A pipeline or an in-cluster agent then applies the merged state. When people say GitOps they usually mean the stricter version of this, where an agent pulls the state from Git and keeps correcting the live system to match it.

The OpenGitOps project, overseen by the GitOps Working Group under the CNCF App Delivery SIG, writes the stricter version down as four principles. The desired state is declarative. It is versioned and immutable, so history is kept and nothing is changed in place. Software agents pull it automatically from the source. Those agents continuously reconcile, comparing actual state with desired state and correcting drift. Plenty of teams run Terraform from a CI pipeline, which is push based and does not meet the third and fourth principles, and still get most of the benefit described below.

Where Git-based management clearly wins

1. Changes that someone else must review

A security group rule that opens port 22 to the internet looks the same as any other rule in the console. In a pull request it is a two-line diff with a reviewer's name next to it. Branch protection can require one or two approvals before merge, and code owners files can route network changes to the network team automatically. The console has no equivalent of "show this change to a colleague before it takes effect."

This matters most for shared resources: VPCs, IAM roles, DNS zones, Kubernetes namespaces used by several teams. Those are the places where one person's quick fix becomes another team's outage.

2. Anything you need to build more than once

Staging should look like production. A disaster recovery region should look like the primary. A new customer tenant should look like the last one. With code, the second copy is a new variables file or a new module call. With the console, it is an afternoon of clicking and comparing screenshots, and the copies drift apart within weeks because nobody repeats every later tweak in every environment.

Terraform modules make this concrete. A module for "a standard service" might create a load balancer, a target group, an autoscaling policy and alarms. Each environment calls the module with different sizes. When the team improves the alarm thresholds, they change one module and every environment picks it up on its next apply. Our post on where reusable Terraform modules improve code reuse goes deeper on module design.

3. Audits and compliance questions

Auditors ask three questions again and again: who changed this, who approved it, and what did it look like before. Git answers all three from the commit log and the merged pull request. CloudTrail answers the first one and part of the third, but its default event history covers 90 days, and it records API calls rather than intent. You can keep longer CloudTrail records by creating a trail that delivers to S3, and you should, but the reasoning behind a change still lives in the pull request description.

For teams under ISO 27001, SOC 2 or internal change-management rules, a merged pull request with a linked ticket is usually the cheapest evidence they will ever produce.

4. Rollback

Rolling back a console change means remembering every field you edited. Rolling back a Git change means reverting a commit and letting the pipeline or agent apply the previous state. That is not always instant, because some resources cannot be changed in place and some changes delete data, but at least the target state is known and written down.

Kubernetes workloads managed by Argo CD or Flux make this especially clean, since the agent applies whatever the repository says. Revert the commit and the cluster follows.

5. Drift detection

Drift is the gap between what the code says and what is running. ClickOps creates drift by design: every console edit is a change the code does not know about. A Git workflow can at least detect it.

With Terraform, run a plan on a schedule. The -detailed-exitcode flag makes the exit status meaningful: 0 means no changes, 1 means an error, 2 means the plan found changes. A nightly job that alerts on exit code 2 catches most out-of-band edits within a day. Terraform also has a -refresh-only mode that updates state to match reality without changing infrastructure, which is useful after an incident where someone had to fix things by hand.

terraform init -input=false
terraform plan -detailed-exitcode -input=false -lock=false
status=$?
if [ "$status" -eq 2 ]; then
  echo "Drift detected: live infrastructure differs from the code"
  exit 1
fi

With Argo CD in Kubernetes, drift handling is built in. Automated sync applies changes from Git when the application is out of sync. Two extra options control how aggressive it is. prune deletes resources that were removed from Git, and selfHeal reverts changes made directly in the cluster. Both are off by default as a safety measure, so you choose when to switch them on.

spec:
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

6. Onboarding and knowledge sharing

A new engineer can read a repository. They cannot read the console history of the person who left last year. Code also carries comments, README files and naming conventions that explain decisions. Teams that move to Git often find their onboarding time drops simply because the system is written down for the first time.

7. Disaster recovery

If an account is compromised or a region has a serious incident, rebuilding from code is a matter of pointing the pipeline at a new account or region and fixing the parts that are region specific. Rebuilding from console memory is guesswork. Recovery plans built on infrastructure as code can also be tested regularly, which is the only way to know they work.

Side-by-side comparison

ConcernClickOpsGit-based management
Speed of first changeFast for one personSlower: write code, open pull request, wait for review
Peer reviewNone built inPull request approvals, code owners
RepeatabilityManual, error proneSame code, different variables
Audit trailProvider API logs (CloudTrail event history: 90 days by default)Commit history, pull request discussion, plus provider logs
RollbackRemember and undo each editRevert the commit and re-apply
Drift detectionNot possible without a source of truthScheduled plan or continuous reconciliation
Learning curveLowGit, a tool such as Terraform, CI basics

Where the console is still the right tool

Git-based management is not free. It adds a review step, a pipeline and a tool to learn. A few situations do not justify that overhead.

Exploring a service you have never used is one of them. Clicking through the console shows you which options exist and what the defaults are, and you can delete the experiment afterwards. Many engineers then write the code with the console open in another tab.

Read-only investigation during an incident is another. Looking at metrics, logs and resource settings in the console changes nothing, so there is nothing to track.

True emergencies are the third. If production is down and the fix is a console change, make it. Then open a pull request that brings the code in line, or run a refresh-only plan so state matches reality. The rule worth enforcing is "every emergency change is back in Git within a day," not "never touch the console."

Some account-level settings that are set once and rarely touched, such as billing contacts, can stay manual for a small team. Write them down somewhere, though.

How to move a team from ClickOps to Git

Step 1: pick one boundary

Do not try to codify everything at once. Choose a boundary that is small and changes often: a single service's infrastructure, the DNS zone, or the IAM roles for CI. Getting one area fully into Git teaches the team the workflow without a long freeze.

Step 2: import what already exists

Existing resources need to be brought under management rather than recreated. Terraform supports import blocks in configuration, and terraform plan -generate-config-out can write a starting configuration for imported resources (HashiCorp labels this option experimental, so review the output before applying). Kubernetes resources can be exported and cleaned up into manifests. Expect this step to take longer than you think, mostly because console-created resources often have settings nobody remembers choosing.

Step 3: put the pipeline in front of production

Set up a pipeline that runs a plan on every pull request and posts the result as a comment, then applies on merge to the main branch. Store state remotely with locking so two runs cannot collide. Our article on remote state management in Terraform covers the backend options.

Step 4: reduce console write access

Once a boundary is in code, give most people read-only console access to it. Keep a break-glass role that is logged, alerted on and time limited. This is the step that actually stops drift. Without it, the code and the console compete and the console usually wins.

Step 5: add drift detection and policy checks

Schedule the drift job described above. Add policy checks to pull requests so obvious mistakes, such as public buckets or open SSH, fail before review. Tools such as Open Policy Agent, Checkov or Trivy's misconfiguration scanner can run in the same pipeline.

Step 6: extend to the next boundary

Repeat for the next area. After two or three rounds the team usually has shared modules, a pipeline template and enough confidence to bring in the rest.

Common mistakes when adopting Git-based infrastructure

The most common one is keeping secrets in the repository. Passwords, tokens and private keys should come from a secrets manager or be encrypted with a tool built for the purpose. We cover the options in secret management in GitOps workflows.

The second is one giant repository with one giant state file. A plan that touches every resource in the company takes a long time and makes reviewers nervous. Split state by environment and by service so each change has a small blast radius.

The third is approving pull requests without reading the plan. The diff of the code is not the diff of the infrastructure. Reviewers should look at what the plan says will be created, changed or destroyed, especially destroys.

The fourth is leaving console write access in place "just for now." That turns every week into a drift-cleanup week.

Push pipelines versus pull agents

Teams often ask whether they need a pull-based GitOps agent or whether a CI pipeline is enough. For cloud resources such as VPCs and databases, a pipeline that runs Terraform on merge is the usual pattern and works well. For Kubernetes workloads, a pull agent such as Argo CD or Flux has two advantages. The cluster does not need to expose credentials to the CI system, and the agent keeps reconciling after the deploy, so drift is corrected rather than just reported. Our explainer on why GitOps is preferred over push-based deployments compares the two in more detail.

Many organisations run both: Terraform pipelines for the cloud foundation and Argo CD for everything inside the clusters.

Skills you need for the switch

The technical skills are Git branching and pull requests, one infrastructure as code tool, basic CI configuration, and for Kubernetes teams, a GitOps controller. The habits matter as much: writing small changes, describing why in the pull request, reading plans carefully and treating the console as read-only. If you want structured practice, the Terraform training in Pune covers modules, remote state and pipelines. It runs in our Kharadi classroom and live online, and learners in other cities, including Bangalore, join online.

Frequently asked questions

What is ClickOps?

ClickOps is the practice of creating and changing cloud resources by clicking through a provider's web console instead of using code. It is fast for one-off tasks but leaves no reviewed, repeatable record of the intended configuration.

Is GitOps the same as infrastructure as code?

No. Infrastructure as code means describing infrastructure in files. GitOps adds rules on top: the state is stored in Git, agents pull it automatically and they keep reconciling the live system with it. All GitOps uses infrastructure as code, but not all infrastructure as code is GitOps.

How do I detect changes made in the console?

Run terraform plan -detailed-exitcode on a schedule and alert when it exits with 2, which means changes exist. In Kubernetes, Argo CD marks applications as OutOfSync and can revert manual changes if selfHeal is enabled.

Should engineers lose console access completely?

Usually not. Give read-only access for investigation and keep a logged, time-limited break-glass role for emergencies. Any emergency change should be brought back into Git quickly.

Does Git-based management slow teams down?

The first change is slower because of review and pipeline time. Later changes, new environments and recoveries are much faster, and fewer incidents come from unreviewed edits.

Which tools are used for Git-based infrastructure?

Common choices are Terraform or OpenTofu and CloudFormation for cloud resources, and Argo CD or Flux for Kubernetes. A CI system such as GitHub Actions, GitLab CI or Jenkins runs plans and applies.

Can I import existing console-created resources?

Yes. Terraform supports import blocks and can generate configuration for imported resources. Plan for cleanup time, because console-created resources often carry settings nobody remembers choosing.

References

Interested in learning more?Get a callback from our training advisors.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.