Created workflows for Terragrunt deploy and plan.
Created workflows for Terragrunt deploy and plan.
Change Summary
This update introduces two new GitHub Actions workflows (deploy.yml and plan.yml) for deploying and planning infrastructure changes using Terragrunt, along with a configuration file (mise.toml) specifying the versions of Terragrunt and OpenTofu.
Technical Details
- deploy.yml:
- Triggered on
workflow_dispatchandpushto themainbranch. - Includes jobs for checking Terragrunt HCL and deploying infrastructure.
- Uses
gruntwork-io/terragrunt-actionfor HCL checks and deployment. - Configures AWS credentials and uses Tailscale for secure networking.
- Triggered on
- plan.yml:
- Triggered on
workflow_dispatchand variouspull_requestevents on themainbranch. - Includes jobs for checking Terragrunt HCL and planning infrastructure changes.
- Similar setup to
deploy.ymlbut runsterragrunt planinstead ofapply.
- Triggered on
- mise.toml:
- Specifies the versions of Terragrunt (
0.91.1) and OpenTofu (1.11.1).
- Specifies the versions of Terragrunt (
Key Learnings & Insights
- Automation: The introduction of these workflows automates the deployment and planning processes, reducing manual intervention and potential errors.
- Version Control: Using
mise.tomlto specify tool versions ensures consistency across environments. - Security: Configuring AWS credentials and using Tailscale enhances the security of the deployment process.
Impact Assessment
- Efficiency: Automates repetitive tasks, allowing developers to focus on more complex issues.
- Consistency: Ensures that the same versions of tools are used across different environments.
- Security: Improves the security posture by managing credentials and network configurations effectively.
Developer Notes
- Environment Variables: Ensure that all necessary secrets (
TS_OAUTH_CLIENT_ID,TS_OAUTH_SECRET) are correctly set in the GitHub repository settings. - Dependency Management: Keep an eye on updates for Terragrunt and OpenTofu to benefit from new features and security patches.
- Future Improvements: Consider adding additional checks or notifications for failed deployments or plans.
This post is licensed under CC BY 4.0 by the author.