Technologies

Terraform, Ansible and infrastructure as code

Infrastructure as code (IaC) describes your servers, networks and cloud accounts in files, so the whole setup can be reviewed, repeated and rebuilt. I'm a Terraform and Ansible consultant in London, and I write infrastructure as code your team can read and change.

Terraform creates the cloud resources. Ansible configures what runs on them. Packer builds the machine images.

What I do

  • Put a hand-built setup into code. If your AWS account was built by clicking, I import it into Terraform a piece at a time, starting with what would hurt most to lose.
  • Untangle existing Terraform. One enormous state file, state on someone's laptop, or a plan that wants to destroy things. I restructure it so your team can make changes safely.
  • Automate server builds and configuration with Ansible, including Ansible Tower, and machine images with Packer.
  • Build matching environments. A staging copy that is the same as production.
  • Run Terraform through review with Atlantis, so every change is seen before it is applied.
  • Puppet and older tooling. Existing Puppet code kept running, or Puppet, shell scripts and hand-run commands moved to Ansible.

What I'd look at first

  • Where the state file lives, and what secrets are inside it.
  • Whether the code still matches what is running.
  • How much is in one state file, and so how much a single change can affect.
  • Who sees a plan before it is applied.

What it costs

A review of your Terraform starts at £1,500. I quote importing, restructuring and automation at a fixed price, after a look at what you have. See all prices.

I take on Terraform and Ansible work as an ad hoc job, fractional DevOps days each month, a contract or an audit, on site or remotely across the UK. I write about infrastructure at hamzahkhan.com. Get in touch.

Questions

Our infrastructure was built by clicking around the AWS console. Can it still go into Terraform?

Yes. Existing resources can be imported, so nothing has to be rebuilt to bring it under code. I'll quote for the part that is worth doing first.

Terraform or Ansible?

They do different jobs. Terraform creates the cloud resources, and Ansible sets up what runs on the servers. I use both, and I'll work with whichever you already have.

Do you write custom Ansible modules?

Yes. I write custom Ansible modules and Python integrations for APIs that have no official collection, and extend collections that do.

Tell me what you need

A problem, a project or a role you're filling. Describe it in your own words and I'll reply within one working day.