350-201 Question 288
Select 3A security engineer is deploying infrastructure in a multi-cloud environment using Infrastructure as Code (IaC) principles. To maintain consistency, scalability, and security, which of the following principles should they adhere to when writing and managing the IaC templates?
- A
Use version control systems to manage changes to IaC templates.
- B
Manually configure security policies and settings after deploying resources.
- C
Implement modular design to reuse code across multiple deployments.
- D
Integrate automated testing to validate IaC changes before deployment.
- E
Store secrets and sensitive information directly within the IaC templates for accessibility.
Show answer and explanation
Correct answers: A, C, D
Explanation
Infrastructure as Code (IaC) principles emphasize automation, consistency, and scalability. Using version control, modular design, and automated testing ensures efficient and secure template management. Avoiding manual configurations and securely managing secrets are essential to maintaining security and compliance in an IaC-driven environment.
- A. Correct.
Using version control systems ensures that all changes to IaC templates are tracked, allowing for rollback, auditing, and collaborative development. This is a key principle of IaC.
- B. Incorrect.
Manually configuring security policies contradicts the automation and repeatability principles of IaC. Security configurations should be codified within the templates.
- C. Correct.
Modular design allows for code reuse and simplifies maintenance, making the templates scalable and easier to manage.
- D. Correct.
Automated testing is essential to ensure that changes to IaC templates do not introduce errors or vulnerabilities before deployment.
- E. Incorrect.
Storing secrets directly in IaC templates violates best practices for security and can expose sensitive information. Secrets should be managed securely using tools like vaults or environment variables.