Terraform Scripts & GitHub Actions Pipeline
Budget: ₹12,500 – ₹37,500 INR
I need a hand writing clean, reusable Terraform code and wiring it into a GitHub Actions workflow that automatically builds and tests my infrastructure-as-code repository on every push.
Where I am now
– The repository is already on GitHub and contains a rough folder structure, but the Terraform pieces still live in scattered files and lack modules, variables and state back-end configuration.
– A very basic GitHub Actions file exists; it only checks out the code. No plan, validate or test steps are in place yet.
What I’d like you to do
1. Refactor the current snippets into proper Terraform modules with clear variables, outputs and a remote state backend (I’m open to S3, Azure Storage or any standard option).
2. Create GitHub Actions YAML that runs terraform fmt, init, validate and plan for pull requests, then applies to the desired workspace when I merge to main.
3. Add unit-style tests with terraform-validate or terratest (whichever is faster to set up) so failures surface early in the build stage.
4. Document every step in the README so future contributors can reproduce the workflow locally with terraform and act.
Acceptance criteria
• terraform fmt returns no changes.
• Workflow runs in under 5 minutes on a medium GitHub runner.
• A successful merge to main produces an up-to-date state file in the remote backend.
• All modules pass the defined tests with exit code 0.
If you’ve automated similar IaC pipelines before and are comfortable with Terraform CLI, GitHub Actions, and writing concise YAML, this should be straightforward. I’m ready to share the repo as soon as we agree on the approach, and I can be available for quick reviews so we keep momentum.
Where I am now
– The repository is already on GitHub and contains a rough folder structure, but the Terraform pieces still live in scattered files and lack modules, variables and state back-end configuration.
– A very basic GitHub Actions file exists; it only checks out the code. No plan, validate or test steps are in place yet.
What I’d like you to do
1. Refactor the current snippets into proper Terraform modules with clear variables, outputs and a remote state backend (I’m open to S3, Azure Storage or any standard option).
2. Create GitHub Actions YAML that runs terraform fmt, init, validate and plan for pull requests, then applies to the desired workspace when I merge to main.
3. Add unit-style tests with terraform-validate or terratest (whichever is faster to set up) so failures surface early in the build stage.
4. Document every step in the README so future contributors can reproduce the workflow locally with terraform and act.
Acceptance criteria
• terraform fmt returns no changes.
• Workflow runs in under 5 minutes on a medium GitHub runner.
• A successful merge to main produces an up-to-date state file in the remote backend.
• All modules pass the defined tests with exit code 0.
If you’ve automated similar IaC pipelines before and are comfortable with Terraform CLI, GitHub Actions, and writing concise YAML, this should be straightforward. I’m ready to share the repo as soon as we agree on the approach, and I can be available for quick reviews so we keep momentum.