mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-01-07 10:01:27 -05: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.1 KiB
1.1 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| influxdb | InfluxDB: influxdb_user | docs-influxdb-resource-user | The influxdb_user resource allows an InfluxDB users to be managed. |
influxdb_user
The user resource allows a user to be created on an InfluxDB server.
Example Usage
resource "influxdb_database" "green" {
name = "terraform-green"
}
resource "influxdb_user" "paul" {
name = "paul"
password = "super-secret"
grant {
database = "${influxdb_database.green.name}"
privilege = "write"
}
}
Argument Reference
The following arguments are supported:
name- (Required) The name for the user.password- (Required) The password for the user.admin- (Optional) Mark the user as admin.grant- (Optional) A list of grants for non-admin users
Each grant supports the following:
database- (Required) The name of the database the privilege is associated withprivilege- (Required) The privilege to grant (READ|WRITE|ALL)
Attributes Reference
admin- (Bool) indication if the user is an admin or not.