ANS-C01 Question 328
Select 3You are tasked with provisioning a multi-region VPC architecture using an Infrastructure as Code (IaC) template. During a review, you notice that hardcoded values such as specific IP addresses and region names are used in the template. What are the potential problems associated with using hardcoded instructions in IaC templates for provisioning cloud networking resources?
- A
Difficulty in reusing the template for other regions or environments.
- B
Increased risk of human error when maintaining or updating the template.
- C
Improved performance of the provisioning process due to reduced complexity.
- D
Reduced ability to adhere to AWS best practices for scalability and flexibility.
- E
Increased security due to fixed values being more predictable.
Show answer and explanation
Correct answers: A, B, D
Explanation
Hardcoding values in IaC templates introduces inflexibility, increases the potential for errors, and reduces adherence to best practices for cloud resource provisioning. AWS recommends using parameters, mappings, and dynamic configurations to improve reusability, scalability, and maintainability of templates.
- A. Correct.
Hardcoded values limit the reusability of the template, making it challenging to use for other regions or environments without manual modifications.
- B. Correct.
Using hardcoded instructions increases the risk of human error when updates or maintenance are required, as edits must be made manually for each specific value.
- C. Incorrect.
Hardcoding values does not improve performance. It introduces challenges in flexibility and scalability, which can complicate the provisioning process.
- D. Correct.
Hardcoded values often violate AWS best practices, which emphasize scalability, flexibility, and adaptability through parameterization and modular design.
- E. Incorrect.
Hardcoded values do not inherently improve security. In fact, they can create predictability that might be exploited, reducing overall security.