200-901 · Question #158
What are the two principles of an infrastructure as code environment? (Choose two)
The correct answer is A. Complete complex systems must be able to be built from reusable infrastructure definitions. B. Environments must be provisioned consistently using the same inputs. Infrastructure as Code rests on two core principles: building systems from reusable definitions and provisioning environments consistently from the same inputs. These together ensure repeatability and eliminate configuration drift.
Question
What are the two principles of an infrastructure as code environment? (Choose two)
Options
- AComplete complex systems must be able to be built from reusable infrastructure definitions.
- BEnvironments must be provisioned consistently using the same inputs.
- CRedeployments cause varying environment definitions.
- DService overlap is encouraged to cater for unique environment needs.
- EComponents are coupled, and definitions must be deployed for the environment to function.
How the community answered
(48 responses)- A90% (43)
- C6% (3)
- D2% (1)
- E2% (1)
Why each option
Infrastructure as Code rests on two core principles: building systems from reusable definitions and provisioning environments consistently from the same inputs. These together ensure repeatability and eliminate configuration drift.
IaC enables complex infrastructure to be decomposed into reusable, modular definitions - such as Terraform modules or Ansible roles - that can be shared, versioned, and composed to build entire systems without rewriting configurations from scratch.
A foundational IaC principle is idempotency - applying the same code with the same inputs must always produce identical environments. This consistency eliminates drift and the 'works on my machine' problem across development, staging, and production environments.
IaC explicitly prevents varying environment definitions on redeployment; idempotency ensures the same inputs always yield the same output, making this statement the direct opposite of an IaC principle.
IaC promotes DRY (Don't Repeat Yourself) principles with modular, reusable components; encouraging service overlap contradicts the modularity and reuse that IaC is built upon.
IaC promotes loosely coupled, independently deployable components, meaning tight coupling between definitions contradicts IaC best practices, which favor modular designs where components can be deployed or replaced independently.
Concept tested: Infrastructure as Code idempotency and reusability principles
Source: https://developer.hashicorp.com/terraform/tutorials/aws-get-started/infrastructure-as-code
Topics
Community Discussion
No community discussion yet for this question.