Security pillar principles in Azure - Time & Space Complexity
We want to understand how the time to apply security principles grows as we add more resources or policies in Azure.
How does the effort or operations needed scale when securing cloud infrastructure?
Analyze the time complexity of applying security policies to multiple Azure resources.
// Pseudocode for applying security policies
for each resource in resourceList {
assign security policy to resource;
configure access controls;
enable monitoring and logging;
}
This sequence applies security controls to each resource one by one.
Look at what repeats as the number of resources grows.
- Primary operation: Assigning security policies and configuring controls per resource.
- How many times: Once for each resource in the list.
As you add more resources, the number of security assignments grows directly with the number of resources.
| Input Size (n) | Approx. Api Calls/Operations |
|---|---|
| 10 | 10 |
| 100 | 100 |
| 1000 | 1000 |
Pattern observation: The operations increase in a straight line as resources increase.
Time Complexity: O(n)
This means the time to apply security controls grows directly with the number of resources.
[X] Wrong: "Applying security policies happens all at once, so time stays the same no matter how many resources."
[OK] Correct: Each resource needs its own policy assignment, so more resources mean more operations.
Understanding how security operations scale helps you design efficient cloud setups and shows you think about real-world impacts.
"What if we applied a single security policy to a group of resources at once? How would the time complexity change?"