Commit Graph

30627 Commits

Author SHA1 Message Date
mrinalirao
5dea138a11 fix logic in multiErrors Append func 2022-12-01 08:40:57 +11:00
mrinalirao
191a5f1018 add test for override 2022-11-30 14:54:03 +11:00
mrinalirao
e36886c0e7 add task stage override 2022-11-30 10:46:28 +11:00
mrinalirao
2be890a37c add policy evaluation task stage 2022-11-29 15:10:23 +11:00
mrinalirao
d7c7f3689c refactor task results to run as a task stage 2022-11-29 11:57:51 +11:00
James Bardin
2b14670dfd
Merge pull request #32260 from hashicorp/jbardin/resolved-provided-by
ProvidedBy should return the resolved provider
2022-11-22 09:53:41 -05:00
James Bardin
60f82eea40
Merge pull request #32236 from hashicorp/jbardin/1.3-destroy-perf
check walkDestroy to help DestroyEdgeTransformer
2022-11-22 09:45:32 -05:00
James Bardin
c96da72319
Merge pull request #32246 from hashicorp/jbardin/plan-orphan-deleted
A deleted orphan should have no planned change
2022-11-22 09:43:34 -05:00
James Bardin
8e18922170 ProvidedBy should return the resolved provider
Once the ProviderTransformer has resolved and set the exact provider,
the ProvidedBy method should return that exact provider again.

We can hoist the stored provider addr into the AbstractInstance and
avoid the method duplication and slight differences between the
implementations.
2022-11-22 09:41:53 -05:00
James Bardin
79175b29f3
Merge pull request #32261 from sivchari/fix-prealloc
fix: pre allocate for composite literal
2022-11-22 09:18:47 -05:00
Craig Wright
e6653f97ef
Merge pull request #32256 from Sanim16/patch-1
Update index.mdx
2022-11-21 16:10:46 -08:00
Brandon Croft
401fa66108
Merge pull request #31949 from JarrettSpiker/jspiker/safe-delete-workspace
Use safe or force workspace delete for cloud backend
2022-11-21 16:52:08 -07:00
Jarrett Spiker
0ae6efff9d Add CHANGELOG entry for safe delete 2022-11-21 18:06:38 -05:00
Jarrett Spiker
cebd5e3fce Upgrade go-tfe to 1.12.0 2022-11-21 14:54:07 -05:00
Jarrett Spiker
c16d726f2c Succeed cloud workspace deletion if the workspace does not exist 2022-11-21 14:35:33 -05:00
Jarrett Spiker
1dafd7c0b1 Fix test compilation errors caused by interface change 2022-11-21 14:35:33 -05:00
Jarrett Spiker
060255a9d5 Use safe or force workspace delete for cloud backend 2022-11-21 14:35:33 -05:00
sivchari
ef4798de8e fix: pre allocate for composite literal 2022-11-22 02:20:54 +09:00
Sarah French
c0964438d6
Update CHANGELOG.md 2022-11-21 13:19:21 +00:00
Sarah French
988e779295
Update CHANGELOG.md 2022-11-21 13:16:54 +00:00
Sarah French
6fd3a8cdf4
go get cloud.google.com/go/storage@v1.28.0 (#32203)
* go get cloud.google.com/go/storage@v1.28.0

* go mod tidy

* Run `make generate` & `make protobuf` using go1.19.3
2022-11-21 13:14:55 +00:00
Craig Wright
353ab0a177
Merge pull request #32241 from hashicorp/update_linux_distro_support
Updating distro lists to be current as of 2022-11
2022-11-18 17:04:13 -08:00
Craig Wright
96e8bd0c3e
Merge pull request #32250 from stefkiourk/patch-2
Grammar and syntax fixes in import.mdx
2022-11-18 17:00:59 -08:00
Craig Wright
9f5f8b1767
Merge pull request #32249 from stefkiourk/patch-1
Added a missing comma on backends.mdx
2022-11-18 16:59:48 -08:00
Momoh Sani Musa
c02d0737ca
Update index.mdx
Grammatical correction
2022-11-19 01:56:44 +01:00
Craig Wright
ad7a83b7a2 Adding Fedora 37 2022-11-18 15:49:34 -08:00
Stef Ki
3d017bcf8b
Grammar and syntax fixes in import.mdx 2022-11-18 16:01:50 +01:00
Stef Ki
a86260755b
Added a missing comma on backends.mdx 2022-11-18 15:57:35 +01:00
James Bardin
7946e4a88a a deleted orphan should have no plan
If when refreshing an orphaned instance the provider indicates it has
already been deleted, there is no reason to create a change for that
instance. A NoOp change should only represent an object that exists and
is not changing.

This was likely left in before in order to try and provide a record of
the change for external consumers of the plan, but newer plans also
contain all changes made outside of Terraform which better accounts for
the difference. The NoOp change now can cause problems, because it may
represent an instance with conditions to check even though that instance
does not exist.
2022-11-18 08:48:15 -05:00
Craig Wright
406a8830a7 Restoring AmazonLinux 2022-11-17 16:57:02 -08:00
Craig Wright
16a381f33d Updating supported linux distros 2022-11-17 16:54:36 -08:00
James Bardin
62a8b9ef1d
Merge pull request #32207 from hashicorp/jbardin/destroy-plan-state
Ensure destroy plan contains valid state values
2022-11-17 14:18:17 -05:00
James Bardin
b5168eb6f4
Merge pull request #32208 from hashicorp/jbardin/pre-desstroy-refresh
Make the pre-destroy refresh a full plan
2022-11-17 14:18:06 -05:00
James Bardin
b6a67f622f check walkDestroy to help DestroyEdgeTransformer
In a heavily-connected graph with lots of inter-dependent providers, the
cycle checks for destroy edges across providers can seriously impact
performance. Since the specific cases we need to avoid will involve
create/update nodes, skip the extra checks during a full destroy
operation. Once we find a way to better track these dependencies, the
transformer will not need to do the cycle checks in the first place.
2022-11-17 13:29:09 -05:00
Martin Atkins
e293992d45 docs: "How Terraform Uses Unicode" should mention HCL too
I missed this on my first attempt to write this document. Consequently
we're currently depending on a version of HCL which uses Unicode 9, and
that's significantly lagging behind everything else which is currently on
Unicode 13.

My goal of adding these docs then is to remind us to update HCL to Unicode
15 once we're updating everything else to Unicode 15 with the Go 1.20
release, assuming that the Go team completes that Unicode upgrade as
currently planned.
2022-11-16 15:38:45 -08:00
Martin Atkins
069cc3eec9
Update CHANGELOG.md 2022-11-15 09:07:51 -08:00
Jamie Finnigan
530c0d33e4
go.mod: go get -u github.com/mitchellh/cli 2022-11-15 09:05:52 -08:00
James Bardin
242b8a726c
Merge pull request #32206 from hashicorp/jbardin/communicator-size
fix typo in scp upload size check
2022-11-14 11:05:11 -05:00
James Bardin
3db3ed03fb ensure destroy plan contains valid state values
Some prior refactors left the detroyPlan method a bit confusing, and ran
into a case where the previous run state could be returned as nil.

Get rid of the no longer used pendingPlan value, and track the prior and
prev states directly, making sure we always have a value for both.
2022-11-11 14:34:21 -05:00
James Bardin
3ea704ef81 Make the pre-destroy refresh a full plan
In order to complete the terraform destroy command, a refresh must first
be done to update state and remove any instances which have already been
deleted externally. This was being done with a refresh plan, which will
avoid any condition evaluations and avoid planning new instances. That
however can fail due to invalid references from resources that are
already missing from the state.

A new plan type to handle the concept of the pre-destroy-refresh is
needed here, which should probably be incorporated directly into the
destroy plan, just like the original refresh walk was incorporated into
the normal planning process. That however is major refactoring that is
not appropriate for a patch release.

Instead we make two discrete changes here to prevent blocking a destroy
plan. The first is to use a normal plan to refresh, which will enable
evaluation because missing and inconsistent instances will be planned
for creation and updates, allowing them to be evaluated. That is not
optimal of course, but does revert to the method used by previous
Terraform releases until a better method can be implemented.

The second change is adding a preDestroyRefresh flag to the planning
process. This is checked in any location which evalCheckRules is called,
and lets us change the diagnosticSeverity of the output to only be
warnings, matching the behavior of a normal refresh plan.
2022-11-11 14:33:50 -05:00
James Bardin
8ba8d5aec4 fix typo in upload size check
The scp upload size check had a typo preventing files from reporting
their size, causing an extra temp file to be created.
2022-11-11 14:25:34 -05:00
Liam Cervante
0c7fda1906
Update HCL and go-cty to fix optional and default attributes (#32178)
* Add test cases to verify all the default and optional issues are fixed

* actually commit all the tests

* update go-cty

* Update hcl
2022-11-10 14:00:16 +00:00
hc-github-team-tf-core
38763a5694 Cleanup after v1.4.0-alpha20221109 release 2022-11-09 18:28:01 +00:00
hc-github-team-tf-core
9add90c256
Release v1.4.0-alpha20221109 2022-11-09 18:10:18 +00:00
Laura Pacilio
0227952ace
Merge pull request #31274 from irab/patch-1
Additional note on usage of single quotes for for_each resources
2022-11-09 11:08:58 -05:00
Ira
a32648aa53
Update website/docs/cli/commands/state/show.mdx
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-11-09 12:01:41 +13:00
Laura Pacilio
8664c9c1f8
Merge pull request #31991 from sigwinch28/patch-1
Document provider registry response property shasum
2022-11-08 17:15:28 -05:00
Joe Harrison
92719db198
Update website/docs/internals/provider-registry-protocol.mdx
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-11-08 11:04:14 +00:00
Laura Pacilio
a574e95dcd
Merge pull request #31834 from fungusakafungus/patch-1
Looks like a copy-paste error
2022-11-07 15:54:19 -05:00
Martin Atkins
1734e17cce
Update CHANGELOG.md 2022-11-04 16:21:32 -07:00