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

terraform: Relax provider config ref constraints #25420

Merged
merged 1 commit into from
Jun 29, 2020

Commits on Jun 29, 2020

  1. terraform: Relax provider config ref constraints

    When configuring providers, it is normally valid to refer to any value
    which is known at apply time. This can include resource instance
    attributes, variables, locals, and so on.
    
    The import command has a simpler graph evaluation, which means that
    many of these values are unknown. We previously prevented this from
    happening by restricting provider configuration references to input
    variables (#22862), but this was more restrictive than is necessary.
    
    This commit changes how we verify provider configuration for import.
    We no longer inspect the configuration references during graph building,
    because this is too early to determine if these values will become known
    or not.
    
    Instead, when the provider is configured during evaluation, we
    check if the configuration value is wholly known. If not, we fail with a
    diagnostic error.
    
    Includes a test case which verifies that providers can now be configured
    using locals as well as vars, and an updated test case which verifies
    that providers cannot be configured with references to resources.
    alisdair committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    ac99a3b View commit details
    Browse the repository at this point in the history