{"id":18995582,"url":"https://github.com/turbot/flowpipe-mod-azure-thrifty","last_synced_at":"2026-01-28T09:37:32.671Z","repository":{"id":249995853,"uuid":"800416782","full_name":"turbot/flowpipe-mod-azure-thrifty","owner":"turbot","description":"Run pipelines to detect and correct Azure resources that are unused and underutilized to optimize costs. ","archived":false,"fork":false,"pushed_at":"2024-11-28T07:31:37.000Z","size":218,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-06T06:43:31.889Z","etag":null,"topics":["azure","cost","cost-optimization","flowpipe","flowpipe-mod","hacktoberfest","hcl","low-code"],"latest_commit_sha":null,"homepage":"https://hub.flowpipe.io/mods/turbot/azure_thrifty","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/turbot.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,"zenodo":null}},"created_at":"2024-05-14T09:43:41.000Z","updated_at":"2024-11-28T07:31:15.000Z","dependencies_parsed_at":"2024-11-28T08:36:56.331Z","dependency_job_id":null,"html_url":"https://github.com/turbot/flowpipe-mod-azure-thrifty","commit_stats":null,"previous_names":["turbot/flowpipe-mod-azure-thrifty"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/turbot/flowpipe-mod-azure-thrifty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turbot%2Fflowpipe-mod-azure-thrifty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turbot%2Fflowpipe-mod-azure-thrifty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turbot%2Fflowpipe-mod-azure-thrifty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turbot%2Fflowpipe-mod-azure-thrifty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turbot","download_url":"https://codeload.github.com/turbot/flowpipe-mod-azure-thrifty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turbot%2Fflowpipe-mod-azure-thrifty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28843957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["azure","cost","cost-optimization","flowpipe","flowpipe-mod","hacktoberfest","hcl","low-code"],"created_at":"2024-11-08T17:31:48.002Z","updated_at":"2026-01-28T09:37:32.653Z","avatar_url":"https://github.com/turbot.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Thrifty Mod for Flowpipe\n\nPipelines to detect and correct misconfigurations leading to Azure savings opportunities.\n\n## Documentation\n\n- **[Pipelines →](https://hub.flowpipe.io/mods/turbot/azure_thrifty/pipelines)**\n\n## Getting Started\n\n### Requirements\n\nDocker daemon must be installed and running. Please see [Install Docker Engine](https://docs.docker.com/engine/install/) for more information.\n\n### Installation\n\nDownload and install Flowpipe (https://flowpipe.io/downloads) and Steampipe (https://steampipe.io/downloads). Or use Brew:\n\n```sh\nbrew install turbot/tap/flowpipe\nbrew install turbot/tap/steampipe\n```\n\nInstall the Azure plugin with [Steampipe](https://steampipe.io):\n\n```sh\nsteampipe plugin install azure\n```\n\nSteampipe will automatically use your default Azure credentials. Optionally, you can [setup multiple subscriptions](https://hub.steampipe.io/plugins/turbot/azure#multi-subscription-connections) or [customize Azure credentials](https://hub.steampipe.io/plugins/turbot/azure#configuring-azure-credentials).\n\nCreate a `connection_import` resource to import your Steampipe azure connections:\n\n```sh\nvi ~/.flowpipe/config/azure.fpc\n```\n\n```hcl\nconnection_import \"azure\" {\n  source      = \"~/.steampipe/config/azure.spc\"\n  connections = [\"*\"]\n}\n```\n\nFor more information on importing connections, please see [Connection Import](https://flowpipe.io/docs/reference/config-files/connection_import).\n\nFor more information on connections in Flowpipe, please see [Managing Connections](https://flowpipe.io/docs/run/connections).\n\nInstall the mod:\n\n```sh\nmkdir azure-thrifty\ncd azure-thrifty\nflowpipe mod install github.com/turbot/flowpipe-mod-azure-thrifty\n```\n\n### Configure Variables\n\nSeveral pipelines have [input variables](https://flowpipe.io/docs/build/mod-variables#input-variables) that can be configured to better match your environment and requirements.\n\nEach variable has a default defined in its source file, e.g, `monitor/monitor_log_profile_without_retention_policy.fp` (or `variables.fp` for more generic variables), but these can be overwritten in several ways:\n\nThe easiest approach is to setup your vars file, starting with the sample:\n\n```sh\ncp flowpipe.fpvars.example flowpipe.fpvars\nvi flowpipe.fpvars\n\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age --var-file=flowpipe.fpvars\n```\n\nAlternatively, you can pass variables on the command line:\n\n```sh\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age --var=compute_snapshots_exceeding_max_age_days=10\n```\n\nOr through environment variables:\n\n```sh\nexport FP_VAR_compute_snapshots_exceeding_max_age_days=10\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age\n```\n\nFor more information, please see [Passing Input Variables](https://flowpipe.io/docs/build/mod-variables#passing-input-variables)\n\n### Running Detect and Correct Pipelines\n\nTo run your first detection, you'll need to ensure your Steampipe server is up and running:\n\n```sh\nsteampipe service start\n```\n\nTo find your desired detection, you can filter the `pipeline list` output:\n\n```sh\nflowpipe pipeline list | grep \"detect_and_correct\"\n```\n\nThen run your chosen pipeline:\n\n```sh\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age\n```\n\nThis will then run the pipeline and depending on your configured running mode; perform the relevant action(s), there are 3 running modes:\n- Wizard\n- Notify\n- Automatic\n\n#### Wizard\nThis is the `default` running mode, allowing for a hands-on approach to approving changes to resources by prompting for [input](https://flowpipe.io/docs/build/input) for each detected resource.\n\nWhilst the out of the box default is to run the workflow directly in the terminal. You can use Flowpipe [server](https://flowpipe.io/docs/run/server) and [external integrations](https://flowpipe.io/docs/build/input#create-an-integration) to prompt in `http`, `slack`, `teams`, etc.\n\n#### Notify\nThis mode as the name implies is used purely to report detections via notifications either directly to your terminal when running in client mode or via another configured [notifier](https://flowpipe.io/docs/reference/config-files/notifier) when running in server mode for each detected resource.\n\nTo run in `notify` mode, you will need to set the `approvers` variable to an empty list `[]` and ensure the resource-specific `default_action` variable is set to `notify`, either in your fpvars file\n\n```hcl\n# example.fpvars\napprovers = []\ncompute_snapshots_exceeding_max_age_default_action = \"notify\"\n```\n\nor pass the `approvers` and `default_action` arguments on the command-line.\n\n```sh\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age --arg='default_action=notify' --arg='approvers=[]'\n```\n\n#### Automatic\nThis behavior allows for a hands-off approach to remediating resources.\n\nTo run in `automatic` mode, you will need to set the `approvers` variable to an empty list `[]` and the the resource-specific `default_action` variable to one of the available options.\n\n```hcl\n# example.fpvars\napprovers = []\ncompute_snapshots_exceeding_max_age_default_action = \"delete_snapshot\"\n```\n\nor pass the `approvers` and `default_action` argument on the command-line.\n\n```sh\nflowpipe pipeline run azure_thrifty.pipeline.detect_and_correct_compute_snapshots_exceeding_max_age --arg='approvers=[] --arg='default_action=delete_snapshot'\n```\n\nTo further enhance this approach, you can enable the pipelines corresponding [query trigger](#running-query-triggers) to run completely hands-off.\n\n### Running Query Triggers\n\n\u003e Note: Query triggers require Flowpipe running in [server](https://flowpipe.io/docs/run/server) mode.\n\nEach `detect_and_correct` pipeline comes with a corresponding [Query Trigger](https://flowpipe.io/docs/flowpipe-hcl/trigger/query), these are _disabled_ by default allowing for you to _enable_ and _schedule_ them as desired.\n\nLet's begin by looking at how to set-up a Query Trigger to automatically resolve our Compute snapshots that have exceeded their useful lifespan.\n\nFirsty, we need to update our `example.fpvars` file to add or update the following variables - if we want to run our remediation `hourly` and automatically `apply` the corrections:\n\n```hcl\n# example.fpvars\ncompute_snapshots_exceeding_max_age_trigger_enabled  = true\ncompute_snapshots_exceeding_max_age_trigger_schedule = \"1h\"\ncompute_snapshots_exceeding_max_age_default_action   = \"delete_snapshot\"\n```\n\nNow we'll need to start up our Flowpipe server:\n\n```sh\nflowpipe server --var-file=example.fpvars\n```\n\nThis will activate every hour and detect Compute Snapshots exceeding maximum age and apply the corrections without further interaction!\n\n## Open Source \u0026 Contributing\n\nThis repository is published under the [Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0). Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!\n\n[Flowpipe](https://flowpipe.io) and [Steampipe](https://steampipe.io) are products produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). They are distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).\n\n## Get Involved\n\n**[Join #flowpipe on Slack →](https://turbot.com/community/join)**\n\nWant to help but don't know where to start? Pick up one of the `help wanted` issues:\n\n- [Flowpipe](https://github.com/turbot/flowpipe/labels/help%20wanted)\n- [Azure Thrifty Mod](https://github.com/turbot/flowpipe-mod-azure-thrifty/labels/help%20wanted)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbot%2Fflowpipe-mod-azure-thrifty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturbot%2Fflowpipe-mod-azure-thrifty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturbot%2Fflowpipe-mod-azure-thrifty/lists"}