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

Call PlanResourceChange for destroy operations #31179

Merged
merged 9 commits into from Jul 6, 2022
Merged

Commits on Jul 6, 2022

  1. Copy the full SHA
    e95bfe6 View commit details
    Browse the repository at this point in the history
  2. plan resource destroy

    Call PlanResourceDestroy during a destroy plan.
    
    This allows providers two new abilities:
    - They can evaluate if the plan is valid, notifying users of any
      potential errors before an apply is started, which may not be able to
      complete.
    - They can inspect and modify their private data during a destroy plan
      just like they can with an other plan operation.
    jbardin committed Jul 6, 2022
    Copy the full SHA
    ccd2c78 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    acba115 View commit details
    Browse the repository at this point in the history
  4. fixup broken test fixtures

    some of the minimal test provider implementations didn't check for null
    values.
    jbardin committed Jul 6, 2022
    Copy the full SHA
    96c7205 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    9487cfb View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    b9f1a5a View commit details
    Browse the repository at this point in the history
  7. check PlanDestroy capability in plugins

    This is most easily handled in the plugin code, without involving
    Terraform core.
    
    The biggest change here other than checking the PlanDestroy capability,
    is the removal of the schema helper methods in the plugins. With the
    addition of the capabilities field, combined with the necessity of
    checking diagnostics from the schema, the helpers have outlived their
    usefulness. Perhaps there's a better pattern for these repetitive calls,
    but for now there isn't too extra verbosity involved.
    jbardin committed Jul 6, 2022
    Copy the full SHA
    6706d52 View commit details
    Browse the repository at this point in the history
  8. add e2e test with provider schema capabilities

    enable destroy planning for the simple providers used in the e2e tests
    jbardin committed Jul 6, 2022
    Copy the full SHA
    fd742cd View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    26c569e View commit details
    Browse the repository at this point in the history