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

add service account resource #126

Merged

Conversation

kwadhwa-openai
Copy link
Contributor

What was changed

Adding Service Account CRUD support

Why?

Service Accounts are currently managed using tcld. Adding support with terraform plugin will make it easy to maintain it in code

Checklist

  1. Closes [Feature Request] Add Service Account resource support #125

  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 25, 2024 01:13
@kwadhwa-openai
Copy link
Contributor Author

@jlacefie @swgillespie can you take a look at this PR too? Thank you!

@jlacefie
Copy link
Collaborator

TY for the contribution!
Manually ran tests locally using make dye to #131 . All tests passed. \o/
Only one nit, the generated docs don't have a sample in them. Would you be able to add one, please?

RUN   TestAccBasicNamespace
=== PAUSE TestAccBasicNamespace
=== 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.99s)
=== RUN   TestAccRegion
--- PASS: TestAccRegion (4.17s)
=== RUN   TestAccBasicServiceAccount
=== PAUSE TestAccBasicServiceAccount
=== RUN   TestAccBasicServiceAccountWithNamespaceAccesses
=== PAUSE TestAccBasicServiceAccountWithNamespaceAccesses
=== RUN   TestAccBasicUser
=== PAUSE TestAccBasicUser
=== RUN   TestAccBasicUserWithNamespaceAccesses
=== PAUSE TestAccBasicUserWithNamespaceAccesses
=== CONT  TestAccBasicNamespace
=== CONT  TestAccNamespaceImport
=== CONT  TestAccBasicNamespaceWithCertFilters
=== CONT  TestAccNamespaceWithCodecServer
=== CONT  TestAccBasicUserWithNamespaceAccesses
=== CONT  TestAccBasicUser
=== CONT  TestAccNamespaceImportSearchAttribute
=== CONT  TestAccNamespaceWithSearchAttributesUpdate
=== CONT  TestAccBasicServiceAccount
=== CONT  TestAccBasicServiceAccountWithNamespaceAccesses
--- PASS: TestAccBasicUser (12.21s)
=== CONT  TestAccNamespaceRenameForcesReplacement
--- PASS: TestAccBasicServiceAccount (12.25s)
=== CONT  TestAccNamespaceWithSearchAttributes
--- PASS: TestAccBasicNamespaceWithCertFilters (105.90s)
=== CONT  TestAccSpacesBetweenCertificateStrings
--- PASS: TestAccNamespaceWithSearchAttributesUpdate (112.80s)
--- PASS: TestAccNamespaceImport (121.79s)
--- PASS: TestAccNamespaceWithCodecServer (122.24s)
--- PASS: TestAccBasicServiceAccountWithNamespaceAccesses (122.86s)
--- PASS: TestAccBasicNamespace (123.71s)
--- PASS: TestAccBasicUserWithNamespaceAccesses (127.84s)
--- PASS: TestAccNamespaceImportSearchAttribute (134.69s)
--- PASS: TestAccNamespaceWithSearchAttributes (174.98s)
--- PASS: TestAccSpacesBetweenCertificateStrings (106.63s)
--- PASS: TestAccNamespaceRenameForcesReplacement (208.08s)
PASS
ok      github.com/temporalio/terraform-provider-temporalcloud/internal/provider        228.871s
=== 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
Copy link
Contributor Author

@jlacefie I added the sample to this PR! I will also add it for other PRs

Copy link
Collaborator

@swgillespie swgillespie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look great, thank you!


### Optional

- `namespace_accesses` (Attributes List) The list of namespace accesses. (see [below for nested schema](#nestedatt--namespace_accesses))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking feedback, but just so you know - we've had some issues (#119, #116, #115) that have arisen from this tight coupling of users and namespace accesses as part of the same resource. I sketched out #122 but I haven't finished the full idea yet, but my thinking here was to add another resource that represents a namespace access that can be manipulated even if the user object is referenced as a data source. Something we might also want to do here, too.

@swgillespie swgillespie merged commit 09c4790 into temporalio:main Oct 2, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add Service Account resource support
3 participants