{"id":18834477,"url":"https://github.com/fgouteroux/terraform-provider-mimir","last_synced_at":"2025-08-22T00:31:19.032Z","repository":{"id":59833889,"uuid":"531543481","full_name":"fgouteroux/terraform-provider-mimir","owner":"fgouteroux","description":"This terraform provider allows you to interact with grafana mimir.","archived":false,"fork":false,"pushed_at":"2024-11-23T08:05:33.000Z","size":267,"stargazers_count":27,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-10T22:41:18.252Z","etag":null,"topics":["grafana","grafana-mimir","prometheus","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/fgouteroux/mimir/latest/docs","language":"Go","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/fgouteroux.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":"2022-09-01T13:58:28.000Z","updated_at":"2024-11-23T08:05:37.000Z","dependencies_parsed_at":"2023-11-07T00:26:15.201Z","dependency_job_id":"392a64f1-d510-4f5b-bb35-fe79477a4003","html_url":"https://github.com/fgouteroux/terraform-provider-mimir","commit_stats":{"total_commits":87,"total_committers":7,"mean_commits":"12.428571428571429","dds":0.08045977011494254,"last_synced_commit":"73f279a8ae2799f5dc0b9bd01b6243b17844fbb9"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fterraform-provider-mimir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fterraform-provider-mimir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fterraform-provider-mimir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fterraform-provider-mimir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgouteroux","download_url":"https://codeload.github.com/fgouteroux/terraform-provider-mimir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542288,"owners_count":18242332,"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":["grafana","grafana-mimir","prometheus","terraform","terraform-provider"],"created_at":"2024-11-08T02:12:36.361Z","updated_at":"2024-12-20T06:06:38.049Z","avatar_url":"https://github.com/fgouteroux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform provider for grafana mimir\n\nThis terraform provider allows you to interact with grafana mimir.\n\nCurrently only these components could be managed with the api:\n  - [alertmanager](https://grafana.com/docs/mimir/latest/references/architecture/components/alertmanager/)\n  - [ruler](https://grafana.com/docs/mimir/latest/references/architecture/components/ruler/)\n\n\nSee [Mimir API Reference](https://grafana.com/docs/mimir/latest/references/http-api/)\n\n## Provider `mimir`\n\nExample:\n\n```\nprovider \"mimir\" {\n  ruler_uri = \"http://localhost:8080/prometheus\"\n  alertmanager_uri = \"http://localhost:8080\"\n  org_id = \"mytenant\"\n}\n```\n\n### URI path\n\n- ruler_uri (default prefix: /prometheus)\n- alertmanager_uri (default prefix: /)\n\n\u003e **Warning**\n\u003e You may check and adapt provider uri path: `ruler_uri` and `alertmanager_uri`.\n\n\n### Authentication\n\nGrafana Mimir have no authentication support, so this is delegated to a reverse proxy.\n\nSee [Grafana Mimir authentication and authorization](https://grafana.com/docs/mimir/v2.7.x/operators-guide/securing/authentication-and-authorization/)\n\nThe provider support basic auth, token.\n\n#### Basic auth\n\n```\nprovider \"mimir\" {\n  ruler_uri = \"http://localhost:8080/prometheus\"\n  alertmanager_uri = \"http://localhost:8080\"\n  org_id = \"mytenant\"\n  username = \"user\"\n  password = \"password\"\n}\n```\n\n#### Token\n\n```\nprovider \"mimir\" {\n  ruler_uri = \"http://localhost:8080/prometheus\"\n  alertmanager_uri = \"http://localhost:8080\"\n  org_id = \"mytenant\"\n  token = \"supersecrettoken\"\n}\n```\n\n### Headers\n\n```\nprovider \"mimir\" {\n  ruler_uri = \"http://localhost:8080/prometheus\"\n  alertmanager_uri = \"http://localhost:8080\"\n  org_id = \"mytenant\"\n  header = {\n    \"Custom-Auth\" = \"Custom value\"\n  }\n}\n```\n\n## Resource `mimir_rule_group_alerting`\n\nExample:\n\n```\nresource \"mimir_rule_group_alerting\" \"test\" {\n  name      = \"test1\"\n  namespace = \"namespace1\"\n  rule {\n    alert       = \"HighRequestLatency\"\n    expr        = \"job:request_latency_seconds:mean5m{job=\\\"myjob\\\"} \u003e 0.5\"\n    for         = \"10m\"\n    labels      = {\n      severity = \"warning\"\n    }\n    annotations = {\n      summary = \"High request latency\"\n    }\n  }\n}\n```\n\n## Resource `mimir_rule_group_recording`\n\nExample:\n\n```\nresource \"mimir_rule_group_recording\" \"record\" {\n  name         = \"test1\"\n  namespace    = \"namespace1\"\n  interval     = \"6h\"\n  query_offset = \"5m\"\n  rule {\n    expr   = \"sum by (job) (http_inprogress_requests)\"\n    record = \"job:http_inprogress_requests:sum\"\n  }\n}\n```\n\n## Resource `mimir_alertmanager_config`\n\nNotification integrations Supported: https://prometheus.io/docs/alerting/latest/configuration/#receiver\n\nExample:\n\n```\nresource \"mimir_alertmanager_config\" \"test\" {\n\n  route {\n    group_by = [\"...\"]\n    group_wait = \"30s\"\n    group_interval = \"5m\"\n    repeat_interval = \"1h\"\n    receiver = \"pagerduty\"\n    child_route {\n      group_by = [\"...\"]\n      group_wait = \"30s\"\n      group_interval = \"5m\"\n      repeat_interval = \"1h\"\n      receiver = \"pagerduty\"\n    }\n  }\n\n  receiver {\n    name = \"pagerduty\"\n    pagerduty_configs {\n      routing_key = \"secret\"\n      severity = \"info\"\n      details = {\n        environment = \"test\"\n        platform = \"sandbox\"\n      }\n    }\n  }\n}\n```\n\n## Importing existing resources\nThis provider supports importing existing resources into the terraform state. Import is done according to the various provider/resource configuation settings to contact the API server and obtain data.\n\n### mimir alerting rule group\n\nTo import mimir rule group alerting\nThe id is build as `\u003cnamespace\u003e/\u003cname\u003e`\n\nExample:\n\n```\nterraform import 'mimir_rule_group_alerting.alert1' namespace1/alert1\nmimir_rule_group_alerting.alert1: Importing from ID \"namespace1/alert1\"...\nmimir_rule_group_alerting.alert1: Import prepared!\n  Prepared mimir_rule_group_alerting for import\nmimir_rule_group_alerting.alert1: Refreshing state... [id=namespace1/alert1]\n\nImport successful!\n\nThe resources that were imported are shown above. These resources are now in\nyour Terraform state and will henceforth be managed by Terraform.\n\n```\n\n### mimir recording rule group\n\nTo import mimir rule group recording\nThe id is build as `\u003cnamespace\u003e/\u003cname\u003e`\n\nExample:\n\n```\nterraform import 'mimir_rule_group_recording.record1' namespace1/record1\nmimir_rule_group_recording.record1: Importing from ID \"namespace1/record1\"...\nmimir_rule_group_recording.record1: Import prepared!\n  Prepared mimir_rule_group_recording for import\nmimir_rule_group_recording.record1: Refreshing state... [id=namespace1/record1]\n\nImport successful!\n\nThe resources that were imported are shown above. These resources are now in\nyour Terraform state and will henceforth be managed by Terraform.\n\n```\n\n### mimir alertmanager config\n\nTo import mimir alertmanager config\nThe id is build as `\u003corg_id\u003e`\n\nExample:\n\n```\nterraform import 'mimir_alertmanager_config.test' test\nmimir_alertmanager_config.test: Importing from ID \"test\"...\nmimir_alertmanager_config.test: Import prepared!\n  Prepared mimir_alertmanager_config for import\nmimir_alertmanager_config.test: Refreshing state... [id=test]\n\nImport successful!\n\nThe resources that were imported are shown above. These resources are now in\nyour Terraform state and will henceforth be managed by Terraform.\n\n```\n\n## Contributing\nPull requests are always welcome! Please be sure the following things are taken care of with your pull request:\n* `go fmt` is run before pushing\n* Be sure to add a test case for new functionality (or explain why this cannot be done)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgouteroux%2Fterraform-provider-mimir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgouteroux%2Fterraform-provider-mimir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgouteroux%2Fterraform-provider-mimir/lists"}