Skip to content

Commit

Permalink
Updates to documentation
Browse files Browse the repository at this point in the history
* Initial Contributing.MD

* Issues/PR and review language added

* updates for CLA, license headers, and general improvements

* updated the doc for Namespace ca certs and all resource import examples

* run go generate

---------

Co-authored-by: Abhinav Nekkanti <[email protected]>
  • Loading branch information
jlacefie and anekkanti authored Nov 4, 2024
1 parent 7341c55 commit a52b62a
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 10 deletions.
7 changes: 6 additions & 1 deletion docs/resources/apikey.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,10 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import temporalcloud_apikey.terraform terraform.badf00d
# API Keys can be imported to incorporate existing API Keys into your Terraform pipeline.
# To import an API Key, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported API Key. In the example below, the placeholder is "temporalcloud_apikey" "tfapikey"
# - the API Key's ID, which is found when clicking into an API Key in the Temporal Cloud UI. In the example below, this is zJV5zQ3IhsAbw75dAkVNEMsAd3a5AemC

terraform import temporalcloud_apikey.tfapikey zJV5zQ3IhsAbw75dAkVNEMsAd3a5AemC
```
9 changes: 7 additions & 2 deletions docs/resources/namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ resource "temporalcloud_namespace" "terraform3" {

### Optional

- `accepted_client_ca` (String) The Base64-encoded CA cert in PEM format that clients use when authenticating with Temporal Cloud.
- `accepted_client_ca` (String) The Base64-encoded CA cert in PEM format that clients use when authenticating with Temporal Cloud. This is a required field when a Namespace uses mTLS authentication.
- `api_key_auth` (Boolean) If true, Temporal Cloud will use API key authentication for this namespace. If false, mutual TLS (mTLS) authentication will be used.
- `certificate_filters` (Attributes List) A list of filters to apply to client certificates when initiating a connection Temporal Cloud. If present, connections will only be allowed from client certificates whose distinguished name properties match at least one of the filters. (see [below for nested schema](#nestedatt--certificate_filters))
- `codec_server` (Attributes) A codec server is used by the Temporal Cloud UI to decode payloads for all users interacting with this namespace, even if the workflow history itself is encrypted. (see [below for nested schema](#nestedatt--codec_server))
Expand Down Expand Up @@ -180,5 +180,10 @@ Read-Only:
Import is supported using the following syntax:

```shell
terraform import temporalcloud_namespace.terraform terraform.badf00d
# Namespace can be imported to incorporate existing Namespaces into your Terraform pipeline.
# To import a Namespace, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Namespace. In the example below, the placeholder is "temporalcloud_namespace" "terraform"
# - the Namespace ID, which includes the Namespace Name and Account ID available at the top of the Namespace's page in the Temporal Cloud UI. In the example below, this is namespaceid.acctid

terraform import temporalcloud_namespace.terraform namespaceid.acctid
```
15 changes: 15 additions & 0 deletions docs/resources/namespace_search_attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,18 @@ resource "temporalcloud_namespace_search_attribute" "custom_search_attribute3" {
### Read-Only

- `id` (String) The ID of this search attribute.

## Import

Import is supported using the following syntax:

```shell
# Search Attributes can be imported to incorporate existing Namespace Search Attributes into your Terraform pipeline.
# To import a Search Attribute, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Search Attribute. In the example below, the placeholder is "temporalcloud_namespace_search_attribute" "saimport"
# - the Namespace ID, which includes the Namespace Name and Account ID available at the top of the Namespace's page in the Temporal Cloud UI. In the example below, this is namespaceid.acctid
# - the name of the Search Attribute, which is available in the Search Attribute configuration of Namespace's page in the Temporal Cloud UI. In the example below, this is searchAttr


terraform import temporalcloud_namespace_search_attribute.saimport namespaceid.acctid/searchAttr
```
7 changes: 6 additions & 1 deletion docs/resources/service_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import temporalcloud_service_account.terraform terraform.badf00d
# Service Accounts can be imported to incorporate existing Service Accounts into your Terraform pipeline.
# To import a Service Account, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Service Account. In the example below, the placeholder is "temporalcloud_service_account" "saimport"
# - the Service Accounts's ID, which is found using the Temporal Cloud CLI tcld sa l. In the example below, this is e3cb94fbdbb845f480044d053d00665b

terraform import temporalcloud_service_account.saimport e3cb94fbdbb845f480044d053d00665b
```
7 changes: 6 additions & 1 deletion docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import temporalcloud_user.terraform terraform.badf00d
# Users can be imported to incorporate existing Users into your Terraform pipeline.
# To import a User, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported User. In the example below, the placeholder is "temporalcloud_user" "user"
# - the User's ID, which is found using the Temporal Cloud CLI tcld u l. In the example below, this is 72360058153949edb2f1d47019c1e85f

terraform import temporalcloud_user.user 72360058153949edb2f1d47019c1e85f
```
7 changes: 6 additions & 1 deletion examples/resources/temporalcloud_apikey/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
terraform import temporalcloud_apikey.terraform terraform.badf00d
# API Keys can be imported to incorporate existing API Keys into your Terraform pipeline.
# To import an API Key, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported API Key. In the example below, the placeholder is "temporalcloud_apikey" "tfapikey"
# - the API Key's ID, which is found when clicking into an API Key in the Temporal Cloud UI. In the example below, this is zJV5zQ3IhsAbw75dAkVNEMsAd3a5AemC

terraform import temporalcloud_apikey.tfapikey zJV5zQ3IhsAbw75dAkVNEMsAd3a5AemC
7 changes: 6 additions & 1 deletion examples/resources/temporalcloud_namespace/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
terraform import temporalcloud_namespace.terraform terraform.badf00d
# Namespace can be imported to incorporate existing Namespaces into your Terraform pipeline.
# To import a Namespace, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Namespace. In the example below, the placeholder is "temporalcloud_namespace" "terraform"
# - the Namespace ID, which includes the Namespace Name and Account ID available at the top of the Namespace's page in the Temporal Cloud UI. In the example below, this is namespaceid.acctid

terraform import temporalcloud_namespace.terraform namespaceid.acctid
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Search Attributes can be imported to incorporate existing Namespace Search Attributes into your Terraform pipeline.
# To import a Search Attribute, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Search Attribute. In the example below, the placeholder is "temporalcloud_namespace_search_attribute" "saimport"
# - the Namespace ID, which includes the Namespace Name and Account ID available at the top of the Namespace's page in the Temporal Cloud UI. In the example below, this is namespaceid.acctid
# - the name of the Search Attribute, which is available in the Search Attribute configuration of Namespace's page in the Temporal Cloud UI. In the example below, this is searchAttr


terraform import temporalcloud_namespace_search_attribute.saimport namespaceid.acctid/searchAttr
7 changes: 6 additions & 1 deletion examples/resources/temporalcloud_service_account/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
terraform import temporalcloud_service_account.terraform terraform.badf00d
# Service Accounts can be imported to incorporate existing Service Accounts into your Terraform pipeline.
# To import a Service Account, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported Service Account. In the example below, the placeholder is "temporalcloud_service_account" "saimport"
# - the Service Accounts's ID, which is found using the Temporal Cloud CLI tcld sa l. In the example below, this is e3cb94fbdbb845f480044d053d00665b

terraform import temporalcloud_service_account.saimport e3cb94fbdbb845f480044d053d00665b
7 changes: 6 additions & 1 deletion examples/resources/temporalcloud_user/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
terraform import temporalcloud_user.terraform terraform.badf00d
# Users can be imported to incorporate existing Users into your Terraform pipeline.
# To import a User, you need
# - a resource configuration in your Terraform configuration file/module to accept the imported User. In the example below, the placeholder is "temporalcloud_user" "user"
# - the User's ID, which is found using the Temporal Cloud CLI tcld u l. In the example below, this is 72360058153949edb2f1d47019c1e85f

terraform import temporalcloud_user.user 72360058153949edb2f1d47019c1e85f
2 changes: 1 addition & 1 deletion internal/provider/namespace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (r *namespaceResource) Schema(ctx context.Context, _ resource.SchemaRequest
},
"accepted_client_ca": schema.StringAttribute{
CustomType: internaltypes.EncodedCAType{},
Description: "The Base64-encoded CA cert in PEM format that clients use when authenticating with Temporal Cloud.",
Description: "The Base64-encoded CA cert in PEM format that clients use when authenticating with Temporal Cloud. This is a required field when a Namespace uses mTLS authentication.",
Optional: true,
},
"retention_days": schema.Int64Attribute{
Expand Down

0 comments on commit a52b62a

Please sign in to comment.