github.com/graywolf-at-work-2/terraform-vendor@v1.4.5/internal/configs/testdata/config-diagnostics/pass-inherited-provider/main.tf (about)

     1  provider "test" {
     2    value = "ok"
     3  }
     4  
     5  module "mod" {
     6    source = "./mod"
     7  }
     8  
     9  # FIXME: This test is for an awkward interaction that we've preserved for
    10  # compatibility with what was arguably a bug in earlier versions: if a
    11  # child module tries to use an inherited provider configuration explicitly by
    12  # name then Terraform would historically use the wrong provider configuration.
    13  #
    14  # Since we weren't able to address that bug without breaking backward
    15  # compatibility, instead we emit a warning to prompt the author to be explicit,
    16  # passing in the configuration they intend to use.
    17  #
    18  # This case is particularly awkward because a change in the child module
    19  # (previously referring to a provider only implicitly, but now naming it
    20  # explicitly) can cause a required change in _this_ module (the caller),
    21  # even though the author of the child module would've seen no explicit warning
    22  # that they were making a breaking change. Hopefully we can improve on this
    23  # in a future language edition.