# Reference for the teleport\_workload\_cluster Terraform resource

This page describes the supported values of the teleport\_workload\_cluster resource of the Teleport Terraform provider.

## Example Usage

```
resource "teleport_workload_cluster" "example" {
  version = "v1"
  metadata = {
    name = "example"
  }
  spec = {
    regions = [
      {
        name = "us-west-2"
      },
    ]

    bot = {
      name = "onboarding"
    }

    token = {
      join_method = "iam"

      allow = [
        {
          aws_account = "333333333333"
          aws_arn     = "arn:aws:sts::333333333333:assumed-role/my-role-name/my-role-session-name"
        },
      ]
    }
  }
}

```

## Schema

### Required

- `metadata` (Attributes) (see [below for nested schema](#nested-schema-for-metadata))
- `spec` (Attributes) (see [below for nested schema](#nested-schema-for-spec))
- `version` (String)

### Optional

- `status` (Attributes) (see [below for nested schema](#nested-schema-for-status))
- `sub_kind` (String)

### Nested Schema for `metadata`

Required:

- `name` (String) name is an object name.

Optional:

- `description` (String) description is object description.
- `expires` (String) expires is a global expiry time header can be set on any resource in the system.
- `labels` (Map of String) labels is a set of labels.

### Nested Schema for `spec`

Optional:

- `bot` (Attributes) (see [below for nested schema](#nested-schema-for-specbot))
- `regions` (Attributes List) (see [below for nested schema](#nested-schema-for-specregions))
- `token` (Attributes) (see [below for nested schema](#nested-schema-for-spectoken))

### Nested Schema for `spec.bot`

Optional:

- `name` (String) name is the name of the bot, token, and role that will be created

### Nested Schema for `spec.regions`

Optional:

- `name` (String) name is the region's name

### Nested Schema for `spec.token`

Optional:

- `allow` (Attributes List) allow defines the AWS Accounts and ARNs to allow joining from (see [below for nested schema](#nested-schema-for-spectokenallow))
- `join_method` (String) join\_method is type of join method to allow for the token

### Nested Schema for `spec.token.allow`

Optional:

- `aws_account` (String)
- `aws_arn` (String)

### Nested Schema for `status`

Optional:

- `domain` (String) domain is the Teleport Proxy address of the child Teleport Cloud cluster
- `state` (String) state is the status of the child cluster running in Teleport Cloud
