Update IaC modules and workflows.
Update IaC modules and workflows.
Change Summary
This git diff introduces several significant changes across multiple files and components. The primary focus is on setting up new GitHub Actions workflows for deploying and planning infrastructure changes using Terragrunt and OpenTofu. Additionally, there are updates to configuration files, version changes for dependencies, and the introduction of a new mise.toml file for managing tool versions.
Technical Details
- New GitHub Actions Workflows:
.github/workflows/deploy.yml: This workflow is triggered on pushes to themainbranch or manually viaworkflow_dispatch. It includes jobs for checking Terragrunt HCL files and deploying infrastructure using Terragrunt and OpenTofu..github/workflows/plan.yml: This workflow is triggered on pull requests to themainbranch. It includes jobs for checking Terragrunt HCL files and planning infrastructure changes using Terragrunt and OpenTofu.
- Configuration Changes:
IaC/_envcommon/metrics.hcl: Included a newkube_providerconfiguration.IaC/_envcommon/providers/helm.hclandIaC/_envcommon/providers/kube.hcl: Updated theconfig_pathto usepathexpand("~/.kube/config")instead of a hardcoded path.
- Module Updates:
IaC/modules/metrics/main.tf: Changed the version of themetrics-serverHelm chart from3.13to3.12.2.
- Terraform Lock Files:
- Multiple
.terraform.lock.hclfiles across different modules were updated to use version7.12.4of the ArgoCD provider.
- Multiple
- mise.toml:
- Introduced a new
mise.tomlfile to manage tool versions, specifyingterragruntversion0.96.1andopentofuversion1.11.2.
- Introduced a new
Key Learnings & Insights
- Automation and CI/CD: The introduction of GitHub Actions workflows for deploying and planning infrastructure changes demonstrates a shift towards automating infrastructure management processes. This reduces manual intervention and ensures consistency across deployments.
- Version Management: The use of
mise.tomlfor managing tool versions centralizes version control, making it easier to maintain and update dependencies across the project. - Configuration Best Practices: Updating the
config_pathto usepathexpandensures that the configuration is more portable and less prone to errors due to hardcoded paths. - Dependency Updates: Regularly updating dependencies (e.g., ArgoCD provider version) ensures that the project benefits from the latest features, bug fixes, and security patches.
Impact Assessment
- Performance: The changes should not significantly impact performance, as they primarily involve configuration and automation improvements.
- Security: Ensuring that dependencies are up-to-date helps mitigate security risks associated with using outdated software.
- Maintainability: The introduction of automated workflows and centralized version management improves maintainability by reducing manual configuration efforts and ensuring consistency.
Developer Notes
- Gotchas: Ensure that the
mise.tomlfile is correctly configured and that all developers havemiseinstalled to manage tool versions effectively. - Edge Cases: Pay attention to any potential issues with path configurations, especially when using
pathexpand. Test the workflows thoroughly to ensure that they handle different environments correctly. - Future Improvements: Consider extending the GitHub Actions workflows to include additional stages such as testing or linting to further enhance the CI/CD pipeline.
This post is licensed under CC BY 4.0 by the author.