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 write-only attributes data_wo and binary_data_wo to kubernetes_secret_v1 #2692

Merged
merged 12 commits into from
Feb 26, 2025

Conversation

jrhouston
Copy link
Collaborator

Description

This PR introduces write-only attributes to the kubernetes_secret_v1 resource.

Acceptance tests

NOTE: Acceptance tests were run against v1.11.0-rc1

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

TF_ACC=1 go test "/Users/john/dev/hashicorp/terraform-provider-kubernetes/kubernetes" -v -vet=off -count=1 -run TestAccKubernetesSecretV1 -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesSecretV1Data_empty
=== PAUSE TestAccKubernetesSecretV1Data_empty
=== RUN   TestAccKubernetesSecretV1Data_basic_data
=== PAUSE TestAccKubernetesSecretV1Data_basic_data
=== RUN   TestAccKubernetesSecretV1Data_modified
=== PAUSE TestAccKubernetesSecretV1Data_modified
=== RUN   TestAccKubernetesSecretV1_basic
=== PAUSE TestAccKubernetesSecretV1_basic
=== RUN   TestAccKubernetesSecretV1_immutable
=== PAUSE TestAccKubernetesSecretV1_immutable
=== RUN   TestAccKubernetesSecretV1_dotInName
=== PAUSE TestAccKubernetesSecretV1_dotInName
=== RUN   TestAccKubernetesSecretV1_generatedName
=== PAUSE TestAccKubernetesSecretV1_generatedName
=== RUN   TestAccKubernetesSecretV1_binaryData
=== PAUSE TestAccKubernetesSecretV1_binaryData
=== RUN   TestAccKubernetesSecretV1_data_wo
=== PAUSE TestAccKubernetesSecretV1_data_wo
=== RUN   TestAccKubernetesSecretV1_binaryData_wo
=== PAUSE TestAccKubernetesSecretV1_binaryData_wo
=== RUN   TestAccKubernetesSecretV1_service_account_token
=== PAUSE TestAccKubernetesSecretV1_service_account_token
=== CONT  TestAccKubernetesSecretV1Data_empty
=== CONT  TestAccKubernetesSecretV1_generatedName
=== CONT  TestAccKubernetesSecretV1_service_account_token
=== CONT  TestAccKubernetesSecretV1_basic
=== CONT  TestAccKubernetesSecretV1_data_wo
=== CONT  TestAccKubernetesSecretV1_dotInName
=== CONT  TestAccKubernetesSecretV1_binaryData_wo
=== CONT  TestAccKubernetesSecretV1_binaryData
--- PASS: TestAccKubernetesSecretV1_generatedName (8.38s)
=== CONT  TestAccKubernetesSecretV1_immutable
--- PASS: TestAccKubernetesSecretV1_data_wo (8.92s)
=== CONT  TestAccKubernetesSecretV1Data_modified
--- PASS: TestAccKubernetesSecretV1_service_account_token (10.71s)
=== CONT  TestAccKubernetesSecretV1Data_basic_data
--- PASS: TestAccKubernetesSecretV1Data_empty (11.04s)
--- PASS: TestAccKubernetesSecretV1_dotInName (14.09s)
--- PASS: TestAccKubernetesSecretV1Data_modified (6.51s)
--- PASS: TestAccKubernetesSecretV1_binaryData_wo (15.57s)
--- PASS: TestAccKubernetesSecretV1Data_basic_data (5.20s)
--- PASS: TestAccKubernetesSecretV1_binaryData (16.32s)
--- PASS: TestAccKubernetesSecretV1_basic (17.47s)
--- PASS: TestAccKubernetesSecretV1_immutable (11.05s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   20.389s

Release Note

Release note for CHANGELOG:

...

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@jrhouston jrhouston requested a review from a team as a code owner February 20, 2025 18:42
@@ -108,3 +108,27 @@ func (s *RawProviderServer) MoveResourceState(ctx context.Context, req *tfprotov
resp := &tfprotov5.MoveResourceStateResponse{}
return resp, nil
}

func (s *RawProviderServer) OpenEphemeralResource(ctx context.Context, req *tfprotov5.OpenEphemeralResourceRequest) (*tfprotov5.OpenEphemeralResourceResponse, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Had to add these stubs because Updating the SDK dependencies brought in this interface.

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! ✍🏻

@jrhouston jrhouston merged commit c2d1214 into main Feb 26, 2025
83 checks passed
@jrhouston jrhouston deleted the writeonly-attrs branch February 26, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants