This project is mirrored from https://:*****@github.com/hashicorp/terraform.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 01 Apr, 2020 2 commits
  2. 31 Mar, 2020 1 commit
  3. 27 Mar, 2020 8 commits
  4. 26 Mar, 2020 6 commits
  5. 25 Mar, 2020 23 commits
    • James Bardin's avatar
      comment updates · 4f1692cf
      James Bardin authored
      4f1692cf
    • James Bardin's avatar
      don't log path in EvalRaw · 5810261a
      James Bardin authored
      eval nodes no longer always have a context path
      5810261a
    • James Bardin's avatar
      module expansion test · 04a117b2
      James Bardin authored
      simplify the test a bit and add a few more combinations to the config
      04a117b2
    • James Bardin's avatar
      enable count and for_each in configuration · cd045f6f
      James Bardin authored
      cd045f6f
    • James Bardin's avatar
      orphan resources needs to use AbsResource · 8eb3f2cf
      James Bardin authored
      The expand logic was separated into
      nodeExpandRefreshableManagedResource, but the orphan logic wasn't
      updated.
      8eb3f2cf
    • James Bardin's avatar
      cleanup some expanders · 7f0199ba
      James Bardin authored
      7f0199ba
    • James Bardin's avatar
      remove UnkeyedInstanceShim from some provider nodes · 2474b87f
      James Bardin authored
      Remove the shims where they aren't necessary from the Init and Close
      provider nodes. This also removed some provider path checks from the
      builtin eval context, which cannot be resolved since the context may not
      be created with a ModuleInstance path.
      2474b87f
    • James Bardin's avatar
      use addrs.ConfigResource for dependency tracking · b3fc0dab
      James Bardin authored
      We can't get module instances during transformation, so we need to
      reduce the Dependencies to using `addrs.ConfigResource` for now.
      b3fc0dab
    • James Bardin's avatar
      create refresh node expanders · 0afa3710
      James Bardin authored
      0afa3710
    • James Bardin's avatar
      Add Path to more nodes that require it. · 74d85aa9
      James Bardin authored
      74d85aa9
    • James Bardin's avatar
      NewNodeAbstractResource accepts a ResourceConfig · 0b85eeab
      James Bardin authored
      Use the new addrs type here.
      
      Also remove the uniqueMap from the config transformer. We enforce
      uniqueness during config loading, and this is more likely to have false
      positives due to stringification than anything.
      0b85eeab
    • James Bardin's avatar
      create nodeExpandApplyableResource · 23cebc52
      James Bardin authored
      Resources also need to be expanded during apply, which cannot be done
      via EvalTree due to the lack of EvalContext.
      23cebc52
    • James Bardin's avatar
      expand planned resources · 40f09027
      James Bardin authored
      While the Expander itself now handles the recursive expansion of
      modules, Resources themselves still need to be expanded twice, because
      the evaluation of the Resource, which entails evaluating the for_each or
      count expressions, is separate from the ResourceInstance expansion.
      
      Add a nodeExpandPlannableResource to do handle this expansion to allow
      all NodePlannableResources to call EvalWriteResourceState with an
      absolute address.
      40f09027
    • James Bardin's avatar
      add EvalContext.WithPath · 0b025d74
      James Bardin authored
      As the Graph is walked, the current way to set the context path was to
      have the walker return a context from EnterPath. This required that
      every node know it's absolute path, which can no longer be the case
      during plan when modules have not been expanded.
      
      This introduces a new method called WithPath, which returns a copy of
      the context with the internal path updated to reflect the method
      argument. Any use of the EvalContext that requires knowing the path will
      now panic if it wasn't explicitly set to ensure that evaluations always
      occur in the correct path.
      
      Add EvalContext to the GraphWalker interface.
      EvalContext returns an EvalContext that has not yet set a path. This
      will allow us to enforce that all context operations requiring a module
      instance path will require that a path be explicitly set rather than
      evaluating within the wrong path.
      0b025d74
    • Martin Atkins's avatar
      internal/providercache: LinkFromOtherCache removes target, not source · 537c1bed
      Martin Atkins authored
      This was incorrectly removing the _source_ entry prior to creating the
      symlink, therefore ending up with a dangling symlink and no source file.
      
      This wasn't obvious before because the test case for LinkFromOtherCache
      was also incorrectly named and therefore wasn't running. Fixing the name
      of that test made this problem apparent.
      
      The TestLinkFromOtherCache test case now ends up seeing the final resolved
      directory rather than the symlink target, because of upstream changes
      to the internal/getproviders filesystem scanning logic to handle symlinks
      properly.
      537c1bed
    • Martin Atkins's avatar
      internal/getproviders: SearchLocalDirectory can handle symlinks · eb25fe8b
      Martin Atkins authored
      Previously this was failing to treat symlinks to directories as unpacked
      layout, because our file info was only an Lstat result, not a full Stat.
      
      Now we'll resolve the symlink first, allowing us to handle a symlink to
      a directory. That's important because our internal/providercache behavior
      is to symlink from one cache to another where possible.
      eb25fe8b
    • Martin Atkins's avatar
      internal/{getproviders,providercache}: improved trace logging · ad154594
      Martin Atkins authored
      There's a lot going on in these functions that can be hard to follow from
      the outside, so we'll add some additional trace logging so that we can
      more easily understand why things are behaving the way they are.
      ad154594
    • Martin Atkins's avatar
      internal/providercache: add windows test fixture · 391ca0c9
      Martin Atkins authored
      This was accidentally left out of an earlier commit due to our top-level
      .gitignore file containing *.exe as an ignore pattern.
      391ca0c9
    • Pam Selle's avatar
      34de1453
    • James Bardin's avatar
      Merge pull request #24454 from hashicorp/jbardin/expand-resource · c7e2bace
      James Bardin authored
      Expander.ExpandResource cannot expand all modules
      c7e2bace
    • Martin Atkins's avatar
      internal/providercache: Installation from HTTP URLs and local archives · 807267d1
      Martin Atkins authored
      When a provider source produces an HTTP URL location we'll expect it to
      resolve to a zip file, which we'll first download to a temporary
      directory and then treat it like a local archive.
      
      When a provider source produces a local archive path we'll expect it to
      be a zip file and extract it into the target directory.
      
      This does not yet include an implementation of installing from an
      already-unpacked local directory. That will follow in a subsequent commit,
      likely following a similar principle as in Dir.LinkFromOtherCache.
      807267d1
    • Martin Atkins's avatar
      command: Expose providercache package objects for use elsewhere · 754b7ebb
      Martin Atkins authored
      These new functions allow command implementations to get hold of the
      providercache objects and installation source object derived from the
      current CLI configuration.
      754b7ebb
    • Martin Atkins's avatar
      internal/getproviders: Exit early if MultiSource has no sources · e4d7a71d
      Martin Atkins authored
      The MultiSource isn't actually properly implemented yet, but this is a
      minimal implementation just for the case where there are no underlying
      sources at all, because we use an empty MultiSource as a placeholder
      when a test in the "command" package fails to explicitly populate a
      ProviderSource.
      e4d7a71d