Skip to content

Commit

Permalink
add documentation for v1.15.0 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama authored Apr 21, 2024
1 parent 7e08328 commit 965b416
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/data-sources/metrics_account.md
Original file line number Diff line number Diff line change
@@ -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.
49 changes: 49 additions & 0 deletions docs/resources/metrics_account.md
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
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).
17 changes: 17 additions & 0 deletions examples/metrics_account/main.tf
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"
account_name = "test"
plan_uts = 100
authorized_accounts = [
12345
]
}

0 comments on commit 965b416

Please sign in to comment.