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. 03 Jun, 2021 10 commits
    • Kristin Laemmert's avatar
      tools: remove terraform-bundle. (#28876) · 5a48530f
      Kristin Laemmert authored
      * tools: remove terraform-bundle.
      
      terraform-bundle is no longer supported in the main branch of terraform. Users can build terraform-bundle from terraform tagged v0.15 and older.
      
      * add a README pointing users to the v0.15 branch
      5a48530f
    • Martin Atkins's avatar
      Update CHANGELOG.md · 79c61095
      Martin Atkins authored
      79c61095
    • Martin Atkins's avatar
      addrs: ModuleRegistryPackage for representing module registry packages · 51b0aee3
      Martin Atkins authored
      Previously we had a separation between ModuleSourceRemote and
      ModulePackage as a way to represent within the type system that there's an
      important difference between a module source address and a package address,
      because module packages often contain multiple modules and so a
      ModuleSourceRemote combines a ModulePackage with a subdirectory to
      represent one specific module.
      
      This commit applies that same strategy to ModuleSourceRegistry, creating
      a new type ModuleRegistryPackage to represent the different sort of
      package that we use for registry modules. Again, the main goal here is
      to try to reflect the conceptual modelling more directly in the type
      system so that we can more easily verify that uses of these different
      address types are correct.
      
      To make use of that, I've also lightly reworked initwd's module installer
      to use addrs.ModuleRegistryPackage directly, instead of a string
      representation thereof. This was in response to some earlier commits where
      I found myself accidentally mixing up package addresses and source
      addresses in the installRegistryModule method; with this new organization
      those bugs would've been caught at compile time, rather than only at
      unit and integration testing time.
      
      While in the area anyway, I also took this opportunity to fix some
      historical confusing names of fields in initwd.ModuleInstaller, to be
      clearer that they are only for registry packages and not for all module
      source address types.
      51b0aee3
    • Martin Atkins's avatar
      initwd: Fix registry acceptance tests for upstream registry changes · 7b2a0284
      Martin Atkins authored
      We have some tests in this package that install real modules from the real
      registry at registry.terraform.io. Those tests were written at an earlier
      time when the registry's behavior was to return the URL of a .tar.gz
      archive generated automatically by GitHub, which included an extra level
      of subdirectory that would then be reflected in the paths to the local
      copies of these modules.
      
      GitHub started rate limiting those tar archives in a way that Terraform's
      module installer couldn't authenticate to, and so the registry switched
      to returning direct git repository URLs instead, which don't have that
      extra subdirectory and so the local paths on disk now end up being a
      little different, because the actual module directories are at a different
      subdirectory of the package.
      7b2a0284
    • Martin Atkins's avatar
      configs: EntersNewPackage methods for descendant modules · 17b766c3
      Martin Atkins authored
      Now that we (in the previous commit) refactored how we deal with module
      sources to do the parsing at config loading time rather than at module
      installation time, we can expose a method to centralize the determination
      for whether a particular module call (and its resulting Config object)
      enters a new external package.
      
      We don't use this for anything yet, but in later commits we will use this
      for some cross-module features that are available only for modules
      belonging to the same package, because we assume that modules grouped
      together in a package can change together and thus it's okay to permit a
      little more coupling of internal details in that case, which would not
      be appropriate between modules that are versioned separately.
      17b766c3
    • Martin Atkins's avatar
      Refactoring of module source addresses and module installation · 1a8da653
      Martin Atkins authored
      It's been a long while since we gave close attention to the codepaths for
      module source address parsing and external module package installation.
      Due to their age, these codepaths often diverged from our modern practices
      such as representing address types in the addrs package, and encapsulating
      package installation details only in a particular location.
      
      In particular, this refactor makes source address parsing a separate step
      from module installation, which therefore makes the result of that parsing
      available to other Terraform subsystems which work with the configuration
      representation objects.
      
      This also presented the opportunity to better encapsulate our use of
      go-getter into a new package "getmodules" (echoing "getproviders"), which
      is intended to be the only part of Terraform that directly interacts with
      go-getter.
      
      This is largely just a refactor of the existing functionality into a new
      code organization, but there is one notable change in behavior here: the
      source address parsing now happens during configuration loading rather
      than module installation, which may cause errors about invalid addresses
      to be returned in different situations than before. That counts as
      backward compatible because we only promise to remain compatible with
      configurations that are _valid_, which means that they can be initialized,
      planned, and applied without any errors. This doesn't introduce any new
      error cases, and instead just makes a pre-existing error case be detected
      earlier.
      
      Our module registry client is still using its own special module address
      type from registry/regsrc for now, with a small shim from the new
      addrs.ModuleSourceRegistry type. Hopefully in a later commit we'll also
      rework the registry client to work with the new address type, but this
      commit is already big enough as it is.
      1a8da653
    • Martin Atkins's avatar
      addrs: Representation of module source addresses · 2e7db649
      Martin Atkins authored
      We've previously had the syntax and representation of module source
      addresses pretty sprawled around the codebase and intermingled with other
      systems such as the module installer.
      
      I've created a factored-out implementation here with the intention of
      enabling some later refactoring to centralize the address parsing as part
      of configuration decoding, and thus in turn allow the parsing result to
      be seen by other parts of Terraform that interact with configuration
      objects, so that they can more robustly handle differences between local
      and remote modules, and can present module addresses consistently in the
      UI.
      2e7db649
    • Martin Atkins's avatar
      getmodules: Beginnings of a new package about Terraform module packages · f2593564
      Martin Atkins authored
      This new package aims to encapsulate all of our interactions with
      go-getter to fetch remote module packages, to ensure that the rest of
      Terraform will only use the small subset of go-getter functionality that
      our modern module installer uses.
      
      In older versions of Terraform, go-getter was the entire implementation
      of module installation, but along the way we found that several aspects of
      its design are poor fit for Terraform's needs, and so now we're using it
      as just an implementation detail of Terraform's handling of remote module
      packages only, hiding it behind this wrapper API which exposes only
      the services that our module installer needs.
      
      This new package isn't actually used yet, but in a later commit we will
      change all of the other callers to go-getter to only work indirectly
      through this package, so that this will be the only package that actually
      imports the go-getter packages.
      f2593564
    • Martin Atkins's avatar
      addrs: Rename DefaultRegistryHost to DefaultProviderRegistryHost · e5f52e56
      Martin Atkins authored
      As the comment notes, this hostname is the default for provide source
      addresses. We'll shortly be adding some address types to represent module
      source addresses too, and so we'll also have DefaultModuleRegistryHost
      for that situation.
      
      (They'll actually both contain the the same hostname, but that's a
      coincidence rather than a requirement.)
      e5f52e56
    • Martin Atkins's avatar
      docs: Some notes on adopting new Unicode versions · 0f015a7f
      Martin Atkins authored
      Previously this is a task that I've just taken on using my own knowledge
      of how these parts fit together, but that's not at all a sustainable
      situation, and so here I've just documented the steps I've followed in for
      previous Unicode version upgrades, and thus which I'd expect to follow
      for future Unicode version upgrades too.
      
      I hope this is also a somewhat-interesting overview of how Terraform makes
      use of Unicode, even for folks who are just working on the other relevant
      features of Terraform and not specifically trying to change Terraform's
      Unicode support.
      
      Since I'm the primary maintainer of two of the dependencies involved in
      this it seems likely that following this process will still involve me
      in _some_ capacity, but hopefully only necessarily in the form of
      reviewing PRs and cutting new releases of those libraries.
      0f015a7f
  2. 02 Jun, 2021 6 commits
  3. 29 May, 2021 1 commit
  4. 28 May, 2021 2 commits
  5. 27 May, 2021 4 commits
  6. 26 May, 2021 6 commits
  7. 25 May, 2021 7 commits
  8. 24 May, 2021 3 commits
  9. 20 May, 2021 1 commit