Skip to content

Commit

Permalink
upgrade temporal cloud api client version
Browse files Browse the repository at this point in the history
  • Loading branch information
kwadhwa-openai committed Oct 2, 2024
1 parent c25a6e6 commit bd0d1b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/resources/temporalcloud_namespace/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ resource "temporalcloud_namespace" "terraform3" {
regions = ["aws-us-east-1"]
api_key_auth = true
retention_days = 14
}
}
4 changes: 2 additions & 2 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import (
"go.temporal.io/sdk/client"
)

var TemporalCloudAPIVersion = "2024-05-13-00"

// Client is a client for the Temporal Cloud API.
type Client struct {
client.CloudOperationsClient
Expand All @@ -45,8 +47,6 @@ var (
_ client.CloudOperationsClient = &Client{}
)

var TemporalCloudAPIVersion = "2023-10-01-00"

func NewConnectionWithAPIKey(addrStr string, allowInsecure bool, apiKey string) (*Client, error) {

var cClient client.CloudOperationsClient
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/namespace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (r *namespaceResource) Schema(ctx context.Context, _ resource.SchemaRequest
"api_key_auth": schema.BoolAttribute{
Description: "If true, Temporal Cloud will use API key authentication for this namespace. If false, mutual TLS (mTLS) authentication will be used.",
Optional: true,
Computed: true,
},
"codec_server": schema.SingleNestedAttribute{
Description: "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.",
Expand Down Expand Up @@ -302,6 +303,7 @@ func (r *namespaceResource) Create(ctx context.Context, req resource.CreateReque
mtlAuth = &namespacev1.MtlsAuthSpec{
AcceptedClientCa: plan.AcceptedClientCA.ValueString(),
CertificateFilters: certFilters,
Enabled: true,
}

spec.MtlsAuth = mtlAuth
Expand Down Expand Up @@ -401,6 +403,7 @@ func (r *namespaceResource) Update(ctx context.Context, req resource.UpdateReque
mtlAuth = &namespacev1.MtlsAuthSpec{
AcceptedClientCa: plan.AcceptedClientCA.ValueString(),
CertificateFilters: certFilters,
Enabled: true,
}

spec.MtlsAuth = mtlAuth
Expand Down

0 comments on commit bd0d1b4

Please sign in to comment.