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

always evaluate module outputs during destroy #33462

Merged
merged 1 commit into from
Jul 7, 2023

Commits on Jun 30, 2023

  1. always evaluate module outputs during destroy

    A module output is generally not used during destroy, however it must be
    evaluated when its value is used by a provider for configuration,
    because that configuration is not stored between walks.
    
    There was an oversight in the output expansion node where the output
    node was not created because the operation was destroy, and module
    outputs have nothing to destroy. This however skipped evaluation when
    the output is needed by a provider as mentioned above. Because of the
    way an implied plan is stored internally when executing `terraform
    destroy`, this went unnoticed by the test.
    
    Allowing the output to be evaluated during destroy fixes the issue, and
    should be acceptable because an output is classified as temporary in the
    graph, and will be pruned when not actually needed.
    
    Update the existing test to serialize the plan, which triggers the
    failure.
    jbardin committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    b45de53 View commit details
    Browse the repository at this point in the history