{"id":15874722,"url":"https://github.com/nozaq/terraform-deployment-with-environments-example","last_synced_at":"2025-03-16T05:31:02.372Z","repository":{"id":41514293,"uuid":"502461090","full_name":"nozaq/terraform-deployment-with-environments-example","owner":"nozaq","description":"An example Terraform project demonstrating continuous deployment pipeline using GitHub Actions' environment function.","archived":false,"fork":false,"pushed_at":"2024-09-17T07:52:49.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T05:11:40.371Z","etag":null,"topics":["cicd","continuous-deployment","devops","github-actions","terraform"],"latest_commit_sha":null,"homepage":"https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nozaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-11T21:36:18.000Z","updated_at":"2025-02-01T18:59:02.000Z","dependencies_parsed_at":"2023-01-21T20:19:41.994Z","dependency_job_id":"e40ed3d9-cf42-4495-9959-2401ee67a7c7","html_url":"https://github.com/nozaq/terraform-deployment-with-environments-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozaq%2Fterraform-deployment-with-environments-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozaq%2Fterraform-deployment-with-environments-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozaq%2Fterraform-deployment-with-environments-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nozaq%2Fterraform-deployment-with-environments-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nozaq","download_url":"https://codeload.github.com/nozaq/terraform-deployment-with-environments-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806122,"owners_count":20350773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","continuous-deployment","devops","github-actions","terraform"],"created_at":"2024-10-06T01:41:17.924Z","updated_at":"2025-03-16T05:31:01.885Z","avatar_url":"https://github.com/nozaq.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-deployment-with-environments-example\n\nAn example Terraform project demonstrating continuous deployment pipeline using GitHub Actions' environment function. \n\n## Overview\n\n- Deployment workflow runs every time `main` branch is updated. It first runs `terraform plan` and require a manual approval. `terraform apply` will be executed when the job is approved.\n- Preview workflow runs `terraform plan` for each pull request and comment the plan result. The comment is updated when new commits are added to the pull request.\n\n## Prerequisites\n\n- Create two environments `production` and `production-readonly`.\n    - Set required reviewers to `production` environment.\n    - Associate credentials which has sufficient permissions to run `terraform plan` to `production-readonly` environment.\n    - Associate credentials which has sufficient permissions to run `terraform apply` to `production` environment.\n- Terraform project is assumed to have [a non-local backend](https://www.terraform.io/cdktf/concepts/remote-backends) to host state files.\n\n## References\n\n- [Using environments for deployment | GitHub Docs](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment)\n- [Backend Overview | Terraform](https://www.terraform.io/language/settings/backends)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnozaq%2Fterraform-deployment-with-environments-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnozaq%2Fterraform-deployment-with-environments-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnozaq%2Fterraform-deployment-with-environments-example/lists"}