i feel confusion about what is IaC. what it difference between common automation. Why we must say it infrastructure as code not just infrastructure automation. because from several explanation iac is just to automate infrastructure. thank you
-
1Infrastructure as Code is about managing and provisioning the infrastructure through code rather than doing it manually. Whereby automation is about using technology to perform tasks without human involvement. – U880D Nov 27 '21 at 07:34
2 Answers
The key difference between IaC and 'just automation' is completeness of coverage of infrastructure.
If you have occasional sparks of 'robots do this', it's automation. You don't need to go and do it by hands anymore, good automation, thank you.
If reading your repo allows to completely understand your infrastructure, that's IaC. Basically, in simple automation, having non-automated server is fine (as long as it not consuming too much time). In IaC it's a big problem, because you've got a magical artifact (non-automated server), and you can't get idea what's this by just reading git.
Second key feature is that you have your infrastructure been completely reproducible by using git. You moved to a new DC (new hoster, new whatever), you run code, and, boom, you got your production up and running.
Third, is amount of tests of your IaC. Can you spot a bug in your playbooks/cookbooks/whatever before they hit production or not?

- 6,952
- 10
- 39
- 80
IaC (Infrastructure as Code) is a label that identifies a subset of such automation approaches and tools.
Infrastructure Automation is the broader categorisation, the superset, for anything that enables installing and configuring infrastructure end2end in a way that can be repeated by a computer i.e. fully automated. Infrastructure that can perform a task must be the result otherwise it's just automating one of the setup steps. Typically, from an application-centric view, so all the infrastructure that is required for the application code to run successfully.
This is in contrast to manual infrastructure which involves a human performing steps in the end2end process of setting up a piece of infrastructure that can perform a task.
The two broad sub-categories of automation:
- an engineer can use a GUI-based tool to define automation steps.
- an engineer can use code to define automation steps. IaC falls here.
IaC further breaks down into (might not be exhaustive):
- instance configuration (e.g. Chef, Puppet)
- none stateful ad-hoc scripts (e.g. shell)
- none stateful imperative (Python + AWS Boto)
- stateful declarative (e,g, Hashicorp Terraform, AWS CloudFormation)
- stateful imperative (e.g. AWS CDK, CDK for Terragorm, Pulumi)
IFC (Infrastructure from Code) is a new category being discussed. The idea is that infrastructure is "inferred" from one's application code. As opposed to separate code that spins up the infra and then having to manually glue the application to the infra with pipelines (defining how the code is deployed to the infra) and config files (how does that application communicate with the infra like connection string to a Database).

- 307
- 3
- 10