{"id":18707010,"url":"https://github.com/terraform-google-modules/terraform-google-slo","last_synced_at":"2025-11-09T08:30:33.000Z","repository":{"id":37681855,"uuid":"206201943","full_name":"terraform-google-modules/terraform-google-slo","owner":"terraform-google-modules","description":"Creates SLOs on Google Cloud from custom Stackdriver metrics capability to export SLOs to Google Cloud services and other systems","archived":false,"fork":false,"pushed_at":"2025-01-27T19:26:03.000Z","size":1674,"stargazers_count":63,"open_issues_count":9,"forks_count":28,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-01-27T20:31:58.789Z","etag":null,"topics":["cft-terraform","operations"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/terraform-google-modules/slo/google","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/terraform-google-modules.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-04T01:15:09.000Z","updated_at":"2025-01-04T01:18:45.000Z","dependencies_parsed_at":"2023-10-05T04:16:59.666Z","dependency_job_id":"5f3ea500-5421-4e59-9533-bc4d32835bcb","html_url":"https://github.com/terraform-google-modules/terraform-google-slo","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-slo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-slo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-slo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terraform-google-modules%2Fterraform-google-slo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terraform-google-modules","download_url":"https://codeload.github.com/terraform-google-modules/terraform-google-slo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239571542,"owners_count":19661164,"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":["cft-terraform","operations"],"created_at":"2024-11-07T12:16:24.560Z","updated_at":"2025-11-09T08:30:32.947Z","avatar_url":"https://github.com/terraform-google-modules.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-google-slo\n\n## Native SLOs (Service Monitoring API)\nThe [`slo-native`](./modules/slo-native) submodule deploys SLOs to Google Cloud Service Monitoring API. It uses the native Terraform resource [`google_monitoring_slo`](https://www.terraform.io/docs/providers/google/r/monitoring_slo.html) to achieve this.\n\n**Use this module if:**\n- Your SLOs will use metrics from Cloud Monitoring backend **only**, not other backends.\n\n- You want to use the Service Monitoring UI to monitor your SLOs.\n\n### Usage\nDeploy your SLO directly to the Service Monitoring API:\n\n#### HCL format\n```hcl\nmodule \"slo_basic\" {\n  source = \"terraform-google-modules/slo/google//modules/slo-native\"\n  config = {\n    project_id        = var.app_engine_project_id\n    service           = data.google_monitoring_app_engine_service.default.service_id\n    slo_id            = \"gae-slo\"\n    display_name      = \"90% of App Engine default service HTTP response latencies \u003c 500ms over a day\"\n    goal              = 0.9\n    calendar_period   = \"DAY\"\n    type              = \"basic_sli\"\n    method            = \"latency\"\n    latency_threshold = \"0.5s\"\n  }\n}\n```\nSee [`examples/native/simple_example`](./examples/native/simple_example) for another example.\n\n#### YAML format\nYou can also write an SLO in a YAML definition file and load it into the module:\n```hcl\nlocals {\n  config = yamldecode(file(\"configs/my_slo_config.yaml\"))\n}\n\nmodule \"slo_basic\" {\n  source = \"terraform-google-modules/slo/google//modules/slo-native\"\n  config = local.config\n}\n```\nA standard SRE practice is to write SLO definitions as YAML files, and follow DRY principles. See [`examples/slo-generator/yaml_example`](./examples/native/yaml_example) for an example of how to write re-usable YAML templates loaded into Terraform.\n\n## SLO generator (any monitoring backend)\nThe [`slo-generator`](./modules/slo-generator) module deploys the [`slo-generator`](https://github.com/google/slo-generator/blob/master/README.md)\nin Cloud Run in order to compute and export SLOs on a schedule.\n\nSLO Configurations are pushed to Google Cloud Storage, and schedules are maintained using Google Cloud Schedulers.\n\n**Use this setup if:**\n- You are using other metrics backends than Cloud Monitoring that you want to create SLOs out of (e.g: Elastic, Datadog, Prometheus, ...).\n\n- You want to have custom reporting and exporting for your SLO data, along with historical data (e.g: BigQuery, DataStudio, custom metrics).\n\n- You want to have a common configuration format for all SLOs (see [documentation](https://github.com/google/slo-generator/blob/master/README.md)).\n\n### Architecture\n\n![Architecture](./arch.png)\n\n### Compatibility\nThis module is meant for use with Terraform v1.3+ and tested using Terraform 1.10+. If you haven't\n[upgraded](https://www.terraform.io/upgrade-guides/0-13.html) and need a Terraform\n0.12.x-compatible version of this module, the last released version\nintended for Terraform 0.12.x is [v1.0.2](https://registry.terraform.io/modules/terraform-google-modules/-slo/google/v1.0.2).\n\n### Usage\n\nDeploy the SLO generator service with some SLO configs:\n\n```hcl\nlocals {\n  config = yamldecode(file(\"configs/config.yaml\"))\n  slo_configs = [\n    for cfg in fileset(path.module, \"/configs/slo_*.yaml\") :\n    yamldecode(file(cfg))\n  ]\n}\n\nmodule \"slo-generator\" {\n  source = \"terraform-google-modules/slo/google//modules/slo-generator\"\n  project_id  = \"\u003cPROJECT_ID\u003e\"\n  config      = local.config\n  slo_configs = local.slo_configs\n}\n```\n\nFor information on the config formats, please refer to the `slo-generator` documentation:\n* [slo-generator config](https://github.com/google/slo-generator#shared-configuration)\n* [SLO config](https://github.com/google/slo-generator#slo-configuration)\n\nSee [`examples/slo-generator/`](./examples/slo-generator/) for more examples with different setups.\n\n## Contributing\n\nRefer to the [contribution guidelines](./CONTRIBUTING.md) for\ninformation on contributing to this module.\n\n[terraform-provider-gcp]: https://www.terraform.io/docs/providers/google/index.html\n[terraform]: https://www.terraform.io/downloads.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterraform-google-modules%2Fterraform-google-slo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterraform-google-modules%2Fterraform-google-slo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterraform-google-modules%2Fterraform-google-slo/lists"}