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. 08 Nov, 2022 1 commit
  2. 11 Oct, 2022 3 commits
  3. 10 Oct, 2022 1 commit
  4. 06 Oct, 2022 7 commits
  5. 05 Oct, 2022 4 commits
  6. 04 Oct, 2022 8 commits
    • James Bardin's avatar
      Merge pull request #31878 from hashicorp/jbardin/import-plan-new · 3047b8c1
      James Bardin authored
      evaluation of missing instances during import
      3047b8c1
    • James Bardin's avatar
      unknown evaluation of missing instances in import · 041d9d3e
      James Bardin authored
      Because import does not yet plan new instances as part of the import
      process, we can end up evaluating references to resources which have no
      state at all. The fallback for this situation could result in slightly
      better values during import. The count and for_each values were
      technically incorrect, since the length is not known to be zero, and the
      single instance does have a concrete type which we can return.
      041d9d3e
    • James Bardin's avatar
      Merge pull request #31917 from hashicorp/jbardin/destroy-edge-cycles · c1e0b046
      James Bardin authored
      Extract more exact provider name when checking for destroy cycles
      c1e0b046
    • James Bardin's avatar
      test for cycle around aliased provider · c296172b
      James Bardin authored
      c296172b
    • James Bardin's avatar
      check detailed provider for destroy edge cycles · 036fb9c1
      James Bardin authored
      When we checked for cycles with destroy edges around providers, it was
      only for providers of a different type, but one can do the same thing
      with the same provider under different local aliases. Check to see if
      the provider also contains an alias, or is defined absolutely in some
      other way. The absolute accuracy here isn't critical, since in most
      cases these edges are not required for correct results, but finding a
      correct and consistent method for determining when these edges are
      needed is going to take more research.
      
      There was also an oversight fixed here where the basic
      creator->destroyer edges were added _after_ the cycle checks, limiting
      their utility. The ordering of the additions was swapped to make sure
      all cycles are noticed.
      036fb9c1
    • James Bardin's avatar
      Merge pull request #31914 from hashicorp/jbardin/ignore-all-legacy · 162b7274
      James Bardin authored
      special handling for legacy `ignore_changes = all`
      162b7274
    • Sarah French's avatar
      Update CHANGELOG.md · 65b531c4
      Sarah French authored
      65b531c4
    • Sarah French's avatar
      Add customer-managed encryption key (KMS) support to GCS backend (#31786) · d43ec0f3
      Sarah French authored
      
      * Add ability to use customer-managed KMS key to encrypt state, add acceptance tests
      
      * Change test names for different encrpytion methods
      
      * Commit files updated by `go mod tidy`
      
      * Add guard against missing ENVs to `setupKmsKey` func
      
      * Update KMS setup function to get credentials from ENVs
      
      * Update tests to not include zero-values in config
      
      This means that default values are supplied later by TF instead of supplied as config from the user
      
      This also avoids issues related to making field conflicts explicit with `ConflictsWith`
      
      * Make `encryption_key` & `kms_encryption_key` conflicting fields
      
      Removing the Default from `encryption_key` does not appear to be a breaking change when tested manually
      
      * Add ability to set `kms_encryption_key` via ENV
      
      * Refactor `encryption_key` to use `DefaultFunc` to access ENV, if set
      
      * Remove comments
      
      * Update `gcs` backend docs & descriptions in schema
      
      * Update `gcs` backend docs to include information on encryption methods
      
      * Apply technical writing suggestions from code review
      Co-authored-by: default avatarMatthew Garrell <69917312+mgarrell777@users.noreply.github.com>
      
      * Update documentation to remove passive voice
      
      * Change use of context in tests, add inline comment, update logs
      
      * Remove use of `ReadPathOrContents` for new field
      Co-authored-by: default avatarMatthew Garrell <69917312+mgarrell777@users.noreply.github.com>
      d43ec0f3
  7. 03 Oct, 2022 3 commits
  8. 30 Sep, 2022 3 commits
    • Martin Atkins's avatar
      Update CHANGELOG.md · 0803ea3f
      Martin Atkins authored
      0803ea3f
    • Martin Atkins's avatar
      website: Remove warning that yamlencode is experimental · f260ed11
      Martin Atkins authored
      We originally included this warning because the go-cty-yaml module wasn't
      yet stable and it was also not extensively tested so it wasn't yet clear
      if its behavior would need to change in some less common cases we hadn't
      tested so far.
      
      However, go-cty-yaml had its v1.0.0 release some time ago and is now
      committed to preserving its current Marshal output unless it is found to
      be non-compliant with the YAML 1.2 specification. This doc change means
      that Terraform's yamlencode is now adopting a similar posture:
       - The exact style details produced by the function for a particular input
         are now frozen. It'll change only if we find that the function is
         producing output that isn't valid per the YAML spec.
       - If someone finds a YAML parser that cannot parse what yamlencode
         produces but what it produces is valid per the YAML 1.2 spec, we'll
         expect the parser to be corrected to better support the spec rather
         than changing the yamlencode output.
      
      There may be pragmatic exceptions if we encounter a situation we cannot
      anticipate yet, but the above will be our general rule. This is really
      just a specialization of the spirit of the v1.x Compatibility Promises,
      tailored specifically to this function.
      f260ed11
    • James Bardin's avatar
      special handling for legacy ignore_changes = all · 92f3a835
      James Bardin authored
      Legacy providers expect Terraform to be able to clean up invalid plans
      and computed attributes. Add a special case for the LegacyTypeSystem to
      revert `ignore_changes = all` to the complete prior state.
      92f3a835
  9. 29 Sep, 2022 3 commits
    • Martin Atkins's avatar
      core: Don't re-register checkable outputs during the apply step · 6b290cf1
      Martin Atkins authored
      Once again we're caught out by sharing the same output value node type
      between the plan phase and the apply phase. To allow for some slight
      variation between plan and apply without drastic refactoring here we just
      add a new flag to nodeExpandOutput which is true only during the planning
      phase.
      
      This then allows us to register the checkable objects only during the
      planning phase and not incorrectly re-register them during the apply phase.
      It's incorrect to re-register during apply because we carry over the
      planned checkable objects from the plan phase into the apply phase so we
      can guarantee that the final state will have all of the same checkable
      objects that the plan did.
      
      This avoids a panic during the apply phase from the incorrect duplicate
      registration.
      6b290cf1
    • kmoe's avatar
      Update CHANGELOG.md · 62d22a94
      kmoe authored
      62d22a94
    • Radek Simko's avatar
  10. 28 Sep, 2022 1 commit
  11. 27 Sep, 2022 1 commit
  12. 26 Sep, 2022 5 commits
    • zisom-hc's avatar
      Update custom-conditions.mdx · d08fcd63
      zisom-hc authored
      Made a change to code example within the *Preconditions and Postconditions* section so that it technically makes sense; prior it was missing the data resource that was being called within the precondition lifecycle event on line 135, and the aws_instance resource was not utilizing the ami being provided by the data source in line 129, so i changed that as well.
      d08fcd63
    • Martin Atkins's avatar
      core: Document that TransformRoot must produce coalescable node · cc964e6b
      Martin Atkins authored
      We use a non-pointer value for this particular node, which means that
      there can never be two root nodes in the same graph: the graph
      implementation will just coalesce them together when a second one is added.
      
      Our resource expansion code is relying on that coalescing so that it can
      subsume together multiple graphs for different modules instances into a
      single mega-graph with all instances across all module instances, with
      any root nodes coalescing together to produce a single root.
      
      This also updates one of the context tests that exercises resource
      expansion so that it will generate multiple resource instance nodes per
      module and thus potentially have multiple roots to coalesce together.
      However, we aren't currently explicitly validating the return values from
      DynamicExpand and so this test doesn't actually fail if the coalescing
      doesn't happen. We may choose to validate the DynamicExpand result in a
      later commit in order to make it more obvious if future modifications fail
      to uphold this invariant.
      cc964e6b
    • Martin Atkins's avatar
      core: Eliminate NodePlannableResource indirection · 2e177cd6
      Martin Atkins authored
      We previously did two levels of DynamicExpand to go from ConfigResource to
      AbsResource and then from AbsResource to AbsResourceInstance.
      
      We'll now do the full expansion from ConfigResource to AbsResourceInstance
      in a single DynamicExpand step inside nodeExpandPlannableResource.
      
      The new approach is essentially functionally equivalent to the old except
      that it fixes a bug in the previous implementation: we will now call
      checkState.ReportCheckableObjects only once for the entire set of
      instances for a particular resource, which is what the checkable objects
      infrastructure expects so that it can always mention all of the checkable
      objects in the check report even if we bail out partway through due to
      a downstream error.
      
      This is essentially the same code but now turned into additional methods
      on nodeExpandPlannableResource instead of having the extra graph node
      type. This has the further advantage of this now being straight-through
      code with standard control flow, instead of the unusual inversion of
      control we were doing before bouncing in and out of different Execute and
      DynamicExpand implementations to get this done.
      2e177cd6
    • Martin Atkins's avatar
      core: DynamicExpand can return diagnostics · a9bd4099
      Martin Atkins authored
      We were previously _trying_ to handle diagnostics here but were not quite
      doing it right because we were testing whether the resulting error was
      nil rather than appending it to the diagnostics and then seeing if the
      result has errors.
      
      The difference here is important because it allows DynamicExpand to return
      warnings without associated errors when needed. Previously the graph
      walker would treat a warnings-only result as if it were an error.
      
      Ideally we'd change DynamicExpand to return diagnostics directly, but we
      previously decided against that because there were so many implementors
      to update, and my intent for this change is to be surgical in the update
      so we minimize risk of backporting the change into patch releases.
      a9bd4099
    • James Bardin's avatar
      Merge pull request #31871 from hashicorp/jbardin/remove-planned-during-import · dbaf6d63
      James Bardin authored
      RemovePlannedResourceInstanceObjects during import
      dbaf6d63