Commit Graph

27038 Commits

Author SHA1 Message Date
Kristin Laemmert 6f4f6fbc72 helper: deprecate pathorcontents
pathorcontents was solely used by the gcs backend. I moved the function
into the backend package so it could still be used by other backends for
good measure.
2020-10-08 08:42:16 -04:00
Kristin Laemmert 04be220f5f deprecate helper/copy
helper/copy CopyDir was used heavily in tests. It differes from
internal/copydir in a few ways, the main one being that it creates the
dst directory while the internal version expected the dst to exist
(there are other differences, which is why I did not just switch tests
to using internal's CopyDir).

I moved the CopyDir func from helper/copy into command_test.go; I could
also have moved it into internal/copy and named it something like
CreateDirAndCopy so if that seems like a better option please let me
know.

helper/copy/CopyFile was used in a couple of spots so I moved it into
internal, at which point I thought it made more sense to rename the
package copy (instead of copydir).

There's also a `go mod tidy` included.
2020-10-08 08:42:16 -04:00
Daniel Dreier f4324a384e
Fix formatting in BUGPROCESS.md 2020-10-07 16:40:00 -04:00
Pam Selle ece9f8c1f4
Merge pull request #26507 from hashicorp/pselle/sensitive-vars-change
Update state when sensitivity changes
2020-10-07 15:39:07 -04:00
Pam Selle a927e88c06 Compare before and after paths completely 2020-10-07 14:58:43 -04:00
hashicorp-ci 072a519b7f Cleanup after v0.14.0-alpha20201007 release 2020-10-07 17:36:01 +00:00
Pam Selle 2c352ef182 Apply should not communicate w provider if only sensitivity changes
If sensitivity changes, we have an update plan,
but should avoid communicating with the provider
on the apply, as the values are equal (and otherwise
a NoOp plan)
2020-10-07 13:30:35 -04:00
hashicorp-ci 803dd7fca2
Release v0.14.0-alpha20201007 2020-10-07 16:56:10 +00:00
Alisdair McDiarmid d05e3b40bf
Merge pull request #26492 from hashicorp/alisdair/sensitive-value-force-replacement
command: Fix missing force new for sensitive vars and blocks
2020-10-07 11:10:36 -04:00
Kristin Laemmert d2e999ba1f
remove unused code (#26503)
* remove unused code

I've removed the provider-specific code under registry, and unused nil
backend, and replaced a call to helper from backend/oss (the other
callers of that func are provisioners scheduled to be deprecated).

I also removed the Dockerfile, as our build process uses a different
file.

Finally I removed the examples directory, which had outdated examples
and links. There are better, actively maintained examples available.

* command: remove various unused bits

* test wasn't running

* backend: remove unused err
2020-10-07 11:00:06 -04:00
Pam Selle 7c2ec1640a Tidy eval_diff assignments and update plan action
When the sensitivity has changed, we want to write to
state and also display to the user that the sensitivity
has changed, so make this an update action. Also
clean up some assignments, since Contains traverses the val
anyway, this is a little tighter.
2020-10-07 10:59:28 -04:00
Pam Selle 33cbf2698d Typo fix in eval_variable 2020-10-07 10:58:05 -04:00
Pam Selle 923f9f226d Update some comments in states package 2020-10-07 10:57:25 -04:00
Alisdair McDiarmid 62e6f56a50 command: Fix missing force new for sensitive blocks
If an entire block is marked sensitive (possibly because it is of type
NestedSet) and results in replacement of the resource, we should render
the standard "forces replacement" text after the opening line of the
block.
2020-10-07 10:50:54 -04:00
James Bardin ca7b5bc28b dead code 2020-10-07 10:50:21 -04:00
James Bardin 8d5e844158 no need to loop this test any longer 2020-10-07 10:47:09 -04:00
James Bardin 826ccdd123 re-enable test 2020-10-07 10:44:41 -04:00
Pam Selle 7a7ad23113
Merge pull request #26491 from hashicorp/pselle/sensitive-vals-out-modules
Consider sensitivity when evaluating module outputs
2020-10-07 09:55:03 -04:00
James Bardin 496cf629cb
Merge pull request #26495 from hashicorp/jbardin/evaluate-walks
Audit some graph building and GraphNodeExecutable
2020-10-07 09:20:05 -04:00
James Bardin 35714e61e6 audit graph builder to make them more similar
Auditing the graph builder to remove unused transformers (planning does
not need to close provisioners for example), and re-order them. While
many of the transformations are commutative, using the same order
ensures the same behavior between operations when the commutative
property is lost or changed.
2020-10-06 17:39:53 -04:00
James Bardin a32028aeed evaluate vars and outputs during import
Outputs were not being evaluated during import, because it was not added
to the walk filter.

Remove any unnecessary walk filters from all the Execute nodes.
2020-10-06 17:22:50 -04:00
Pam Selle 9a9e61ef06 Update docs for output sensitivity change 2020-10-06 14:26:16 -04:00
Kristin Laemmert bad0adb996
build: remove unused scripts (#26484)
* build: remove unused build scripts
2020-10-06 13:26:38 -04:00
James Bardin 3d884d7e3f
Merge pull request #26490 from hashicorp/jbardin/import-module-variables
do not evaluate module variables during import
2020-10-06 13:12:30 -04:00
Pam Selle b9eeba0da2 Consider sensitivity when evaluating module outputs
This change "marks" values related to outputs that
have Sensitive set to true.
2020-10-06 13:09:18 -04:00
Alisdair McDiarmid 79a3e33c4d command: Fix missing force new for sensitive vars
If a value rendered for the diff is sensitive and results in replacement
of the resource, we should render the standard "forces replacement" text
after the "(sensitive)" value display.
2020-10-06 13:05:30 -04:00
Alisdair McDiarmid b723dd1779
Update CHANGELOG.md 2020-10-06 12:53:53 -04:00
Alisdair McDiarmid eb873f5021
Merge pull request #25725 from FGtatsuro/diff_heredoc_hyphen
Use valid heredoc begin symbol in diff output.
2020-10-06 12:52:23 -04:00
James Bardin 8049d2e028 do not evaluate module variables during import
We do not currently need to evaluate module variables in order to
import a resource.

This will likely change once we can select the import provider
automatically, and have a more dynamic method for dispatching providers
to module instances. In the meantime we can avoid the evaluation for now
and prevent a certain class of import errors.
2020-10-06 12:51:28 -04:00
Pam Selle cc007a27b7
Merge pull request #26482 from hashicorp/pselle/sensitive-var-nested-docs
Add sensitive variable docs for nested blocks
2020-10-06 10:16:26 -04:00
James Bardin 6281d4d420 update CHANGELOG.md 2020-10-06 09:19:18 -04:00
Pam Selle 4d01fc88fc Add sensitive variable docs for nested blocks
Add note to docs about nested block behavior for sensitive variables
2020-10-05 17:23:49 -04:00
James Bardin c48af3f18b
Merge pull request #26470 from hashicorp/jbardin/inverse-destroy-references
Allow special-case evaluation of instances pending deletion.
2020-10-05 16:20:22 -04:00
Pam Selle cda405c855
Update CHANGELOG.md 2020-10-05 14:58:50 -04:00
Pam Selle f84a7c1d57
Merge pull request #26476 from remilapeyre/postgres-backend-escape-schema_name
Properly quote schema_name in the pg backend configuration
2020-10-05 14:57:53 -04:00
James Bardin 5e8381edc5
Merge pull request #26486 from hashicorp/jbardin/backend-arm-client
add missing Context argument
2020-10-05 14:48:23 -04:00
Pam Selle 01ff7e0205
Merge pull request #26480 from nisunisu/fix_typo
Fixed a typo
2020-10-05 14:47:53 -04:00
James Bardin 70652814e3 add missing Context argument 2020-10-05 14:43:46 -04:00
James Bardin 5e13d57f4e
Merge pull request #26463 from hashicorp/kt/azurerm-secret-backend-fix
AzureRM backend: correctly lookup environment from metadata host
2020-10-05 14:26:32 -04:00
Pam Selle 112b0b98af
Merge pull request #26483 from nexxai/patch-1
[Documentation] Typo fixes
2020-10-05 13:38:38 -04:00
Pam Selle 1b29be2356
Merge pull request #26485 from hashicorp/pselle/sensitive-var-console
Obfuscate sensitive vals in console
2020-10-05 13:37:53 -04:00
Pam Selle 6440c83947 Move marked check above null check 2020-10-05 13:29:51 -04:00
Pam Selle c57ca152e6 Obfuscate sensitive vals in console
Updates terraform console to show "(sensitive)"
when a value is marked as sensitive.
2020-10-05 13:16:34 -04:00
Alisdair McDiarmid fd4497d48d
Update CHANGELOG.md 2020-10-05 13:12:32 -04:00
Alisdair McDiarmid 35d4926bf7
Merge pull request #25837 from remilapeyre/consul-force-unlock
Fix `terraform force-unlock <lock_id>` for Consul backend
2020-10-05 13:11:08 -04:00
JT Smith 6ac8bfb86d
[Documentation] Typo fixes
Just re-read the docs the ignore_changes update and saw a few typos
2020-10-05 10:10:38 -06:00
James Bardin ee564a5ceb
Merge pull request #26421 from hashicorp/jbardin/ignore-changes-map
allow ignore_changes to reference any map key
2020-10-05 12:06:05 -04:00
James Bardin 0c72c6f144 s/FullDestroy/IsFullDdestroy/ 2020-10-05 10:50:25 -04:00
James Bardin e35524c7f0 use existing State rather than Change.Before
The change was passed into the provisioner node because the normal
NodeApplyableResourceInstance overwrites the prior state with the new
state. This however doesn't matter here, because the resource destroy
node does not do this. Also, even if the updated state were to be used
for some reason with a create provisioner, it would be the correct state
to use at that point.
2020-10-05 10:40:14 -04:00
James Bardin a1181adca4 remove unused method stub 2020-10-05 10:35:31 -04:00