{"id":22284445,"url":"https://github.com/ehigham/terra-workspace-metrics","last_synced_at":"2025-09-02T18:39:32.895Z","repository":{"id":82916389,"uuid":"569875018","full_name":"ehigham/terra-workspace-metrics","owner":"ehigham","description":"Print Google Cloud Storage metrics for buckets associated with Terra workspaces.","archived":false,"fork":false,"pushed_at":"2022-11-29T15:49:14.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T17:44:35.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehigham.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-23T20:18:42.000Z","updated_at":"2022-11-23T20:21:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6b03475-1555-4784-8ad8-92b356e4fc57","html_url":"https://github.com/ehigham/terra-workspace-metrics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehigham%2Fterra-workspace-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehigham%2Fterra-workspace-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehigham%2Fterra-workspace-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehigham%2Fterra-workspace-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehigham","download_url":"https://codeload.github.com/ehigham/terra-workspace-metrics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245535513,"owners_count":20631297,"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","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-12-03T16:45:12.946Z","updated_at":"2025-03-25T20:17:57.296Z","avatar_url":"https://github.com/ehigham.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terra-bucket-metrics\nPrint Google Cloud Storage metrics for buckets associated with Terra workspaces.\n\nThe following metrics are supported:\n- storage.googleapis.com/storage/object_count\n- storage.googleapis.com/storage/total_bytes\n\n# Quick Start\nIf you're new to Haskell, don't worry - it's a glorious world where we humbly\noffer programs to our glorious leader, Simon Peyton Jones. You are most welcome.\n\n## Requirements\n- [stack](https://docs.haskellstack.org/en/stable/), A Haskell build tool\n- An installation of an implementation of the C mysqlclient API, like [mariadb](https://mariadb.org/)\n\n## Getting Stack\nThe simplest way to start off building and using Haskell programs with\nstack (avoiding questionable decisions some linux distributions make about\npackaging haskell libraries) is to install [ghcup](https://www.haskell.org/ghcup/)\nand follow the instructions to install the recommended stack and cabal binaries.\n\n## Building\nAfter you've cloned this repository and installed `stack`, `cd` into\n`terra-bucket-metrics` and run\n```\n$ stack build\n```\n\nThis will install a compatible version of GHC (the Glasgow Haskell Compiler),\nfetch and build dependencies and then compile the program. Optionally, you can\nrun `stack install` afterwards to install the binary to your local bin path\n(see output of `stack path --local-bin`).\n\n## Usage\nSee output of\n```\n$ terra-workspace-metrics --help\n```\n\nNote:\n- You need to define the `VAULT_ADDR` environment variable in the form\n`https://hostname:port` and have a valid vault token at `$HOME/.vault-token`.\n- When scrutinising all workspaces in a particluar environment (via `--all`),\nyou should use service account credentials instead of your own. `curl` down\nthese service account credentials and run the program this way:\n\n```\n$ GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json terra-workspace-metrics -e ENVIRONMENT --all\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehigham%2Fterra-workspace-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehigham%2Fterra-workspace-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehigham%2Fterra-workspace-metrics/lists"}