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

Import Testing Additions In Documentation #191

Open
3 of 6 tasks
tgoodsell-tempus opened this issue Sep 22, 2023 · 0 comments
Open
3 of 6 tasks

Import Testing Additions In Documentation #191

tgoodsell-tempus opened this issue Sep 22, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@tgoodsell-tempus
Copy link

tgoodsell-tempus commented Sep 22, 2023

Does this documentation exist?

  • This is new documentation
  • This is an enhancement to existing documentation

Where would you expect to find this documentation?

  • On terraform.io
  • In the GoDoc for this module
  • In this repo as a markdown file
  • Somewhere else

Details

I would expect this to be an addition to the TestStep Documentation

This is intended to provide more clear and specific guidance on using the Import test functionality of a TestStep.

Description

While there is references to this in the SDKv2 Docs: https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/import#recommendations-for-import

This is not found in the corresponding Framework docs: https://developer.hashicorp.com/terraform/plugin/framework/resources/import

Additionally, the TestStep docs do not discuss it in much detail.

From a "New User" perspective, writing a Import test is ambiguous, since the "conventional wisdom" would suggest creating a resource outside of the Terraform execution, then using Terraform to import that, since that's the main use case for an import. However, the "Import" test step functionality is intended for the user to "Create" the resource using the previous TestSteps, then the import happens in a special process / state directory to verify that function.

I think specifically calling out this process and the associated details around Import testing in the TestCase docs is a necessary addition to ensure developers understand clearly how to implement Import testing for their resources.

References

@tgoodsell-tempus tgoodsell-tempus added the documentation Improvements or additions to documentation label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant