Infrastructure as code meaning, in plain words

Infrastructure as code manages server configuration with files. What NIST SP 800-204C and the NIST glossary say, and why secrets must stay out of those files.

Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated

IaC is a method of managing server configuration with files. The name stands for infrastructure as code. Preparing and configuring servers, networks and storage is done with written files instead of manual work on a screen. NIST SP 800-204C lists IaC as code for provisioning and configuring computing resources, networks and storage.

How does IaC work?

It is close to a recipe. With a recipe, anyone can reproduce the same dish, and you can compare it with the previous version. In IaC, a file that plays the part of the recipe describes the shape of the system, and the system is built by having the tool read that file.

According to NIST SP 800-204C, a cloud-native app built from microservices has five kinds of code related to the app's environment: application logic, application services, IaC, policy as code, and observability as code. Whatever your files say, the free URL check reports only what an outside visitor can see.

Because files keep a history, you can trace when and who widened a traffic permission. On the other hand, a wrong configuration is copied in the same form many times. You need a step that reviews the content before it is applied. Traffic settings such as a security group are written as files too.

Why does IaC matter?

Manual configuration depends on one person's memory and creates differences between systems. Keeping it in files makes it easier to keep production and test systems in the same shape. Handover and rebuilding after an incident are also quicker, because the system can be rebuilt from the file.

However, if you write a key or a password into a file, it leaks as soon as the file is shared. Secret values should be read from a storage place outside the file. If a contractor builds your system with IaC, confirm how the files are reviewed and who approves changes.

Related terms

  • DevSecOps: building security in from the start of development through operation
  • Security group: a cloud setting that limits traffic to a server
  • Least privilege: granting only the range that is needed
  • Hardcoded secrets: the flaw of writing keys or passwords directly in code

Frequently asked questions

Is IaC only for large companies?

Size does not decide it. If you rebuild server and network settings often, managing them in files has clear benefits. In a small configuration, simply keeping a record of the manual settings already helps.

Can I write passwords or keys in an IaC file?

Do not. When the file is shared or kept in history, the secret values spread with it. Load the values from a storage place outside the file, and write only where to find them.

Next step

Begin by asking your contractor whether your system was built by hand or from files. For a review of your configuration, contact us.

Frequently asked questions

Is IaC only for large companies?

Size does not decide it. If you rebuild server and network settings often, managing them in files has clear benefits. In a small configuration, simply keeping a record of the manual settings already helps.

Can I write passwords or keys in an IaC file?

Do not. When the file is shared or kept in history, the secret values spread with it. Load the values from a storage place outside the file, and write only where to find them.

See what an attacker can see, today

The free URL check returns a grade in under a minute. For costs and next steps, book a free consultation.