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

lang/funcs: Filesystem functions hint about dynamically-generated files #25361

Merged
merged 1 commit into from
Jun 24, 2020

Commits on Jun 24, 2020

  1. lang/funcs: Filesystem functions hint about dynamically-generated files

    The functions that interact with the filesystem are, by design, restricted
    to reading files that are distributed as a static part of the
    configuration, and cannot be used to interact with files that are
    generated dynamically by resources in the configuration.
    
    However, new users have often yet developed a correct mental model of how
    Terraform execution works and are confused by the terse error messages
    these functions return. As an interim step to help some of those users,
    this just adds some more commentary to the error message which gives a
    vague, generic directive to look to attributes of the resource that is
    generating the file, which should (if it's designed well) export
    attributes that allow the resulting file to be used effectively with
    common patterns, such as checksums of the content of the generated file.
    
    The error message here is not particularly attractive due to the
    limitations of the context where it's being returned from, but I'm
    accepting that here in the interest of keeping this change simple, so we
    can give a hint about a case that seems to frequently generate new-user
    questions. We may iterate further on the presentation of this message
    later.
    apparentlymart committed Jun 24, 2020
    Configuration menu
    Copy the full SHA
    8439a36 View commit details
    Browse the repository at this point in the history