Appendix B. Solutions to exercises
Exercise 1.1
Choose an infrastructure script or configuration in your organization. Assess whether it adheres to the principles of IaC. Does it promote reproducibility, use idempotency, help with composability, and ease evolvability?
Answer:
You can use the following steps to identify whether your script of configuration follows IaC principles:
-
Reproducibility—Copy and paste the script or configuration, share it with someone else, and ask them to create the resources without modifying or changing the configuration.
-
Idempotency—Run the script a few times. It should not change your infrastructure.
-
Composability—Copy a portion of the configuration and build it on top of other infrastructure resources.
Get Infrastructure as Code, Patterns and Practices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.