- Using the right tool for the job: The speaker emphasizes the importance of selecting the appropriate tools based on the context and evolution of infrastructure code.
- FOLLOWING CI/CD PRACTICES FOR INFRA CODE: The speaker highlights that, just like application code, infrastructure code should also follow continuous integration and delivery practices to ensure consistency and reduce drift between code and infrastructure.
- Reducing drift between code and infrastructure: To achieve this, the speaker recommends using tools like Drift CTL, which checks for differences in infrastructure configurations and sends notifications when changes are made.
- Keeping infrastructure modules manageable: The speaker suggests that, as the complexity of infrastructure increases, it’s essential to keep infrastructure modules organized and managed effectively.
Testing strategy for infrastructure code:
- Create a sandbox environment separate from development environments. This allows developers to deploy and test their code in an isolated space without affecting production or other environments.
- Use tools like Cloud Nuke to completely destroy the test environment after testing.
Some key takeaways:
- Separate test environments: It’s essential to have a separate test environment for infrastructure code, where developers can test and verify their changes before deploying them to production.
- Practical applications: The speaker acknowledges that some teams may not need complex tooling for testing infrastructure code, especially if it’s relatively simple. However, as the complexity of infrastructure increases, more sophisticated testing strategies become necessary.