terraform-provider-grafanaauth

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

README

Terraform Provider for Grafana Auth API

A very simple Terraform Provider to manage the creation of Grafana API Keys.

Overview

This project exists for several reasons:

  • The official Terraform Provider for Grafana does not support managing API key resources.
  • The official Grafana API Client, which the official provider above uses, does not expose methods for calls against the Authorization API.
  • I needed a working provider for this purpose the next day, and could not wait for my contributions to the two official projects above to be merged in.
  • I do indeed plan on porting these changes to the official projects above very soon.
  • I wanted practice with Terraform Plugin SDK v2 😏.

Corresponding changes to the upstream grafana-api-golang-client are staged here.

Development

To build the binary, and move it to one of the expected plugin locations, modify the OS_ARCH variable in the makefile and run:

make install

To run acceptance tests:

  1. Make sure an instance of Grafana is running and accessible.
  2. Set appropriate env vars GRAFANA_URL (required), and GRAFANA_USERNAME, GRAFANA_PASSWORD, or GRAFANA_API_TOKEN if necessary.
  3. Run make testacc.

Use

Please see the example directory for some simple examples.

Limitations / Known Issues

  • Due to a bug in previous versions of Grafana, the underlying API calls work as expected only with versions of Grafana >= v6.6.
  • Support for importing API keys (via terraform import) is possible but not planned.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL