mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-16 01:00:22 -04:00
* Improve influxdb provider
- reduce public funcs. We should not make things public that don't need to be public
- improve tests by verifying remote state
- add influxdb_user resource
allows you to manage influxdb users:
```
resource "influxdb_user" "admin" {
name = "administrator"
password = "super-secret"
admin = true
}
```
and also database specific grants:
```
resource "influxdb_user" "ro" {
name = "read-only"
password = "read-only"
grant {
database = "a"
privilege = "read"
}
}
```
* Grant/ revoke admin access properly
* Add continuous_query resource
see
https://docs.influxdata.com/influxdb/v0.13/query_language/continuous_queries/
for the details about continuous queries:
```
resource "influxdb_database" "test" {
name = "terraform-test"
}
resource "influxdb_continuous_query" "minnie" {
name = "minnie"
database = "${influxdb_database.test.name}"
query = "SELECT min(mouse) INTO min_mouse FROM zoo GROUP BY time(30m)"
}
```
1.4 KiB
1.4 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| influxdb | Provider: InfluxDB | docs-influxdb-index | The InfluxDB provider configures databases, etc on an InfluxDB server. |
InfluxDB Provider
The InfluxDB provider allows Terraform to create Databases in InfluxDB. InfluxDB is a database server optimized for time-series data.
The provider configuration block accepts the following arguments:
-
url- (Optional) The root URL of a InfluxDB server. May alternatively be set via theINFLUXDB_URLenvironment variable. Defaults tohttp://localhost:8086/. -
username- (Optional) The name of the user to use when making requests. May alternatively be set via theINFLUXDB_USERNAMEenvironment variable. -
password- (Optional) The password to use when making requests. May alternatively be set via theINFLUXDB_PASSWORDenvironment variable.
Use the navigation to the left to read about the available resources.
Example Usage
provider "influxdb" {
url = "http://influxdb.example.com/"
username = "terraform"
}
resource "influxdb_database" "metrics" {
name = "awesome_app"
}
resource "influxdb_continuous_query" "minnie" {
name = "minnie"
database = "${influxdb_database.metrics.name}"
query = "SELECT min(mouse) INTO min_mouse FROM zoo GROUP BY time(30m)"
}
resource "influxdb_user" "paul" {
name = "paul"
password = "super-secret"
}