Commit Graph

31220 Commits

Author SHA1 Message Date
James Bardin
d199d427a1 remove unused factory functions 2023-07-06 10:37:35 -04:00
Liam Cervante
ea162f6ab5
[testing framework] prepare for beta phase of development (#33445) 2023-07-06 15:53:18 +02:00
Liam Cervante
3613e972c5
Plan renderer: Support users indexing integer paths with stringified numbers (#33475) 2023-07-05 11:11:02 +02:00
Alisdair McDiarmid
ad2298b114
Merge pull request #33108 from unRob/patch-1
Return debuggable CAS errors on consul state put
2023-06-30 09:50:11 -04:00
rita
76290e897e
Merge pull request #33441 from ctrombley/docs/checks-for-continuous-validation
docs: dissociate CV from preconditions and postconditions
2023-06-29 07:49:25 -07:00
Chris Trombley
6d817660eb docs: dissociate CV from preconditions and postconditions 2023-06-28 16:40:49 -07:00
James Bardin
f2b34c5f95 update CHANGELOG.md 2023-06-28 14:02:11 -04:00
James Bardin
3fcf16f0a1
Merge pull request #33403 from hashicorp/jbardin/deps-with-no-instances
connect references from config nodes during apply
2023-06-28 14:00:10 -04:00
James Bardin
bb0bb7af1a remove NodeApplyableResource
Move the logic for NodeApplyableResource into
nodeExpandApplyableResource to remove an unnecessary level of expansion.
2023-06-28 13:32:00 -04:00
James Bardin
5c9d7a810d connect references from config nodes during apply
In order to ensure that transitive dependencies are connected even when
there are no instances for a resource, we need to route the references
through the config ("expand") node. This happens naturally by having the
expand node report its config references, however legacy configs can
contain self-referenced without the "self" identifier, so those need to
be filtered out.
2023-06-28 13:31:58 -04:00
Liam Cervante
2eb99a0e44
Fix the Terraform build after recent merges (#33436) 2023-06-28 10:12:43 +02:00
Liam Cervante
212ae6c4ba
Introduce separate testing scope for reference validation (#33339) 2023-06-28 09:47:24 +02:00
Liam Cervante
dfc26c2ac4
[Testing Framework] Add test command to Terraform CLI (#33327)
* Add test structure to views package for rendering test output

* Add test file HCL configuration and parser functionality

* Adds a TestContext structure for evaluating assertions against the state and plan

* Add test command to Terraform CLI
2023-06-28 09:37:42 +02:00
Liam Cervante
ed822559e5
[Testing framework] Implement JSON view functionality for test command (#33400) 2023-06-28 09:30:29 +02:00
kmoe
fbff64ad45
configs: remove import block duplicate id check (#33434) 2023-06-27 19:25:36 +01:00
Roberto Hidalgo
8e5a66b2f5
use multierror.Append instead of append
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
2023-06-26 13:02:58 -04:00
Liam Cervante
3732bffe13
[Testing Framework] Adds TestContext for evaluating test assertions (#33326)
* Add test structure to views package for rendering test output

* Add test file HCL configuration and parser functionality

* Adds a TestContext structure for evaluating assertions against the state and plan
2023-06-26 17:42:53 +02:00
Roberto Hidalgo
787cc693cd
use go-multierror instead of manually joining error reasons
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
2023-06-24 11:04:55 -06:00
Martin Atkins
d49e991c3c plans/objchange: Support nested unknowns in our unrefinedValue shim
Several parts of the objchange logic incorrectly use cty.Value.RawEquals
for value comparison, instead of more appropriate comparison methods like
cty.Value.Equals or c.Value.Range().Includes. That makes them incorrectly
consider two unknown values with the same type but different refinements
as always non-equal, rather than evaluating based on the overlap between
the refinements (if any).

As a short-term fix for that we previously added this unrefinedValue shim
that just strips away the refinements for comparison, thus allowing
callers to continue using RawEquals as long as they've already taken care
of all of the other things that can make that go wrong, such as value
marks.

Unfortunately the shim was too simplistic and only supported direct
unknown values. Unknown values with refinements can also appear nested
inside known container values such as collections, so the shim needs to
recursively un-refine the entire data structure in that case.

This is still intended only as a temporary fix until we have time to
revisit all of the callers and make them use cty's own logic for
comparison. Using cty's own logic will make the results more precise,
because e.g. it can notice if two unknown strings have different known
prefixes and therefore cannot possibly be equal despite not being fully
known. For now this shim will accept any pair of unknown values of the
same type as equal, regardless of refinement.
2023-06-22 13:16:43 -07:00
Brandon Croft
cbebace2df
Merge pull request #33415 from hashicorp/brandonc/go_mod_tidy
[Chore] go mod tidy
2023-06-22 11:22:49 -06:00
Brandon Croft
2173aff852
Run go mod tidy 2023-06-22 11:14:21 -06:00
Brandon Croft
63124e0cb7
Merge pull request #33336 from hashicorp/TF-7056-uploading-state-directly-to-hosted-state-upload-url-when-available
cloud: when saving state, utilize new 'pending' state version
2023-06-22 11:11:00 -06:00
Liam Cervante
cad9aa9025
[Testing Framework] Add test file HCL configuration and parser functionality (#33325)
* Add test structure to views package for rendering test output

* Add test file HCL configuration and parser functionality

* address comments
2023-06-22 17:03:37 +02:00
Liam Cervante
cf3a72a2bc
Reinstate the accidentally deleted experimental testing page (#33413)
* Reinstate the accidentally deleted experimental testing page

* try removing nav reference as it is hidden anyway

* try nesting the nav reference?

* try nesting with the other module pages
2023-06-22 16:01:18 +02:00
Liam Cervante
dc04fcbc75
Update upgrade guide navigation (#33411) 2023-06-22 15:26:22 +02:00
Liam Cervante
1fe57d457d
upgrade golang.org/x/crypto/openpgp to github.com/ProtoMail/go-crypto (#33406) 2023-06-22 08:32:12 +02:00
Brandon Croft
19b17ad0a2
remote: when saving state, create a pending state version then upload 2023-06-21 12:30:33 -06:00
Brandon Croft
9fe3f7a7b4
cloud: when saving state, create a pending state version then upload
Create a pending state version followed by a separate state upload

When this version of the endpoint fails (It is not yet generally available, or when using with Terraform Enterprise) Fall back to the original call with state content included in the request.

This strategy will reduce the amount of save failures due to network latency and gateway timeouts.
2023-06-21 12:30:32 -06:00
kmoe
5ed38eb3fa
Update CHANGELOG.md 2023-06-19 11:18:05 +01:00
Andrew Hickman
49f99db1c2
terraform show -json: Add Errored field to output for plan (#33372)
* Add Errored field to JSON output

* Fix test error message
2023-06-19 11:16:41 +01:00
Rose M Koron
66e3c20b18
Merge pull request #33274 from davendu/main
docs/backends/cos: add necessary permission list for using the backend
2023-06-16 10:35:18 -07:00
Daven Du
8b8a4c4a95
Apply suggestions from code review
Better expression.

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
2023-06-16 21:00:01 +08:00
James Bardin
1e6b2d0f6b
Merge pull request #33378 from hashicorp/jbardin/objchange-refinements
validate planned set sizes using refinements
2023-06-15 13:19:33 -04:00
James Bardin
f6c536e436 validate planned set sizes using refinements 2023-06-15 13:08:09 -04:00
James Bardin
0be4a381fc
Merge pull request #33377 from hashicorp/jbardin/nesting-set-length
objchange: set length is unknown with partially known elements
2023-06-15 10:26:24 -04:00
James Bardin
3c8a163583 set length is unknown with partially known elems
If a set contains partially known values the length is unknown which
causes assertPlannedObjectValid to fail valid plans.

Revert to the old method if using LengthInt for the set lengths, which
returns the maximum number of possible elements, with a guard for
entirely unknown set values.
2023-06-15 09:29:42 -04:00
Martin Atkins
8f6fd86ed8
Update CHANGELOG.md 2023-06-14 10:14:41 -07:00
Martin Atkins
237877f170 go.mod: go get github.com/hashicorp/terraform-svchost@v0.1.1
This includes a change to make svchost.Disco and the caching credentials
source both safe for concurrent calls.
2023-06-14 07:36:45 -07:00
Craig Wright
4c1349dd1a
Merge pull request #33346 from jpluscplusm/patch-1 2023-06-13 12:51:54 -07:00
Liam Cervante
5abaca4bbf
Update index.mdx (#33360) 2023-06-13 10:47:38 +02:00
Kieran Lowe
0a2f62c8a0
fix: update broken links to checks section in docs (#33357)
This also capitalises the 'a' in assertions to keep it consistent with the rest of the document
2023-06-13 10:35:49 +02:00
Liam Cervante
ce8fd2943d
[Testing Framework] Add test structure to views package for rendering test output (#33324)
* Add test structure to views package for rendering test output

* address comments
2023-06-13 10:09:20 +02:00
guimin.hgm
ce8790c939 backend/oss: Removes the deprecated warning for configuraion variable assume_role 2023-06-12 12:34:47 -07:00
Craig Wright
34c0e915dc
Merge pull request #33338 from Macaber/patch-1 2023-06-12 12:14:01 -07:00
Jonathan Matthews
43a8bc06f0
Update environment-variables.mdx 2023-06-12 10:32:53 +01:00
Liam Cervante
48c818927c Remove old implementation of terraform test command 2023-06-12 11:17:42 +02:00
Craig Wright
f6aaef4a89
Merge pull request #33341 from bit-nibble-byte/patch-1 2023-06-09 11:21:21 -07:00
bit-nibble-byte
a166716bd6
Add missing preposition to sentence 2023-06-09 11:20:11 -04:00
kmoe
991d6f3f1f
website: plannable import docs (#33266)
* website: plannable import docs

* website: config gen docs

* Update website/docs/cli/commands/plan.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/cli/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* fix docs rendering

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* link again to import blocks

* fix genconfig example plan output

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* add import resource config example

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* attempt to fix nav

* more explicit

* fix build?

* remove pseudo tutorial

* add advice on when to gen

* add note on idempotency

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Alan Szlosek Jr <alan.szlosek@hashicorp.com>

* refer to cli cmd in usual way

* more explanation for genconfig

* remove unnecessary sentence

* add heading

* update help text

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* update link

* add import ID section

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* dial back didacticism

* clarify genconfig instructions

* explicit explanation of arg conflict

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* clarify import block required for genconfig

---------

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Alan Szlosek Jr <alan.szlosek@hashicorp.com>
Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
2023-06-09 15:14:42 +01:00
Macaber
18655f1692
Update templatefile.mdx 2023-06-09 15:25:54 +08:00