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

backend/local: revert duplicate ctx creation #26041

Closed
wants to merge 5 commits into from

Commits on Aug 28, 2020

  1. backend/local: revert duplicate ctx creation

    A recent change to the backend had a side effect of causing all input
    vars to be requested twice (due to two calls to `contextDirect`) and
    provider input values to be omitted entirely (those were populated
    during Validate, but Validate was called on the "extra" context and not
    the returned context).
    
    This PR adds a Context.StatelessCopy function which returns a nearly-identical copy of
    a terraform.Context with the state "zeroed out", which can then be
    Validate()d. A better, future refactor should remove the need for this
    function and instead modify Validate() itself to ignore state.
    
    Fixes #26027
    
    I've added tests that confirm both behaviors; I am not sure what test
    covers the behavior that lead to this change in the first place but I
    did verify locally using the reproduction in the original PR.
    mildwonkey committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    c3de2f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aabd971 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9200fdb View commit details
    Browse the repository at this point in the history
  4. what is terraform even

    mildwonkey committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    e0587ad View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cfbabce View commit details
    Browse the repository at this point in the history