{"id":17519865,"url":"https://github.com/dsb-norge/terraform-helpers","last_synced_at":"2026-05-04T20:37:18.025Z","repository":{"id":257985410,"uuid":"872955019","full_name":"dsb-norge/terraform-helpers","owner":"dsb-norge","description":"Collection of helper scripts for terraform projects","archived":false,"fork":false,"pushed_at":"2026-05-04T07:46:51.000Z","size":869,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-04T09:43:23.616Z","etag":null,"topics":["bash","shell-scripts","terraform"],"latest_commit_sha":null,"homepage":"https://www.dsb.no","language":"Shell","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/dsb-norge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-15T11:11:27.000Z","updated_at":"2026-05-04T07:46:57.000Z","dependencies_parsed_at":"2024-10-21T00:58:41.339Z","dependency_job_id":"9439fda0-74c4-4614-af7b-38ec67f42127","html_url":"https://github.com/dsb-norge/terraform-helpers","commit_stats":null,"previous_names":["dsb-norge/terraform-helpers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dsb-norge/terraform-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsb-norge%2Fterraform-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsb-norge%2Fterraform-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsb-norge%2Fterraform-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsb-norge%2Fterraform-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsb-norge","download_url":"https://codeload.github.com/dsb-norge/terraform-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsb-norge%2Fterraform-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32624463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"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":["bash","shell-scripts","terraform"],"created_at":"2024-10-20T10:07:15.546Z","updated_at":"2026-05-04T20:37:18.020Z","avatar_url":"https://github.com/dsb-norge.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-helpers\n\nCollection of helper scripts for Terraform projects and module repos.\n\n## `dsb-tf-proj-helpers.sh`\n\n### Overview\n\n`dsb-tf-proj-helpers.sh` is a collection of helper functions designed to streamline and automate various tasks in Terraform projects and module repositories. The script provides 79 user-facing commands and automatically detects whether it's running in a project repo or a module repo, adapting its behavior accordingly.\n\nFeatures include:\n- **Project repos**: Environment management, terraform init/validate/plan/apply, version bumping, linting, Azure CLI integration\n- **Module repos**: Init/validate/lint at root and per-example, terraform test support (unit and integration), documentation generation, version bumping\n- Built-in help system (`tf-help`)\n- Tab completion for all commands\n- Structured error diagnostics\n\n### How to use\n\n```bash\n# Load authenticated with GitHub CLI\nsource \u003c(gh api -H \"Accept: application/vnd.github.v3.raw\" /repos/dsb-norge/terraform-helpers/contents/dsb-tf-proj-helpers.sh) ;\n\n# Load from public endpoint with curl\n#   note: has the potential of the user being rate limited by GitHub\nsource \u003c(curl -s https://raw.githubusercontent.com/dsb-norge/terraform-helpers/main/dsb-tf-proj-helpers.sh) ;\n\n# Invoke the help function\ntf-help\n\n# Or start with the status function, this checks some prerequisites\ntf-status\n```\n\n#### Note for AI agents\n\nSome AI agents may have trouble with the `source \u003c(...)` pattern because they are prevented from executing commands with process substitution. If you encounter issues with this, use this workaround to load the script:\n\n```bash\n# Load authenticated with GitHub CLI, workaround for AI agents\neval \"$(gh api -H 'Accept: application/vnd.github.v3.raw' /repos/dsb-norge/terraform-helpers/contents/dsb-tf-proj-helpers.sh)\"\n\n# Load from public endpoint with curl, workaround for AI agents\neval \"$(curl -s https://raw.githubusercontent.com/dsb-norge/terraform-helpers/main/dsb-tf-proj-helpers.sh)\"\n```\n\n### Supported repo types\n\nThe script detects the repo type automatically:\n\n- **Project repo** (has `main/` and `envs/` directories): Full functionality -- environment management, terraform operations, Azure subscription management, version bumping\n- **Module repo** (has root `.tf` files, no `main/` or `envs/`): Module-specific commands -- init/validate/lint at root and per-example, terraform testing, documentation generation, version bumping\n\nRun `tf-help` after loading to see commands available for your repo type.\n\n### Develop\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the developer guide, [ARCHITECTURE.md](ARCHITECTURE.md) for the design reference, and [TESTING.md](TESTING.md) for how to run and write tests.\n\n#### Logging\n\nLogging throughout the functions is controlled by the following variables:\n\n- `_dsbTfLogInfo` : 1 to log info, 0 to mute\n- `_dsbTfLogWarnings` : 1 to log warnings, 0 to mute\n- `_dsbTfLogErrors` : 1 to log errors, 0 to mute\n    note: `_dsb_internal_error()` ignores this setting\n\n##### Debug logging\n\nOff by default. Controlled from the command line:\n\n- Enable: `_dsb_tf_debug_enable_debug_logging`\n- Disable: `_dsb_tf_debug_disable_debug_logging`\n\n#### Call graphs\n\nTo visualize function call chains, call graphs can be generated:\n\n- Install callGraph and dependencies: `_dsb_tf_debug_install_call_graph_and_deps_ubuntu`\n- Generate call graphs:\n  - For all exposed functions: `_dsb_tf_debug_generate_call_graphs`\n  - For a single internal function: `_dsb_tf_debug_generate_call_graphs '_dsb_tf_enumerate_directories'`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsb-norge%2Fterraform-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsb-norge%2Fterraform-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsb-norge%2Fterraform-helpers/lists"}