From 965b4160e0d1fdc0e82dbeaedc408aa313cda569 Mon Sep 17 00:00:00 2001 From: Naama Bendalak <74866605+8naama@users.noreply.github.com> Date: Sun, 21 Apr 2024 10:49:41 +0300 Subject: [PATCH] add documentation for v1.15.0 (#178) --- docs/data-sources/metrics_account.md | 17 ++++++++++ docs/resources/metrics_account.md | 49 ++++++++++++++++++++++++++++ examples/metrics_account/main.tf | 17 ++++++++++ 3 files changed, 83 insertions(+) create mode 100644 docs/data-sources/metrics_account.md create mode 100644 docs/resources/metrics_account.md create mode 100644 examples/metrics_account/main.tf diff --git a/docs/data-sources/metrics_account.md b/docs/data-sources/metrics_account.md new file mode 100644 index 0000000..8a968e0 --- /dev/null +++ b/docs/data-sources/metrics_account.md @@ -0,0 +1,17 @@ +# Subaccount Datasource + +Use this data source to access information about existing Logz.io Metrics Accounts. + +* Learn more about accounts in the [Logz.io Docs](https://docs.logz.io/docs/user-guide/admin/logzio-accounts/manage-the-main-account-and-sub-accounts). +* Learn more about available [APIs for managing Logz.io Metrics accounts](https://api-docs.logz.io/docs/logz/create-a-new-metrics-account). + +## Argument Reference + +* `account_id` - ID of the metrics account. + +## Attribute Reference + +* `email` - (String) Email address of an existing admin user on the main account which will also become the admin of the created metrics account. +* `account_name` - (String) Name of the metrics account. +* `plan_uts` - (Integer) Amount of unique time series that can be ingested to the metrics account. +* `authorized_accounts` - (List) IDs of accounts that can access the account's data. Can be an empty array. diff --git a/docs/resources/metrics_account.md b/docs/resources/metrics_account.md new file mode 100644 index 0000000..c1ab18c --- /dev/null +++ b/docs/resources/metrics_account.md @@ -0,0 +1,49 @@ +# Metrics accounts Provider + +Provides a Logz.io Metrics account management resource. This can be used to create and manage Logz.io metric accounts. + +* Learn more about accounts in the [Logz.io Docs](https://docs.logz.io/docs/user-guide/admin/logzio-accounts/manage-the-main-account-and-sub-accounts) +* Learn more about available [APIs for managing Logz.io Metrics Accounts](https://api-docs.logz.io/docs/logz/create-a-new-metrics-account) + +## Example Usage +```hcl +variable "api_token" { + type = "string" + description = "your logzio API token" +} + +provider "logzio" { + api_token = var.api_token +} + +resource "logzio_metrics_account" "my_metrics_account" { + email = "user@logz.io" + account_name = "test" + plan_uts = 100 + authorized_accounts = [ + 12345 + ] +} +``` + +## Argument Reference + +### Required: +* `email` - (String) Email address of an existing admin user on the main account which will also become the admin of the subaccount being created. + +### Optional +* `account_name` - (String) Name of the metrics account. +* `plan_uts` - (Integer) Amount of unique time series that can be ingested to the metrics account. +* `authorized_accounts` - (List) IDs of accounts that can access the account's data. Can be an empty array. + +## Attribute Reference +* `account_id` - ID of the metrics account. +* `account_token` - Log shipping token for the metrics account. [Learn more](https://docs.logz.io/user-guide/tokens/log-shipping-tokens/) + + +## Endpoints used +* [Create](https://api-docs.logz.io/docs/logz/create-a-new-metrics-account). +* [Get](https://api-docs.logz.io/docs/logz/get-a-specific-metrics-account). +* [GetAll](https://api-docs.logz.io/docs/logz/get-a-list-of-all-metrics-accounts). +* [Update](https://api-docs.logz.io/docs/logz/update-a-metrics-account). +* [Delete](https://api-docs.logz.io/docs/logz/delete-a-metrics-account). diff --git a/examples/metrics_account/main.tf b/examples/metrics_account/main.tf new file mode 100644 index 0000000..2081702 --- /dev/null +++ b/examples/metrics_account/main.tf @@ -0,0 +1,17 @@ +variable "api_token" { + type = "string" + description = "your logzio API token" +} + +provider "logzio" { + api_token = var.api_token +} + +resource "logzio_metrics_account" "my_metrics_account" { + email = "user@logz.io" + account_name = "test" + plan_uts = 100 + authorized_accounts = [ + 12345 + ] +}