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

fix: align setup of resource and data source id for testing framework #303

Merged
merged 12 commits into from
Jul 20, 2023

Conversation

lechnerc77
Copy link
Member

Purpose

This PR contains the changes to have an aligned setup of the artificial ID field in resources and data sources that is needed for the Terraform plugin test framework. The changes comprise:

  • Mark the ID field as "computed"
  • Align the "DeprecationMessage" field
  • Align the "MarkdownDescription"
  • Use stringplanmodifier.UseStateForUnknown() in schema
  • Regenerate documentation
  • re-record test fixtures for resources

Closes #292

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[X] Bugfix
[ ] Feature
[ ] Refactoring (no functional changes, no api changes)
[X] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Test the code
go test ./...

What to Check

Verify that the following are valid

  • All tests are executed successfully

Other Information

Further information is available here: hashicorp/terraform-plugin-testing#84

@lechnerc77 lechnerc77 added bug Something isn't working documentation Improvements or additions to documentation labels Jul 20, 2023
@lechnerc77 lechnerc77 added this to the 0.2.0-beta1 - July release milestone Jul 20, 2023
@lechnerc77 lechnerc77 requested a review from kuntzed July 20, 2023 06:59
@lechnerc77 lechnerc77 self-assigned this Jul 20, 2023
@lechnerc77 lechnerc77 enabled auto-merge (squash) July 20, 2023 07:00
@lechnerc77 lechnerc77 requested review from kuntzed and removed request for kuntzed July 20, 2023 07:00
@lechnerc77 lechnerc77 disabled auto-merge July 20, 2023 07:21
@lechnerc77 lechnerc77 enabled auto-merge (squash) July 20, 2023 07:22
@lechnerc77 lechnerc77 requested a review from kuntzed July 20, 2023 07:22
@lechnerc77 lechnerc77 disabled auto-merge July 20, 2023 08:13
@lechnerc77 lechnerc77 enabled auto-merge (squash) July 20, 2023 08:13
@lechnerc77 lechnerc77 requested a review from kuntzed July 20, 2023 08:14
@lechnerc77 lechnerc77 merged commit 750b4fd into main Jul 20, 2023
10 checks passed
@lechnerc77 lechnerc77 deleted the fix-id-for-testing branch July 20, 2023 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify spec and initialization of deprecated id attributes
2 participants