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

tfsdk: Move Resource ImportState method to optional ResourceWithImportState interface #297

Merged
merged 4 commits into from
Apr 25, 2022

Commits on Apr 21, 2022

  1. tfsdk: Move Resource ImportState method to optional ResourceWithImpor…

    …tState interface
    
    Reference: #160
    
    Due to provider developer feedback, it has been suggested to make the current `Resource` interface `ImportState` method optional. This change accomplishes that by moving the existing method signature to a new `ResourceWithImportState` interface.
    
    This also deprecates the `ResourceImportStateNotImplemented()` function. Providers can now signal that a resource does not support import by omitting the `ImportState` method and the framework will automatically return an error diagnostic. From a quick GitHub search, it appeared there was only one usage of a custom error message outside the framework testing. However, it was only being used to include the resource type in the message and was of no real utility over the generic messaging. A code comment is left with a suggested implementation, should there be a feature request for customized messaging.
    bflad committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    706ef18 View commit details
    Browse the repository at this point in the history
  2. tfsdk: Remove unused code

    bflad committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    a094085 View commit details
    Browse the repository at this point in the history
  3. Update CHANGELOG for #297

    bflad committed Apr 21, 2022
    Configuration menu
    Copy the full SHA
    5050977 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2022

  1. Configuration menu
    Copy the full SHA
    3665f66 View commit details
    Browse the repository at this point in the history