{"id":46172603,"url":"https://github.com/bcochofel/cstudy-infrastructure","last_synced_at":"2026-03-02T16:53:49.236Z","repository":{"id":255212092,"uuid":"848874716","full_name":"bcochofel/cstudy-infrastructure","owner":"bcochofel","description":"Case Study Infrastructure as Code","archived":false,"fork":false,"pushed_at":"2024-12-06T00:55:49.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-30T11:59:25.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcochofel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T15:05:19.000Z","updated_at":"2024-08-30T09:33:53.000Z","dependencies_parsed_at":"2024-08-28T17:02:14.358Z","dependency_job_id":"003382e6-a9c6-4af5-8bc0-27b2a9ae956b","html_url":"https://github.com/bcochofel/cstudy-infrastructure","commit_stats":null,"previous_names":["bcochofel/cstudy-infrastructure"],"tags_count":3,"template":false,"template_full_name":"hashicorp-education/learn-terraform-github-actions","purl":"pkg:github/bcochofel/cstudy-infrastructure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcochofel%2Fcstudy-infrastructure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcochofel%2Fcstudy-infrastructure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcochofel%2Fcstudy-infrastructure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcochofel%2Fcstudy-infrastructure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcochofel","download_url":"https://codeload.github.com/bcochofel/cstudy-infrastructure/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcochofel%2Fcstudy-infrastructure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30010517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T15:15:59.058Z","status":"ssl_error","status_checked_at":"2026-03-02T15:15:58.758Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-02T16:53:48.749Z","updated_at":"2026-03-02T16:53:49.221Z","avatar_url":"https://github.com/bcochofel.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Case-Study Infrastructure\n\nThis repository has Terraform code to deploy a case study infrastructure.\nIt uses semantic versioning, conventional commits, and Azure naming convention for resources.\n\n## [Hashicorp Cloud Platform Integration](sec-hcp-integration)\n\nThe GitHub Workflows are integrated with HCP Terraform API.\nMore information can be found [here](https://developer.hashicorp.com/terraform/tutorials/automation/github-actions#set-up-hcp-terraform)\n\n## [Terraform Modules](sec-terraform-modules)\n\nThe code from this repository uses some modules from both Azure and my own GitHub.\n\nModules from my own repos have some static code analysis tools, used with pre-commit, and also use semantic versioning and conventional commits.\nHere's the list of modules:\n\n- [terraform-azurerm-resource-group](https://github.com/bcochofel/terraform-azurerm-resource-group)\n- [terraform-azurerm-virtual-network](https://github.com/bcochofel/terraform-azurerm-virtual-network)\n- [terraform-azurerm-subnet](https://github.com/bcochofel/terraform-azurerm-subnet)\n\nAll the modules have the same GitHub Workflows, and use the following tools:\n\n- [pre-commit](https://pre-commit.com/)\n- [semantic-release](https://semantic-release.gitbook.io/semantic-release)\n- [terratest](https://terratest.gruntwork.io/)\n\nThey are available in Terraform Registry, and use Terraform naming convention for modules, alongside examples and automatically generated documentation.\n\nList of static code analysis tools:\n\n- [TFlint w/ AzureRM plugin](https://github.com/terraform-linters/tflint)\n- [TFsec](https://github.com/aquasecurity/tfsec)\n- [checkov](https://www.checkov.io/)\n- [terraform-docs](https://terraform-docs.io/)\n\nThe semantic-release ensures that a new release is created every time a merge to the default branch is triggered, and also generates a CHANGELOG.md file from the conventional commit messages.\n\nAdditional modules come from Azure, like the `naming` and `aks`.\n\n## [How-to](sec-how-to)\n\nAfter cloning this repository, if you want to take advantage of `pre-commit` execute the following commands:\n\n```bash\n# install pre-commit using pip\npip install pre-commit\n# install pre-commit hooks (move to the repository directory)\npre-commit install\npre-commit install --install-hooks -t commit-msg\n# run all checks manually\n# be sure to install all the dependencies:\n# terraform\n# TFlint\n# TFlint azureRM plugin\n# TFsec\n# checkov\n# terraform-docs\npre-commit run --all-files\n```\n\nRunning `pre-commit` will give you feedback in a \"shift-left\" approach, so you can find typos/errors, and check compliance, before applying your code or running any pipeline.\n\nYou can also run semantic-release locally, to check if the workflow is running as expected.\nExecute the following command after installing semantic-release:\n\n```bash\n# you need GITHUB_TOKEN environment variable set\n# more info here: https://github.com/semantic-release/github\nnpx semantic-release --dry-run --ci\n```\n\nThe code assumes you have Terraform environment variables for the AzureRM provider. You will need to set the following variables:\n\n```bash\nexport ARM_CLIENT_ID=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\nexport ARM_CLIENT_SECRET=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\nexport ARM_TENANT_ID=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\nexport ARM_SUBSCRIPTION_ID=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"\n```\n\nSince everything else uses the HCP Terraform API integration, you just need to edit the code, create a pull request, and a plan will be uploaded to HCP.\nBe sure to check [HCP integration](sec-hcp-integration) section and follow the procedure for your own environment.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | ~\u003e 1.9.0 |\n| \u003ca name=\"requirement_azurerm\"\u003e\u003c/a\u003e [azurerm](#requirement\\_azurerm) | \u003e= 3.106.1, \u003c 4.0 |\n| \u003ca name=\"requirement_random\"\u003e\u003c/a\u003e [random](#requirement\\_random) | 3.3.2 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_random\"\u003e\u003c/a\u003e [random](#provider\\_random) | 3.3.2 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_aks\"\u003e\u003c/a\u003e [aks](#module\\_aks) | Azure/aks/azurerm | 9.1.0 |\n| \u003ca name=\"module_naming\"\u003e\u003c/a\u003e [naming](#module\\_naming) | Azure/naming/azurerm | 0.4.1 |\n| \u003ca name=\"module_rg\"\u003e\u003c/a\u003e [rg](#module\\_rg) | bcochofel/resource-group/azurerm | 1.6.0 |\n| \u003ca name=\"module_snet\"\u003e\u003c/a\u003e [snet](#module\\_snet) | bcochofel/subnet/azurerm | 1.4.0 |\n| \u003ca name=\"module_vnet\"\u003e\u003c/a\u003e [vnet](#module\\_vnet) | bcochofel/virtual-network/azurerm | 1.3.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [random_id.name](https://registry.terraform.io/providers/hashicorp/random/3.3.2/docs/resources/id) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | Environment for Azure naming convention. | `string` | `\"sandbox\"` | no |\n| \u003ca name=\"input_location\"\u003e\u003c/a\u003e [location](#input\\_location) | Azure Region to create resource. | `string` | `\"northeurope\"` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | A mapping of tags which should be assigned to Resources. | `map(string)` | \u003cpre\u003e{\u003cbr\u003e  \"ManagedBy\": \"Terraform\"\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_workload\"\u003e\u003c/a\u003e [workload](#input\\_workload) | Workload for Azure naming convention. | `string` | `\"demo\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_resource_group_name\"\u003e\u003c/a\u003e [resource\\_group\\_name](#output\\_resource\\_group\\_name) | n/a |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## [References](sec-references)\n\n- [semantic versioning](https://semver.org/)\n- [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)\n- [keep a changelog](https://keepachangelog.com/en/1.1.0/)\n- [pre-commit](https://pre-commit.com/)\n- [semantic-release](https://semantic-release.gitbook.io/semantic-release)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcochofel%2Fcstudy-infrastructure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcochofel%2Fcstudy-infrastructure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcochofel%2Fcstudy-infrastructure/lists"}