Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Key auth for namespaces #130

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

kwadhwa-openai
Copy link
Contributor

@kwadhwa-openai kwadhwa-openai commented Sep 27, 2024

What was changed

  • Currently namespaces can only be created using client certificates. This PR allows ability to create them with API Key authentication
  • Allow specifying cloud API versioning to be able to use new features. This also makes it not break backwards compatibility by keeping the default version as the existing (old) one

Why?

This allows using API Keys to interact with namespaces

Checklist

  1. Closes [Feature Request] API Key auth for namespaces #128 Closes [Feature Request] Allow specifying versions for cloud API via provider #129

  2. How was this tested:
    `make testacc

  3. Any docs updates needed?
    generated the docs

@kwadhwa-openai kwadhwa-openai requested a review from a team as a code owner September 27, 2024 21:37
@kwadhwa-openai
Copy link
Contributor Author

@jlacefie @swgillespie another one :)

@jlacefie
Copy link
Collaborator

initial manual run of the test suite passes. running manually due to #131

terraform-provider-temporalcloud-sa git:(terraform_api_key_auth_for_namespaces) ✗ make testacc           
TF_ACC=1 go test ./... -v  -timeout 120m
?       github.com/temporalio/terraform-provider-temporalcloud  [no test files]
?       github.com/temporalio/terraform-provider-temporalcloud/internal/client  [no test files]
=== RUN   TestAccBasicNamespace
=== PAUSE TestAccBasicNamespace
=== RUN   TestAccBasicNamespaceWithApiKeyAuth
=== PAUSE TestAccBasicNamespaceWithApiKeyAuth
=== RUN   TestAccBasicNamespaceWithCertFilters
=== PAUSE TestAccBasicNamespaceWithCertFilters
=== RUN   TestAccNamespaceWithCodecServer
=== PAUSE TestAccNamespaceWithCodecServer
=== RUN   TestAccNamespaceRenameForcesReplacement
=== PAUSE TestAccNamespaceRenameForcesReplacement
=== RUN   TestAccNamespaceImport
=== PAUSE TestAccNamespaceImport
=== RUN   TestAccSpacesBetweenCertificateStrings
=== PAUSE TestAccSpacesBetweenCertificateStrings
=== RUN   TestAccNamespaceWithSearchAttributes
=== PAUSE TestAccNamespaceWithSearchAttributes
=== RUN   TestAccNamespaceImportSearchAttribute
=== PAUSE TestAccNamespaceImportSearchAttribute
=== RUN   TestAccNamespaceWithSearchAttributesUpdate
=== PAUSE TestAccNamespaceWithSearchAttributesUpdate
=== RUN   TestAccNamespaces
--- PASS: TestAccNamespaces (3.72s)
=== RUN   TestAccRegion
--- PASS: TestAccRegion (3.89s)
=== RUN   TestAccBasicUser
=== PAUSE TestAccBasicUser
=== RUN   TestAccBasicUserWithNamespaceAccesses
=== PAUSE TestAccBasicUserWithNamespaceAccesses
=== CONT  TestAccBasicNamespace
=== CONT  TestAccSpacesBetweenCertificateStrings
=== CONT  TestAccNamespaceWithCodecServer
=== CONT  TestAccBasicNamespaceWithCertFilters
=== CONT  TestAccNamespaceImportSearchAttribute
=== CONT  TestAccNamespaceWithSearchAttributes
=== CONT  TestAccBasicNamespaceWithApiKeyAuth
=== CONT  TestAccNamespaceWithSearchAttributesUpdate
=== CONT  TestAccBasicUserWithNamespaceAccesses
=== CONT  TestAccBasicUser
--- PASS: TestAccBasicUser (12.26s)
=== CONT  TestAccNamespaceImport
--- PASS: TestAccBasicUserWithNamespaceAccesses (101.97s)
=== CONT  TestAccNamespaceRenameForcesReplacement
--- PASS: TestAccSpacesBetweenCertificateStrings (109.94s)
--- PASS: TestAccBasicNamespaceWithCertFilters (116.85s)
--- PASS: TestAccBasicNamespace (124.74s)
--- PASS: TestAccBasicNamespaceWithApiKeyAuth (125.74s)
--- PASS: TestAccNamespaceImport (119.65s)
--- PASS: TestAccNamespaceImportSearchAttribute (132.76s)
--- PASS: TestAccNamespaceWithSearchAttributesUpdate (138.78s)
--- PASS: TestAccNamespaceWithSearchAttributes (178.24s)
--- PASS: TestAccNamespaceWithCodecServer (238.09s)
--- PASS: TestAccNamespaceRenameForcesReplacement (216.58s)
PASS
ok      github.com/temporalio/terraform-provider-temporalcloud/internal/provider        327.114s
=== RUN   TestCACertNormalization
--- PASS: TestCACertNormalization (0.00s)
=== RUN   TestUnknownEncodedCAValue
--- PASS: TestUnknownEncodedCAValue (0.00s)
=== RUN   TestNullEncodedCAValue
--- PASS: TestNullEncodedCAValue (0.00s)
=== RUN   TestEncodedCAValue
--- PASS: TestEncodedCAValue (0.00s)
PASS
ok      github.com/temporalio/terraform-provider-temporalcloud/internal/types   (cached)

@kwadhwa-openai kwadhwa-openai force-pushed the terraform_api_key_auth_for_namespaces branch 2 times, most recently from 3b1efdd to bd0d1b4 Compare October 2, 2024 20:45
@kwadhwa-openai kwadhwa-openai force-pushed the terraform_api_key_auth_for_namespaces branch from bd0d1b4 to 5078fbd Compare October 5, 2024 22:54
@kwadhwa-openai kwadhwa-openai force-pushed the terraform_api_key_auth_for_namespaces branch from 5078fbd to 2b2fd21 Compare October 5, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants