What does infrastructure as code mean?
Infrastructure as code describes servers, networks, and access as files in the repository.

What it is
Infrastructure as code describes servers, networks, certificates, and access as files in the repository. A run creates that state or brings it back in line. The console is then no longer the only source of truth. What applies is in Git, with history, review, and the chance to produce the same state again.
What is not in the files exists only until someone rebuilds the server.
What it is made of
Without those files the server is whatever someone clicked last. Nobody can say why a port is open. A new server becomes a checklist in someone’s head. Two environments that should match drift apart, because a change existed on only one side.
What goes wrong
The files are not the application code. They describe the environment it runs in: which machines, which rules, which variables should exist, not the value of the secrets themselves. Secrets stay outside. The file only says that they exist.
What you otherwise look after yourself
A run can also destroy what it creates. That is why it belongs in a pipeline with review, not in a command someone runs from the wrong folder.
How it shows up on MainPath
MainPath keeps that setup with the project. The next idea does not start from zero in a console. It starts from a state that is already described.