volgorean / terraform-provider-grafana

Terraform Grafana provider

Home Page:https://www.terraform.io/docs/providers/grafana/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terraform Provider for Grafana

Development

If you're new to provider development, a good place to start is the Extending Terraform docs.

Set up your local environment by installing Go. Also recommended is Docker. Docker is not required, but it makes running a local Grafana instance for acceptance tests very easy.

Run unit tests:

make test

Run acceptance tests:

# In one terminal, run a Grafana container.
# You may optionally override the image tag...
# GRAFANA_VERSION=7.1.1 \
make test-serve

# In another...
GRAFANA_URL=http://localhost:3000 \
GRAFANA_AUTH=admin:admin \
make testacc

This codebase leverages grafana/grafana-api-golang-client as its Grafana API client. All resources and data sources should leverage this.

Releasing

Builds and releases are automated with GitHub Actions and GoReleaser. The changelog is managed with github-changelog-generator.

Create a new release with the release Make target:

RELEASE_VERSION=v... \
CHANGELOG_GITHUB_TOKEN=... \
make release

Once the command exits, you can monitor the rest of the process on the Actions UI.

The Action creates the release, but leaves it in "draft" state. Open it up in a browser and if all looks well, mash the publish button.

About

Terraform Grafana provider

https://www.terraform.io/docs/providers/grafana/

License:Mozilla Public License 2.0


Languages

Language:Go 93.8%Language:Shell 2.3%Language:HTML 2.2%Language:Makefile 1.8%