Infrastructure as Code Pitfalls and How to Avoid Them - Part 1
April 05, 2021

Tim Davis
env0

Infrastructure as Code. It's not a totally new concept, but it isn't something that everyone is doing at this point. Some have been doing it for a long time. Some have just started the journey. And some have no clue what it even is.

We're going to break it down a bit today, and talk about what it is and some of the common issues, or pitfalls, that come along with it.

What kind of pitfalls can come up?

I have great news for you... The answer is "a lot."

It's not very good news, I guess. But as long as you take the time to consider all your options, and plan accordingly, you can mitigate just about any issues that come up.

So, why is there a lot that can go wrong? It's because of the nature of Infrastructure as Code (IaC). It's infrastructure and it's code. That means you take all the pitfalls that can come along with infrastructure and add them to all the pitfalls that can come along with code.

Infrastructure as Code creation, and management, seems to be the most successful when it is a joint effort between the development team and the infrastructure ops team. DevOps … get it? When this isn't a collaborative effort, infrastructure configuration issues can come up.

Dev and Ops each have their own areas of expertise. That's not to say that people in one don't understand the other. It just means they are experienced in their area. So why not benefit from the knowledge and experience of both?

Infrastructure Pitfalls

The first big pitfall is choosing the wrong framework for your IaC needs. Most major cloud providers have their own specialized framework.

For example, Cloud Formation on AWS, and ARM templates on Azure. These are great if you are 100% dedicated to that cloud. But if you ever decide to migrate or go multi-cloud, your existing IaC configurations can't be used on the new cloud. There are some tools to convert, but this problem can be easily solved by choosing a cloud-agnostic framework from the beginning. Some frameworks have the ability to deploy to pretty much any cloud provider, and even control other pieces of the infrastructure and SaaS tools.

Infrastructure teams usually don't just spin up resources and delete them at will. Generally, lots of variables come into play. Capacity planning or cost analysis, for example. This is to control over or under-provisioning the needed resources, or even overrunning the cloud budget. This pitfall can be mitigated by the Ops team being involved in the creation of the IaC configuration files, or by helping to manage and govern the self-service of the IaC deployments done by the development team.

Another infrastructure pitfall is going to be security. In the past, lots of development teams had the luxury of secure development sandboxes. No real need to involve security until the time when their project is being turned over from development to production, at which point then security was involved as an afterthought.

By shifting security left with IaC in your deployment process, you can work to mitigate security risks and misconfigurations before they happen. Utilizing tools like Open Policy Agent for Policy as Code can help you ensure that no deployment of IaC resources ever happens when the code files contain infrastructure security misconfigurations. Open Policy Agent will parse your IaC configuration files and check them against Policy as Code files that you create to set up the guardrails of your deployments.

Go to: Infrastructure as Code Pitfalls and How to Avoid Them - Part 2, covering the pitfalls of code.

Tim Davis is a DevOps Advocate at env0
Share this

Industry News

June 17, 2021

Bitrise announced the release of its new enterprise-grade Mobile DevOps platform.

June 17, 2021

Perforce Software announces a partnership with Microsoft to deliver the free Enhanced Studio Pack, providing development tools in a click-to-start model on the Azure cloud.

June 17, 2021

Tigera announced the availability of Calico Cloud in the Microsoft Azure Marketplace.

June 16, 2021

Red Hat announced the general availability of Red Hat’s migration toolkit for virtualization to help organizations accelerate open hybrid cloud strategies by making it easier to migrate existing workloads to modern infrastructure in a streamlined, wholesale manner.

June 16, 2021

BrowserStack announced it has secured $200 million in Series B funding at a $4 billion valuation.

June 16, 2021

Harness announced significant platform updates that address gaps in today's developer and DevOps market.

June 15, 2021

Broadcom announced new capabilities for Value Stream Management (VSM) in its ValueOps software portfolio, seamlessly combining the proven investment planning features of Clarity™ with the advanced Agile management capabilities of Rally® software.

June 15, 2021

Copado announced its Summer 21 Release, opening up its platform for true multi-cloud DevOps for enterprise SaaS and low-code development.

June 15, 2021

SmartBear released a new plug-in for SwaggerHub API design to support IntelliJ IDEA, the popular Java-based integrated developer environment (IDE).

June 14, 2021

Accurics announced a technology partnership with GitLab as well as the general availability of its integration with GitLab's Static Application Security Testing (SAST) solution.

June 14, 2021

SmartBear released new versions and add-ons of test management solution, Zephyr Enterprise, with major upgrades for businesses in critical industries.

June 14, 2021

ShiftLeft has released a tool enabling businesses to independently benchmark and validate the accuracy of ShiftLeft CORE using the Open Web Application Security Project (OWASP) Benchmark Project, a Java test suite designed to evaluate the accuracy of vulnerability detection tools.

June 10, 2021

Contrast Security announced the release of Contrast Scan that revolutionizes static application security testing (SAST) with pipeline-native static analysis to analyze code and detect vulnerabilities early on in the software development life cycle (SDLC).

June 10, 2021

CyberArk announced the availability of CyberArk Cloud Entitlements Manager, CyberArk Endpoint Privilege Manager and CyberArk Workforce Identity on Amazon Web Services Marketplace (AWS Marketplace).

June 10, 2021

Komodor announced a $21 Million Series A funding round led by Accel.