Commit Graph

30794 Commits

Author SHA1 Message Date
Pooya
6bbb76eca3
Added Quiet value (#32116)
* Added Quiet value

* Added Quiet value

* Added Quiet value

* Removed comments on 170 171 173

Co-authored-by: itspooya <fallenangel201190@gmail.com>
2023-01-25 16:51:14 +00:00
Martin Atkins
29b8a07105
Update CHANGELOG.md 2023-01-25 08:24:54 -08:00
Martin Atkins
e2380b1038 cliconfig: Allow forcing use of the plugin cache despite the lock file
Currently Terraform will use an entry from the global plugin cache only if
it matches a checksum already recorded in the dependency lock file. This
allows Terraform to produce a complete lock file entry on the first
encounter with a new provider, whereas using the cache in that case would
cause the lock file to only cover the single package in the cache and
thereefore be unusable on any other operating system or CPU architecture.

This temporary CLI config option is a pragmatic exception to support those
who cannot currently correctly use the dependency lock file but who still
want to benefit from the plugin cache. With this setting enabled,
Terraform has permission to produce a dependency lock file that is only
suitable for the current system if that would allow use of an existing
entry in the plugin cache.

We are introducing this option to resolve a conflict between the needs of
folks who are using the dependency lock file as expected and the needs of
folks who cannot use the dependency lock file for some reason. The hope
then is to give respite to those who need this exception in the meantime
while we understand better why they cannot use the dependency lock file
and improve its design so that everyone will be able to use it
successfully in a future version of Terraform. This option will become a
silent no-op in a future version of Terraform, once the dependency lock
file behavior is sufficient for all supported Terraform development
workflows.
2023-01-25 08:23:01 -08:00
Anna Winkler
3cc7e55465
Expand error when discovery document request fails (#32394)
* Expand error when discovery document request fails.
* Use error type from svchost library
* Use svchost v0.0.1
2023-01-24 15:19:12 -07:00
Michele Degges
f1bfe9bd01
Remove references to old linux signing key (#32566) 2023-01-23 16:56:44 -08:00
Craig Wright
8458715240
Merge pull request #32560 from mcdonagj/fix-spelling-of-network-in-setproduct
Fix the spelling of network within the setproducts function documentation.
2023-01-23 16:45:17 -08:00
Michele Degges
8f30e970d2
Remove references to old signing key 2023-01-23 14:26:19 -08:00
Gary McDonald
d3a49dacf2
Fix the spelling of network within the setproducts function documentation.
Signed-off-by: Gary McDonald <mcdonagj@dukes.jmu.edu>
2023-01-22 19:53:30 -05:00
Craig Wright
5fcf1e5051
Merge pull request #32549 from patsevanton/patch-1
Fix Examples ip_addrs
2023-01-20 15:37:55 -08:00
Nick Fagerlund
f26786d6d9
Merge pull request #32545 from hashicorp/nf/jan23-cloud-backend-test-typo
Fix typo in cloud backend's `TestCloud_setConfigurationFields`
2023-01-20 11:40:52 -08:00
Nick Fagerlund
3b26f68737
Merge pull request #32543 from hashicorp/nf/jan23-attr-path-value-marks-corruption
Fix accidental mutation of shared `cty.Path`s in ValueMarks funcs
2023-01-20 10:17:58 -08:00
Anton Patsev
119bff6ca2
Fix Examples ip_addrs 2023-01-20 18:36:28 +06:00
Liam Cervante
9001bef525
fix the outputs of equivalence tests that were executed with the wrong version (#32547) 2023-01-20 12:53:04 +01:00
Liam Cervante
82b5cfad7e
Add more equivalence tests that are testing edge cases around the new structured renderer (#32538)
* add test cases

* run equivalence tests

* delete old outputs

* drift_relevant_attributes should ignore the number attribute

* also add a test for data reads

* test destroy only
2023-01-20 09:31:11 +01:00
Liam Cervante
7d1ea52077
Structured Plan Renderer: another round of fixes after more equivalence testing (#32537)
* Structured Plan Renderer: another round of fixes after more equivalence testing

* fix sort function

* use new constants
2023-01-20 09:24:22 +01:00
Nick Fagerlund
acf7314587 Fix typo in cloud backend's TestCloud_setConfigurationFields
This was clearly wrong, but it was also harmless -- in the event of a failing
test due to missing tags, they would get double-reported as both missing and
unexpected. This commit separates out the reporting as intended.
2023-01-19 18:33:14 -08:00
Craig Wright
125aaef9d9
Merge pull request #32514 from Paramount/main
removed double negation
2023-01-19 18:16:27 -08:00
Nick Fagerlund
83428c91f1 Fix accidental mutation of shared cty.Paths in ValueMarks funcs
Go's `append()` reserves the right to mutate its primary argument in-place, and
expects the caller to assign its return value to the same variable that was
passed as the primary argument. Due to what was almost definitely a typo
(followed by copy-paste mishap), the configschema `Block.ValueMarks` and
`Object.ValueMarks` functions were treating it like an immutable function that
returns a new slice.

In rare and hard-to-reproduce cases, this was causing bizarre malfunctions when
marking sensitive schema attributes in deeply-nested block structures --
omitting the marks for some sensitive values (🚨), and marking other entire
blocks as sensitive (which is supposed to be impossible). The chaotic and
unreliable nature of the bugs is likely related to `append()`'s automatic slice
reallocation behavior (if the append operation overflows the original array
allocation, the resulting behavior can _look_ immutable), but there might be
other contributing factors too.

This commit fixes existing instances of the problem, and wraps the desired
copy-and-append behavior in a helper function to simplify handling shared parent
paths in an immutable way.
2023-01-19 12:39:19 -08:00
Liam Cervante
6dc49150b7
Structured Plan Renderer: Read the data source schemas from the right place (#32532)
* read the data source schemas from the right place

* address comments and add test
2023-01-19 15:37:02 +01:00
Liam Cervante
7a019fa767
Update CHANGELOG.md 2023-01-18 10:49:42 +01:00
Liam Cervante
8d61c5bfc4
Use the new structured renderer in place of the old diffs package (#32520)
* Use the new structured renderer in place of the old diffs package

* remove old plan tests

* refresh only plans should show moved resources in the refresh section
2023-01-18 10:14:54 +01:00
Brandon Croft
5ac03755e7
Merge pull request #32303 from mrinalirao/mr/policy-evaluation
Add policy evaluation task stage to the CLI
2023-01-17 14:47:23 -07:00
Liam Cervante
99823e4a15
Structured Plan Renderer: Fix minor bugs causing diffs in the equivalence tests. (#32519)
* remove attributes that do not match the relevant attributes filter

* fix formatting

* fix renderer function, don't drop irrelevant attributes just mark them as no-ops

* fix imports

* fix bugs in the renderer exposed by the equivalence tests

* imports

* gofmt
2023-01-17 09:31:29 +01:00
Liam Cervante
e015b15f12
Structured Plan Renderer: Remove attributes that do not match the relevant attributes filter (#32509)
* remove attributes that do not match the relevant attributes filter

* fix formatting

* fix renderer function, don't drop irrelevant attributes just mark them as no-ops

* fix imports
2023-01-16 15:18:38 +01:00
Daniel Banck
4fd8322802
Add function descriptions (#32453)
* Add consolidated function description list

* Add function parameter descriptions

* Add descriptions to all functions

* Add sanity test for function descriptions

* Apply suggestions from code review

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2023-01-16 10:48:31 +00:00
mrinalirao
dcd2826277 refactor runTaskStage func & use multierrors lib 2023-01-16 14:36:17 +11:00
jerphi
9932642442 removed double negation 2023-01-14 18:17:39 +01:00
James Bardin
b9fc2d62d1
Merge pull request #32510 from hashicorp/jbardin/terraform-data-typed-null
typed null input should be reflected in output
2023-01-13 13:34:52 -05:00
James Bardin
e09b67bebd simplify output assignment 2023-01-13 13:20:25 -05:00
James Bardin
e2a6397a06 typed null input should be reflected in output
The configuration may be supplying a typed null value to the
terraform_data.input attribute, which must be reflected in the output to
have a valid plan.
2023-01-13 11:48:51 -05:00
mrinalirao
4d2e75bbda Merge branch 'mr/refactor-task-stage' into mr/policy-evaluation
# Conflicts:
#	internal/cloud/backend_taskStages.go
2023-01-13 10:33:01 +11:00
Liam Cervante
95782f2491
Structured plan renderer: Implement the main functionality for the renderer (#32496)
* raw unmodified broken tests

* tests execute, no panics

* fix whitespace differences

* fix all the tests

* fix tests

* actually fix tests

* add missing plan metadata into the renderer

* address comments

* complete merge

* remove TODO raising questions about outputs, they are fixed

* missing bold on plan
2023-01-12 17:59:07 +01:00
Liam Cervante
af0ff90d6e
Remove outputs from the jsonplan that are not from the root module (#32503) 2023-01-12 17:02:29 +01:00
Liam Cervante
c125397da1
push the colorize actions as locally as possible (#32502) 2023-01-12 16:47:06 +01:00
James Bardin
df601a7fd0
Merge pull request #32500 from hashicorp/jbardin/old-condition-results
remove deprecated `condition_results` from the json plan
2023-01-11 19:49:45 -05:00
James Bardin
96b1318167 remove deprecated condition_results from plan 2023-01-11 16:03:32 -05:00
James Bardin
0a73e216e5
Merge pull request #32463 from hashicorp/jbardin/nesting-single-null
NestingSingle blocks can be null
2023-01-11 11:00:16 -05:00
Liam Cervante
f6d625103c
Structured plan renderer: refactor replace paths logic (#32489)
* change -> diff, value -> change

* also update readme#

* structured plan renderer: refactor replace paths logic

* goimports

* goimports

* address comments

* fix compile error
2023-01-11 10:20:24 +01:00
Liam Cervante
38afb41787
Structured plan renderer: Introduce support for multiline and JSON strings (#32488)
* pause implementation

* change -> diff, value -> change

* add support for json and multiline strings to the primitive renderer

* goimports

* remove unused function

* go fmt

* address comments
2023-01-11 09:35:36 +01:00
Liam Cervante
8330b7295b
Structured plan renderer: Add support for map blocks and sensitive blocks. (#32491)
* change -> diff, value -> change

* also update readme#

* pause

* Update internal/command/jsonformat/computed/diff.go

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>

* add interface assertions for diff renderers

* Add support for different kinds of blocks, and for sensitive blocks

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2023-01-11 09:04:26 +01:00
Liam Cervante
21bb677db7
Structured Plan Renderer: Naming and package structure refactor (#32486)
* change -> diff, value -> change

* also update readme#

* Update internal/command/jsonformat/computed/diff.go

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>

* add interface assertions for diff renderers

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2023-01-10 17:24:48 +01:00
Liam Cervante
a086453783
Structured Plan Renderer: Refactor Primitive and Sensitive value processing (#32476)
* refactor sensitive and primitive values to match patterns used elsewhere

* goimports

* address comments

* fix tests

* also use %q for map keys
2023-01-09 20:38:25 +01:00
Liam Cervante
46ab53d651
Structured Plan Renderer: Escape object and block keys that don't match HCL syntax (#32483)
* Escape object and block keys that don't match HCL syntax

* address comments
2023-01-09 20:22:59 +01:00
Liam Cervante
7a3fc48b70
Structured Plan Renderer: Add tests validating behaviour of dynamic types (#32482)
* add support for dynamic types into attribute processing

* fix names

* add tests
2023-01-09 20:08:08 +01:00
Liam Cervante
d31631675b
Add support for Tuples into the structured plan renderer (#32479)
* add support for tuples to the structured plan renderer

* update after latest main changes
2023-01-09 17:39:13 +01:00
Liam Cervante
2d66eee872
Structured Plan Renderer: Address comments raised in previous PRs (#32478)
* Address comments raised in previous PRs

* add doc comments for public types
2023-01-09 17:15:17 +01:00
Liam Cervante
1332d315b6
Structured Plan Renderer: Remove generic interface{} entry point (#32477)
* Remove the single generic point of entry into the differ package

* goimports

* add comment explaining generic function
2023-01-09 16:49:35 +01:00
Liam Cervante
9bc5ded27a
Add support for outputs in the structured renderer (#32426)
* prep for processing the structured run output

* undo unwanted change to a json key

* Add skeleton functions and API for refactored renderer

* goimports

* Fix documentation of the RenderOpts struct

* Add rendering functionality for primitives to the structured renderer

* add test case for override

* Add support for parsing and rendering sensitive values in the renderer

* Add support for unknown/computed values in the structured renderer

* delete missing unit tests

* Add support for object attributes in the structured renderer

* goimports

* Add support for the replace paths data in the structured renderer

* Add support for maps in the structured renderer

* Add support for lists in the structured renderer

* goimports

* Add support for sets in the structured renderer

* goimports

* Add support for blocks in the structured renderer

* goimports

* Add support for outputs in the structured renderer

* fix ordering of blocks

* remove unused test stub

* fix typo
2023-01-09 14:45:35 +01:00
Liam Cervante
05f1764a0d
Add support for blocks in the structured renderer (#32422)
* prep for processing the structured run output

* undo unwanted change to a json key

* Add skeleton functions and API for refactored renderer

* goimports

* Fix documentation of the RenderOpts struct

* Add rendering functionality for primitives to the structured renderer

* add test case for override

* Add support for parsing and rendering sensitive values in the renderer

* Add support for unknown/computed values in the structured renderer

* delete missing unit tests

* Add support for object attributes in the structured renderer

* goimports

* Add support for the replace paths data in the structured renderer

* Add support for maps in the structured renderer

* Add support for lists in the structured renderer

* goimports

* Add support for sets in the structured renderer

* goimports

* Add support for blocks in the structured renderer

* goimports

* fix ordering of blocks

* remove unused test stub
2023-01-09 14:33:01 +01:00
Liam Cervante
69cce3597f
Add support for sets in the structured renderer (#32409)
* prep for processing the structured run output

* undo unwanted change to a json key

* Add skeleton functions and API for refactored renderer

* goimports

* Fix documentation of the RenderOpts struct

* Add rendering functionality for primitives to the structured renderer

* add test case for override

* Add support for parsing and rendering sensitive values in the renderer

* Add support for unknown/computed values in the structured renderer

* delete missing unit tests

* Add support for object attributes in the structured renderer

* goimports

* Add support for the replace paths data in the structured renderer

* Add support for maps in the structured renderer

* Add support for lists in the structured renderer

* goimports

* Add support for sets in the structured renderer

* goimports
2023-01-09 14:17:30 +01:00