Skip to content

Commit

Permalink
Merge branch 'main' into jroof-userResource-addOwner
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacefie authored Oct 11, 2024
2 parents 8622c07 + 2cc1206 commit 5f7d952
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 23 deletions.
78 changes: 78 additions & 0 deletions docs/resources/apikey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "temporalcloud_apikey Resource - terraform-provider-temporalcloud"
subcategory: ""
description: |-
Provisions a Temporal Cloud API key.
---

# temporalcloud_apikey (Resource)

Provisions a Temporal Cloud API key.

## Example Usage

```terraform
terraform {
required_providers {
temporalcloud = {
source = "temporalio/temporalcloud"
}
}
}
provider "temporalcloud" {
}
resource "temporalcloud_service_account" "global_service_account" {
name = "admin"
account_access = "Admin"
}
resource "temporalcloud_apikey" "global_apikey" {
display_name = "admin"
owner_type = "service-account"
owner_id = temporalcloud_service_account.global_service_account.id
expiry_time = "2024-11-01T00:00:00Z"
disabled = false
}
```

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

### Required

- `display_name` (String) The display name for the API key.
- `expiry_time` (String) The expiry time for the API key in ISO 8601 format.
- `owner_id` (String) The ID of the owner to create the API key for.
- `owner_type` (String) The type of the owner to create the API key.

### Optional

- `description` (String) The description for the API key.
- `disabled` (Boolean) Whether the API key is disabled.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The unique identifier of the API key.
- `state` (String) The current state of the API key.
- `token` (String) The token for the API key. This field will only be populated with the full key when creating an API key.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`

Optional:

- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- `delete` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

## Import

Import is supported using the following syntax:

```shell
terraform import temporalcloud_apikey.terraform terraform.badf00d
```
2 changes: 1 addition & 1 deletion docs/resources/namespace_search_attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ resource "temporalcloud_namespace_search_attribute" "custom_search_attribute3" {

- `name` (String) The name of the search attribute.
- `namespace_id` (String) The ID of the namespace to which this search attribute belongs.
- `type` (String) The type of the search attribute. Must be one of `Bool`, `Datetime`, `Double`, `Int`, `Keyword`, or `Text`.
- `type` (String) The type of the search attribute. Must be one of `bool`, `datetime`, `double`, `int`, `keyword`, or `text`. (case-insensitive)

### Read-Only

Expand Down
1 change: 1 addition & 0 deletions examples/resources/temporalcloud_apikey/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import temporalcloud_apikey.terraform terraform.badf00d
24 changes: 24 additions & 0 deletions examples/resources/temporalcloud_apikey/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
terraform {
required_providers {
temporalcloud = {
source = "temporalio/temporalcloud"
}
}
}

provider "temporalcloud" {

}

resource "temporalcloud_service_account" "global_service_account" {
name = "admin"
account_access = "Admin"
}

resource "temporalcloud_apikey" "global_apikey" {
display_name = "admin"
owner_type = "service-account"
owner_id = temporalcloud_service_account.global_service_account.id
expiry_time = "2024-11-01T00:00:00Z"
disabled = false
}
Loading

0 comments on commit 5f7d952

Please sign in to comment.