{"id":13707247,"url":"https://github.com/recognizegroup/terraform","last_synced_at":"2026-03-06T11:09:15.878Z","repository":{"id":36961239,"uuid":"296009047","full_name":"recognizegroup/terraform","owner":"recognizegroup","description":"Public Terraform module repository.","archived":false,"fork":false,"pushed_at":"2026-03-05T19:09:37.000Z","size":1318,"stargazers_count":35,"open_issues_count":4,"forks_count":7,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2026-03-05T22:21:09.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/recognizegroup.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-09-16T11:13:02.000Z","updated_at":"2026-02-13T09:02:25.000Z","dependencies_parsed_at":"2024-06-24T08:29:23.057Z","dependency_job_id":"0b95b988-693c-434b-ba55-275375cc5b3a","html_url":"https://github.com/recognizegroup/terraform","commit_stats":null,"previous_names":[],"tags_count":450,"template":false,"template_full_name":null,"purl":"pkg:github/recognizegroup/terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recognizegroup%2Fterraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recognizegroup%2Fterraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recognizegroup%2Fterraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recognizegroup%2Fterraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/recognizegroup","download_url":"https://codeload.github.com/recognizegroup/terraform/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/recognizegroup%2Fterraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"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":"2024-08-02T22:01:25.301Z","updated_at":"2026-03-06T11:09:15.852Z","avatar_url":"https://github.com/recognizegroup.png","language":"HCL","funding_links":[],"categories":["HCL"],"sub_categories":[],"readme":"# Terraform\n\nThis repository contains terraform modules which can be used in combination with [Terragrunt](https://terragrunt.gruntwork.io/). Terragrunt allows you to keep your Terraform backend configuration DRY (“Don’t Repeat Yourself”) by defining versioned modules once and reusing those modules inside terragrunt configuration files.\n\n## Getting started\n\n1. Create a `terragrunt.hcl` file:\n\n```terraform\n# Use Terragrunt to download the module code\nterraform {\n  source = \"github.com/recognizegroup/terraform.git//path/to/module?ref=v3\"\n}\n\n# Fill in the variables for that module\ninputs = {\n  foo = \"bar\"\n  zot = 3\n}\n```\n\n2. Make sure the source points to the correct module (i.e. path) and version (i.e. tag).\n3. Assign all the exposed variables as input.\n4. Run `terragrunt apply` to deploy the resource.\n\n## Dependency management\n\nSometimes you happen to have dependencies between modules, but you don't want to put the configuration for multiple modules in one `terragrunt.hcl` file. On the other hand, you also don't want to declare variables twice. Luckily, dependency management is very simple in Terragrunt ([documentation](https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#dependency)). For example, an Azure event hub may need a storage account and container to write events to. In this case you specify the storage configuration as a dependency of the event hub configuration:\n\n```terraform\n# ...\n\ndependency \"storage\" {\n  config_path = \"../storage\"\n}\n\ninputs = {\n  storage_account_name   = dependency.storage.outputs.storage_account_name\n  storage_container_name = dependency.storage.outputs.storage_container_name\n  event_hub_name         = \"my-event-hub\"\n  # ...\n}\n```\n\n## Authenticating to Azure\n\nThis repository mainly contains Terraform modules using the [Azure Provider](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs). Terraform supports ways to authenticate to Azure. When working locally, it is recommended that you use the Azure cli to login with your user account.\n\n```bash\naz login [--tenant \u003cid\u003e]\naz account set --subscription \u003cname or id\u003e\n```\n\nWhen automating deployments with a CI/CD pipeline, it is recommended that you use credentials from a service principal. When set as environment variables in your pipeline, Terraform will known how to authenticate to Azure.\n\n```bash\nexport ARM_CLIENT_ID=\"00000000-0000-0000-0000-000000000000\"\nexport ARM_CLIENT_SECRET=\"00000000-0000-0000-0000-000000000000\"\nexport ARM_SUBSCRIPTION_ID=\"00000000-0000-0000-000M0-000000000000\"\nexport ARM_TENANT_ID=\"00000000-0000-0000-0000-000000000000\"\n```\n\n## Creating remote backend\n\nOne of the great benefits of using Terragrunt, is that it will keep your remote state DRY. Terragrunt allows you to use variables, conditions and expressions when defining backends. This means you only have to specify your backend configuration once. Within Azure, storage containers are the place where remote state is stored. The following snippet allows you to rapidly setup backend storage containers for every environment in your project.\n\n#### Linux/macOS\n\n```bash\nexport SUBSCRIPTION_ID=\"00000000-0000-0000-0000-000000000000\"\nexport RESOURCE_GROUP_NAME=\"xxxxx\"\nexport STORAGE_ACCOUNT_NAME=\"xxxxx\"\nexport CONTAINER_NAME=\"tfstate\"\nexport LOCATION=\"westeurope\"\n\naz account set --subscription $SUBSCRIPTION_ID\n\n# Create resource group\naz group create \\\n  --subscription $SUBSCRIPTION_ID \\\n  --name $RESOURCE_GROUP_NAME \\\n  --location $LOCATION \\\n  --tags 'CostCenter=XXXX' 'Environment=XXXX' 'Workload=XXXX'\n\n# Create storage account\naz storage account create \\\n  --subscription $SUBSCRIPTION_ID \\\n  --name $STORAGE_ACCOUNT_NAME \\\n  --resource-group $RESOURCE_GROUP_NAME \\\n  --location $LOCATION \\\n  --sku Standard_GRS \\\n  --encryption-services blob \\\n  --https-only true \\\n  --allow-blob-public-access false\n\n# Get storage account key\nACCOUNT_KEY=$(az storage account keys list \\\n  --subscription $SUBSCRIPTION_ID \\\n  --resource-group $RESOURCE_GROUP_NAME \\\n  --account-name $STORAGE_ACCOUNT_NAME \\\n  --query '[0].value' -o tsv)\n\n# Create blob container\naz storage container create \\\n  --subscription $SUBSCRIPTION_ID \\\n  --name $CONTAINER_NAME \\\n  --account-name $STORAGE_ACCOUNT_NAME \\\n  --account-key $ACCOUNT_KEY\n\n# Lock storage account\naz lock create \\\n  --name CanNotDelete \\\n  --lock-type CanNotDelete \\\n  --resource-group $RESOURCE_GROUP_NAME \\\n  --resource-name $STORAGE_ACCOUNT_NAME \\\n  --resource-type Microsoft.Storage/storageAccounts\n```\n\n#### Windows Powershell\n\n```ps1\n$env:SUBSCRIPTION_ID=\"00000000-0000-0000-0000-000000000000\"\n$env:RESOURCE_GROUP_NAME=\"xxxxx\"\n$env:STORAGE_ACCOUNT_NAME=\"xxxxx\"\n$env:CONTAINER_NAME=\"tfstate\"\n$env:LOCATION=\"westeurope\"\n\naz group create `\n  --subscription $env:SUBSCRIPTION_ID `\n  --name $env:RESOURCE_GROUP_NAME `\n  --location $env:LOCATION `\n  --tags 'CostCenter=XXXX' 'Environment=XXXX' 'Workload=XXXX'\n\naz storage account create `\n  --subscription $env:SUBSCRIPTION_ID `\n  --name $env:STORAGE_ACCOUNT_NAME `\n  --resource-group $env:RESOURCE_GROUP_NAME `\n  --location $env:LOCATION `\n  --sku Standard_GRS `\n  --encryption-services blob `\n  --https-only true `\n  --allow-blob-public-access false\n\n$output = az storage account keys list `\n  --subscription $env:SUBSCRIPTION_ID `\n  --resource-group $env:RESOURCE_GROUP_NAME `\n  --account-name $env:STORAGE_ACCOUNT_NAME `\n  --query '[0].value' `\n  -o tsv\n\naz storage container create `\n  --subscription $env:SUBSCRIPTION_ID `\n  --name $env:CONTAINER_NAME `\n  --account-name $env:STORAGE_ACCOUNT_NAME `\n  --account-key $output\n\naz lock create `\n  --name CanNotDelete `\n  --lock-type CanNotDelete `\n  --resource-group $env:RESOURCE_GROUP_NAME `\n  --resource-name $env:STORAGE_ACCOUNT_NAME `\n  --resource-type Microsoft.Storage/storageAccounts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecognizegroup%2Fterraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frecognizegroup%2Fterraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frecognizegroup%2Fterraform/lists"}