Skip to content

Latest commit

 

History

History
74 lines (61 loc) · 2.84 KB

File metadata and controls

74 lines (61 loc) · 2.84 KB
page_title subcategory description
stackit_logs_access_token Resource - stackit
Logs access token resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.

stackit_logs_access_token (Resource)

Logs access token resource schema. Uses the default_region specified in the provider configuration as a fallback in case no region is defined on resource level.

Example Usage

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

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 are: active, expired.
  • valid_until (String) The date and time until an access token is valid to (inclusively)