{"id":40380857,"url":"https://github.com/dsp-testing/opentofu","last_synced_at":"2026-01-20T12:02:27.557Z","repository":{"id":328030255,"uuid":"1098951876","full_name":"dsp-testing/opentofu","owner":"dsp-testing","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-14T20:50:20.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T22:57:29.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsp-testing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-11-18T11:05:02.000Z","updated_at":"2026-01-14T20:50:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dsp-testing/opentofu","commit_stats":null,"previous_names":["dsp-testing/opentofu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dsp-testing/opentofu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsp-testing%2Fopentofu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsp-testing%2Fopentofu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsp-testing%2Fopentofu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsp-testing%2Fopentofu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsp-testing","download_url":"https://codeload.github.com/dsp-testing/opentofu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsp-testing%2Fopentofu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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":[],"created_at":"2026-01-20T12:02:27.501Z","updated_at":"2026-01-20T12:02:27.547Z","avatar_url":"https://github.com/dsp-testing.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eOpenTofu (open-source Terraform fork) + Grafana: Example tutorial\u003c/h3\u003e\n  \u003cimg alt=\"Static Badge\" style=\"border-radius:16px\" src=\"https://img.shields.io/badge/GRAFANA-F46800?style=for-the-badge\u0026logo=grafana\u0026logoColor=white\"\u003e\n  \u003cimg alt=\"Static Badge\" style=\"border-radius:16px\" src=\"https://img.shields.io/badge/OPENTOFU-FFDA18?style=for-the-badge\u0026logo=opentofu\u0026logoColor=white\"\u003e\n  \u003cp align=\"center\"\u003e\n    Learn by doing. Create a datasource, a folder and import dahsboards in it with panels using this datasource. You can copy this and customize it to make much more using the Grafana provider.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Create a Grafana Cloud stack\n\nCreate a Grafana Cloud Free account. **No credit card** required.\n\n[![Create a free account](https://img.shields.io/badge/CREATE%20A%20CLOUD%20ACCOUNT-F46800?style=for-the-badge\u0026logo=grafana\u0026logoColor=white)](https://grafana.com/auth/sign-up/create-user?cta=create-free-account)\n\n---\n\n## Set your OpenTofu\n\nYou can set OpenTofu the way you want. If you never did that, here are the steps you can follow:\n\n1. Install OpenTofu using the [official documentation](https://opentofu.org/docs/intro/install/) for your environment.\n2. Initialize OpenTofu by running `tofu init`\n\n## Create a Service Account token for your Grafana\n\n1. Go to the Service Account page: go to your Grafana instance, open the menu and click on Administration \u003e Services Account\n2. Create a new Service Account with permissions on folders, datasources, alerts and dashboards\n3. Create a new token for this Service Account. As best practice, use an expiration date. Copy the token, it is not possible to display it later.\n\n## Deploy to your Grafana\n\nWe will deploy:\n- A folder\n- A datasource (we use Test Data, ensure it's installed on your Grafana)\n- A dashboard\n- An alert\n\nTo do that, use the following command:\n\n    tofu apply -var 'grafana_url=\u003cCHANGE ME\u003e' -var 'my_token=\u003cCHANGE ME\u003e' -var 'my_email=\u003cCHANGE ME\u003e'\n\nOpenTofu will ask you to confirm. Type `yes`.\n\nReplace the values for `grafana_url` and `my_token` with the right values for your environment:\n- `grafana_url` should look like *https://mystack.grafana.net/* in Grafana Cloud (or other domains if you use OSS or Enterprise)\n- `my_token` is the API token you created\n- `my_email` is the email address to receive alerts (don't worry, the alert rule never fires in this example)\n\nYou can now visit your instance and check that the folder, dashboard, and alerts are present.\n\n\u003e You may found no data in your dashboard when opening it. You need to reload the page as your browser cache prevents the webapp to use the new datasource.\n\n## Cleanup your environment\n\nAs Code is great because cleaning up your tests are also very fast !\n\nWith the same values, run:\n\n    tofu destroy -var 'grafana_url=\u003cCHANGE ME\u003e' -var 'my_token=\u003cCHANGE ME\u003e'\n\nTo fully cleanup the environment, you can also remove the Service Account you created manually.\n\n---\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\nSome useful ressources from Grafana Labs and friends:\n\n* [OpenTofu Manifesto](https://opentofu.org/manifesto/)\n* [Grafana Grizzly: CLI for Observability as Code](https://grafana.github.io/grizzly/)\n* [Web Shop O11y demo](https://github.com/Condla/web-shop-o11y-demo)\n* [On demand videos and webinars](https://grafana.com/videos/)\n* [Docs for LGTM, k6, OnCall, etc.](https://grafana.com/docs/)\n* [Next Grafana Labs events](https://grafana.com/about/events/)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsp-testing%2Fopentofu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsp-testing%2Fopentofu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsp-testing%2Fopentofu/lists"}