terraform-provider-kubernetes icon indicating copy to clipboard operation
terraform-provider-kubernetes copied to clipboard

Enable creation of `persistent_volume` resources with `generate_name`

Open rwe opened this issue 3 years ago • 1 comments

Description

This allows persistent_volume resources to be configured with generate_name as with nearly all other resources in this provider. This is useful for preventing certain kinds of resource deadlocks when using create_before_destroy, for example.

The integration test creates a PV with generate_name prefix and checks that a name with that prefix was returned by the API server, along with a random suffix.

Acceptance tests

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

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccKubernetesPersistentVolume_minimalGenerateName'
==> Checking that code complies with gofmt requirements...
go vet .
TF_ACC=1 go test "/…/terraform-provider-kubernetes/kubernetes" -v -run=TestAccKubernetesPersistentVolume_minimalGenerateName -timeout 3h
=== RUN   TestAccKubernetesPersistentVolume_minimalGenerateName
--- PASS: TestAccKubernetesPersistentVolume_minimalGenerateName (7.53s)
PASS
ok      github.com/hashicorp/terraform-provider-kubernetes/kubernetes   8.043s

Release Note

Release note for CHANGELOG:

Allow `persistent_volume` resources to be created with `generate_name`

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

rwe avatar Jul 28 '22 00:07 rwe

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Jul 28 '22 00:07 hashicorp-cla