grafana / Terraform Provider Grafana
Programming Languages
Projects that are alternatives of or similar to Terraform Provider Grafana
Terraform Provider for Grafana
- Terraform website: https://terraform.io
- Grafana website: https://grafana.com
- Provider Documentation: https://registry.terraform.io/providers/grafana/grafana/latest/docs
- Terraform Chat: Terraform Gitter
- Grafana Chat: Grafana #terraform Slack channel
- Terraform Mailing List: Google Groups
Requirements
- Terraform 0.12+
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:
You could run the acceptance tests inside docker or outside of docker
make testacc-docker.
Alternatively,
# In one terminal, run a Grafana container.
# You may optionally override the image tag...
# GRAFANA_VERSION=7.3.4 \
make test-serve
# Alternatively, run Grafana with TLS:
# GRAFANA_VERSION=7.3.4 \
# make test-serve-tls
# In another...
GRAFANA_URL=http://localhost:3000 \
GRAFANA_AUTH=admin:admin \
GRAFANA_ORG_ID=1 \
make testacc
# Alternatively, run acceptance tests with TLS client certs:
# GRAFANA_URL=https://localhost:3001 \
# GRAFANA_ORG_ID=1 \
# GRAFANA_AUTH=admin:admin \
# GRAFANA_TLS_KEY=$PWD/testdata/client.key \
# GRAFANA_TLS_CERT=$PWD/testdata/client.crt \
# GRAFANA_CA_CERT=$PWD/testdata/ca.crt \
# 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.