{"id":20901582,"url":"https://github.com/willfarrell/terraform-defaults-module","last_synced_at":"2026-01-30T16:02:25.797Z","repository":{"id":142528795,"uuid":"192236105","full_name":"willfarrell/terraform-defaults-module","owner":"willfarrell","description":"Sanitize and group common vars","archived":false,"fork":false,"pushed_at":"2019-11-30T15:53:11.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T02:45:52.681Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willfarrell.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":"2019-06-16T20:55:47.000Z","updated_at":"2019-11-30T15:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"03a9e786-190b-4a1e-9229-9e24bf849fc6","html_url":"https://github.com/willfarrell/terraform-defaults-module","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/willfarrell/terraform-defaults-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Fterraform-defaults-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Fterraform-defaults-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Fterraform-defaults-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Fterraform-defaults-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willfarrell","download_url":"https://codeload.github.com/willfarrell/terraform-defaults-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willfarrell%2Fterraform-defaults-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: 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-11-18T11:36:06.403Z","updated_at":"2026-01-30T16:02:25.750Z","avatar_url":"https://github.com/willfarrell.png","language":"HCL","readme":"# defaults\nCollection of module defaults\n\n## Input\n- **name:** name of application\n- **tags:** module default tags\n\n## Output\n- **account_id:** Current Account ID\n- **region:** Current AWS Region\n- **name:** Sanitized `name`\n- **name_alphanumeric:** Sanitized `name` that is only `[a-zA-Z0-9]` (ie for AWS WAF)\n- **tags:** tags merged with defaults\n\n## Use\n```hcl-terraform\nvariable \"default_tags\" {\n  type = \"map\"\n  default = {}\n}\n\nmodule \"defaults\" {\n  source = \"../defaults\"\n  name = \"${var.name}\"\n  tags = \"${var.default_tags}\"\n}\n\nlocals {\n  account_id   = \"${module.defaults.account_id}\"\n  region   = \"${module.defaults.region}\"\n  name         = \"${module.defaults.name}\"\n  tags         = \"${module.defaults.tags}\"\n}\n\nresource \"****\" \"main\" {\n  ...\n  tags = \"${merge(local.tags, map(\n    \"Name\", \"${local.name}-****\",\n    \"Description\", \"Does x\"\n  ))}\"\n}\n\n```\n\n### Error: ... tags: should be a list\n```hcl-terraform\nresource \"aws_autoscaling_group\" \"ec2\" {\n  ...\n  dynamic \"tag\" {\n    for_each = local.tags\n    content {\n      key = tag.key\n      value = tag.value\n\n      propagate_at_launch = true\n    }\n  }\n}\n\n```\n\n## Refs\n- https://github.com/jonbrouse/terraform-style-guide/blob/master/README.md#naming-conventions\n- https://github.com/cloudposse/terraform-null-label\n\n## TODO\n- [ ] Add in Cost Center tags\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfarrell%2Fterraform-defaults-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillfarrell%2Fterraform-defaults-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfarrell%2Fterraform-defaults-module/lists"}