Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/data-sources/logs_access_token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_logs_access_token Data Source - stackit"
subcategory: ""
description: |-
Logs access token data source schema.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_logs_access_token (Data Source)

Logs access token data source schema.

~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
data "stackit_logs_access_token" "accessToken" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
access_token_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `access_token_id` (String) The access token ID
- `instance_id` (String) The Logs instance ID associated with the access token
- `project_id` (String) STACKIT project ID associated with the Logs access token

### Optional

- `region` (String) STACKIT region name the resource is located in. If not defined, the provider region is used.

### Read-Only

- `creator` (String) The user who created the access token
- `description` (String) The description of the access token
- `display_name` (String) The displayed name of the access token
- `expires` (Boolean) Indicates if the access token can expire
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`instance_id`,`access_token_id`".
- `permissions` (List of String) The access permissions granted to the access token. Possible values: `read`, `write`.
- `status` (String) The status of the access token, possible values: Possible values are: `active`, `expired`.
- `valid_until` (String) The date and time until an access token is valid to (inclusively)
77 changes: 77 additions & 0 deletions docs/resources/logs_access_token.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_logs_access_token Resource - stackit"
subcategory: ""
description: |-
Logs access token resource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---

# stackit_logs_access_token (Resource)

Logs access token resource schema.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.

## Example Usage

```terraform
resource "stackit_logs_access_token" "accessToken" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
display_name = "logs-access-token-example"
permissions = [
"read"
]
}

resource "stackit_logs_access_token" "accessToken2" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
display_name = "logs-access-token-example"
lifetime = 30
permissions = [
"write"
]
description = "Example description"
}

# Only use the import statement, if you want to import an existing logs access token
# Note: The generated access token is only available upon creation.
# Since this attribute is not fetched from the API call, to prevent the conflicts, you need to add:
# lifecycle {
# ignore_changes = [ lifetime ]
# }
import {
to = stackit_logs_access_token.import-example
id = "${var.project_id},${var.region},${var.logs_instance_id},${var.logs_access_token_id}"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `display_name` (String) The displayed name of the access token
- `instance_id` (String) The Logs instance ID associated with the access token
- `permissions` (List of String) The access permissions granted to the access token. Possible values: `read`, `write`.
- `project_id` (String) STACKIT project ID associated with the Logs access token

### Optional

- `description` (String) The description of the access token
- `lifetime` (Number) A lifetime period for an access token in days. If unset the token will not expire.
- `region` (String) STACKIT region name the resource is located in. If not defined, the provider region is used.

### Read-Only

- `access_token` (String, Sensitive) The generated access token
- `access_token_id` (String) The access token ID
- `creator` (String) The user who created the access token
- `expires` (Boolean) Indicates if the access token can expire
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`instance_id`,`access_token_id`".
- `status` (String) The status of the access token, possible values: Possible values are: `active`, `expired`.
- `valid_until` (String) The date and time until an access token is valid to (inclusively)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
data "stackit_logs_access_token" "accessToken" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
access_token_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
32 changes: 32 additions & 0 deletions examples/resources/stackit_logs_access_token/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resource "stackit_logs_access_token" "accessToken" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
display_name = "logs-access-token-example"
permissions = [
"read"
]
}

resource "stackit_logs_access_token" "accessToken2" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
region = "eu01"
display_name = "logs-access-token-example"
lifetime = 30
permissions = [
"write"
]
description = "Example description"
}

# Only use the import statement, if you want to import an existing logs access token
# Note: The generated access token is only available upon creation.
# Since this attribute is not fetched from the API call, to prevent the conflicts, you need to add:
# lifecycle {
# ignore_changes = [ lifetime ]
# }
import {
to = stackit_logs_access_token.import-example
id = "${var.project_id},${var.region},${var.logs_instance_id},${var.logs_access_token_id}"
}
Loading
Loading