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 field for PersistentVolumeClaim resource #2644

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JaylonmcShan03
Copy link
Contributor

@JaylonmcShan03 JaylonmcShan03 commented Dec 9, 2024

Description

Addresses #2608

This pull request introduces the data_source field for the PersistentVolumeClaim resource.

Changes

  1. Added data_source field to the PersistentVolumeClaim schema.
  2. Implemented validation in the Create function to ensure the specified data_source PVC exists.
  3. Included the new field in flatten and expand method.

Acceptance tests

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

Output from acceptance testing:

2024-12-09T10:14:13.480-0600 [DEBUG] sdk.helper_resource: Called TestCase CheckDestroy: test_step_number=2 test_terraform_path=/opt/homebrew/bin/terraform test_name=TestAccKubernetesPersistentVolumeClaimV1_dataSource test_working_directory=/var/folders/bp/l16ph9cj7958ml9t254_zcv00000gn/T/plugintest3860028569
2024-12-09T10:14:13.482-0600 [DEBUG] sdk.helper_resource: Finished TestCase: test_name=TestAccKubernetesPersistentVolumeClaimV1_dataSource
--- PASS: TestAccKubernetesPersistentVolumeClaimV1_dataSource (3.21s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   3.824s
jaylon.mcshan@jaylon terraform-provider-kubernetes % 


2024-12-09T10:15:00.499-0600 [DEBUG] sdk.helper_resource: Started sdkv2 provider instance server: tf_provider_addr=registry.terraform.io/hashicorp/kubernetes test_name=TestAccKubernetesPersistentVolumeClaimV1_invalidDataSource test_terraform_path=/opt/homebrew/bin/terraform test_working_directory=/var/folders/bp/l16ph9cj7958ml9t254_zcv00000gn/T/plugintest1113338307 test_step_number=1
2024-12-09T10:15:00.558-0600 [DEBUG] sdk.helper_resource: Stopping providers: test_working_directory=/var/folders/bp/l16ph9cj7958ml9t254_zcv00000gn/T/plugintest1113338307 test_step_number=1 test_name=TestAccKubernetesPersistentVolumeClaimV1_invalidDataSource test_terraform_path=/opt/homebrew/bin/terraform
2024-12-09T10:15:00.560-0600 [DEBUG] sdk.helper_resource: Finished TestCase: test_name=TestAccKubernetesPersistentVolumeClaimV1_invalidDataSource
--- PASS: TestAccKubernetesPersistentVolumeClaimV1_invalidDataSource (0.51s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   1.248s
jaylon.mcshan@jaylon terraform-provider-kubernetes %
$ make testacc TESTARGS='-run=TestAccXXX'

...

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

@github-actions github-actions bot added the size/L label Dec 9, 2024
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.

1 participant