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

Describe how to test a beta-only field of the resource generated by mmv1 #12798

Open
shotarok opened this issue Oct 15, 2022 · 1 comment
Open

Comments

@shotarok
Copy link
Contributor

shotarok commented Oct 15, 2022

Background

This is a feature request to add a description of how to test a beta-only field of the resource generated by mmv1. It took time for me to understand how to test a beta-only field. Updating a doc would help developers to define a new beta field in the future.

What kind of contribution is this issue about?

  • MMv1-based resource

Related PR(s), if any:

Details

In the above PR#6565, I needed to add a test for a beta-only field. I spent time reading the mmv1 code, and I understood adding min_version: beta to !ruby/object:Provider::Terraform::Examples generates a test in the beta provider, but not in the ga provider.

Therefore, I ended up defining two examples to test the beta-only field. One is without the beta-only field, which works for the ga and beta providers. Another is with the beta-only field, which works for the beta provider.

I'm not sure if this strategy is the best approach, but that'd be great if a doc in the magic-module repo has the description of how to test the beta-only field.

@shotarok
Copy link
Contributor Author

shotarok commented Oct 15, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants