{"id":15694030,"url":"https://github.com/glennchia/terraform-gitlab-aws","last_synced_at":"2025-07-24T00:37:26.073Z","repository":{"id":55966531,"uuid":"279820461","full_name":"GlennChia/terraform-gitlab-aws","owner":"GlennChia","description":"IAC to automate GitLab Omnibus installations with Praefect, Gitaly, and runners on AWS","archived":false,"fork":false,"pushed_at":"2020-12-03T23:11:03.000Z","size":185,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T00:43:59.823Z","etag":null,"topics":["aws","eks","gitaly","gitaly-cluster","gitlab","gitlab-runner","high-availability","iac","kubernetes","praefect","terraform"],"latest_commit_sha":null,"homepage":"","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/GlennChia.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}},"created_at":"2020-07-15T09:09:10.000Z","updated_at":"2024-09-05T12:05:59.000Z","dependencies_parsed_at":"2022-08-15T10:30:57.553Z","dependency_job_id":null,"html_url":"https://github.com/GlennChia/terraform-gitlab-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GlennChia/terraform-gitlab-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlennChia%2Fterraform-gitlab-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlennChia%2Fterraform-gitlab-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlennChia%2Fterraform-gitlab-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlennChia%2Fterraform-gitlab-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlennChia","download_url":"https://codeload.github.com/GlennChia/terraform-gitlab-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlennChia%2Fterraform-gitlab-aws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774796,"owners_count":23982247,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aws","eks","gitaly","gitaly-cluster","gitlab","gitlab-runner","high-availability","iac","kubernetes","praefect","terraform"],"created_at":"2024-10-03T18:51:14.344Z","updated_at":"2025-07-24T00:37:26.038Z","avatar_url":"https://github.com/GlennChia.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform GitLab on AWS\n\n# 1. Installations\n\n## 1.1 Windows\n\nTerraform Guide\n\n- [Installation Link](https://learn.hashicorp.com/terraform/getting-started/install)\n- Click the \"Chocolatey on Windows\" tab. Manual installation did not work for me\n- Make sure to run as Administrator using Command Prompt\n\nChocolaty install\n\n- [Installation link](https://chocolatey.org/install#install-step1)\n- Install in PowerShell. Run as Administrator\n\nInstall terraform-docs\n\n- Use Chocolaty to install. Run on Command Prompt. [Link](https://github.com/terraform-docs/terraform-docs)\n\n  ```bash\n  choco install terraform-docs\n  ```\n\n\n# 2. Instructions\n\n1. Run `terraform init` in each environment's folder\n2. Run `terraform get` in the environment's folder to register the local modules\n3. Run `terraform validate` to check for syntax errors. Run `terraform fmt` to format code\n4. Run `terraform plan` to understand the changes made\n5. Run `terraform apply -var-file=\"terraform.tfvars\"` to run with the variables file (Create this file based on `terraform.template.tfvars` provided)\nNote: If we want to skip the prompt do `terraform apply -var-file=\"terraform.tfvars\" -auto-approve`\nNote: If we want to target only certain resources, we can do `terraform apply -var-file=\"terraform.tfvars\" -target module.eks`\n6. Run `terraform destroy` after deployment if used for testing\n\n# 3. Directory Structure and best practices\n\nThe following links were used to provide guidance on the Directory Structure\n\n- [Medium: Using Terraform at a Production Level](https://medium.com/@njfix6/using-terraform-at-a-production-level-ec1705a19d82)\n- [Terraform docs: Creating Modules](https://www.terraform.io/docs/modules/index.html)\n- [GitHub repo: Large-size infrastructure using Terraform](https://github.com/antonbabenko/terraform-best-practices/tree/master/examples/large-terraform)\n\nBest practices for naming conventions\n\n- [Terraform docs: Naming conventions](https://www.terraform-best-practices.com/naming)\n\nCode Styling\n\n- [Terraform docs: Code styling](https://www.terraform-best-practices.com/code-styling)\n- [GitHub: terraform-docs](https://github.com/terraform-docs/terraform-docs)\n- [Article: Automatic Terraform documentation with terraform-docs](https://www.unixdaemon.net/cloud/automatic-terraform-documentation-with-terraform-docs/)\n- Run `terraform-docs markdown . \u003e README.md` to generate documentation\n- For the main file I use `terraform-docs markdown . --no-providers \u003e README.md` because somehow my provider was showing up in requirements instead\n- For modules I use `terraform-docs markdown . --no-providers --no-requirements  \u003e README.md`\n\nUsing modules\n\n- [How to create reusable infrastructure with Terraform modules](https://blog.gruntwork.io/@brikis98?source=post_page-----25526d65f73d----------------------)\n\n# 4. Interesting bash tips\n\n**Getting part of the output of a command in bash**\n\nRefer to this [link](https://stackoverflow.com/questions/25116521/how-do-i-get-a-part-of-the-output-of-a-command-in-linux-bash)\n\nExample: This command refers to the first output of the second line\n\n```bash\nkubectl get secrets | awk 'NR==2{print $1}'\n```\n\n**Storing the output of a command in bash in a variable to be referenced elsewhere in a bash file**\n\nRefer to this [link](https://www.tecmint.com/assign-linux-command-output-to-variable/#:~:text=shell%20scripting%20purpose.-,To%20store%20the%20output%20of%20a%20command%20in%20a%20variable,command%20%5Boption%20...%5D)\n\nExample\n\n```bash\ntoken_name=$(kubectl get secrets | awk 'NR==2{print $1}')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglennchia%2Fterraform-gitlab-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglennchia%2Fterraform-gitlab-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglennchia%2Fterraform-gitlab-aws/lists"}