1.8 Summarize evolving use cases for modern network environments
Infrastructure as Code (IaC)
📘CompTIA Network+ (N10-009)
What Is Source Control in IaC?
Source control is a system that tracks changes made to files over time. In IaC, these files can include:
- Network configuration templates
- Firewall policy definitions
- Router and switch configuration files
- Cloud infrastructure scripts (Terraform, Ansible, etc.)
- Automation playbooks
Source control ensures that any change to infrastructure code is tracked, reversible, reviewable, and collaborative.
2. Version Control
Version control is the core function of a source-control system. It records every change made to IaC files.
Key points for the exam:
- Each update to a file creates a new version.
- You can see who changed what and when.
- You can roll back to an earlier version if a configuration breaks a system.
- Helps maintain consistency, especially in large and automated networks.
IT Example:
A network engineer updates an Ansible playbook that configures all access switches. If the new update causes VLAN misconfigurations, version control allows the team to quickly revert to the previous working version.
Why it matters for IaC:
Infrastructure changes become predictable and safe because everything is stored and tracked like software.
3. Central Repository
A central repository is a main shared storage location where all IaC configuration files are kept. Every engineer works with the same source of truth.
Common systems:
- GitHub
- GitLab
- Bitbucket
- Azure DevOps
- On-premises Git servers
Key exam points:
- Ensures all team members access the same IaC scripts and configuration files.
- Allows collaboration through pull requests, commits, and merging.
- Provides a backup of infrastructure code.
IT Example:
All Terraform files defining cloud networking (VPCs, subnets, route tables, firewalls) are stored in a central Git repository so the entire team always uses the same configuration.
Why it matters:
Prevents issues caused by engineers using outdated or incorrect configuration files.
4. Conflict Identification
Conflicts happen when multiple people modify the same file or the same lines within a file at the same time.
Source control tools automatically detect these conflicts before changes are merged.
Key exam points:
- A conflict occurs when changes cannot be merged automatically.
- Source control systems flag conflicts and require engineers to fix them manually.
- This prevents accidental overwriting of someone else’s IaC work.
IT Example:
Two engineers update a firewall configuration template:
- Engineer A adds a new ACL rule
- Engineer B changes an existing rule in the same part of the file
The central repository identifies a conflict and stops the merge.
The engineers must review and resolve it before the file can be updated.
Why it matters:
Ensures accurate, error-free IaC deployment.
5. Branching
Branching allows engineers to work on changes without affecting the main production configuration.
Key exam points:
- A branch is a separate copy of the code used for testing, development, or feature updates.
- Engineers make changes in branches, not in the main (production) branch.
- After testing, branches can be merged into the main branch.
- Prevents mistakes from reaching production environments.
Common branch types:
- Main / Master branch → Production-ready IaC
- Development branch → Testing new changes
- Feature branches → Specific updates such as adding new subnets, VLANs, or firewall rules
IT Example:
A network team wants to add configuration for a new remote site.
They create a branch called “remote-site-deployment”, edit the IaC files (such as router configs or VPN definitions), test them, and merge the branch when everything works.
Why it matters:
Branching avoids downtime and keeps production configurations stable.
How These Source Control Concepts Work Together in IaC
| Source Control Function | How It Helps IaC |
|---|---|
| Version Control | Tracks all infrastructure changes; allows rollback. |
| Central Repository | Ensures everyone uses the same IaC files. |
| Conflict Identification | Prevents overwriting or breaking someone else’s code. |
| Branching | Enables safe testing and development of infrastructure changes. |
Together, these practices make IaC:
- Safer
- More reliable
- Easier to manage
- Highly automated
- Less prone to human error
What to Remember for the Network+ Exam
- IaC treats network configurations like software code.
- Source control is essential to track, manage, and work collaboratively on IaC.
- Version control tracks changes and allows rollback.
- A central repository provides a single source of truth for network and cloud configurations.
- Conflict identification prevents conflicting changes from breaking IaC deployments.
- Branching helps teams work independently without impacting production.
