Commit Graph

31149 Commits

Author SHA1 Message Date
Martin Atkins
a3db16e4ea version: Clean up after the 1.5.0-alpha20230405 release 2023-04-05 11:07:53 -07:00
Daniel Kimsey
1d9581682b ci: Smoke test docker builds
This adds a test to catch the glibc build issue that caused #32947. We check
both the container executes and the version is correct.
2023-04-05 12:32:27 -05:00
Martin Atkins
6eab13ba46 Prepare for 1.5.0-alpha20230405 release 2023-04-05 08:46:40 -07:00
Liam Cervante
0540203085
checks: Add initial changelog entry for alpha release (#32984) 2023-04-05 17:09:10 +02:00
James Bardin
c872cd6d96 the destroy plan should use correct type
When we plan to destroy an instance, the change recorded should use the
correct type for the resource rather than `DynamicPseudoType`. Most of
the time this is hidden when the change is encoded in the plan, because
any `null` is always encoded to the same value, and when decoded it will
be converted to the schema type. However when apply requires creating a
second plan for an instance's replacement that value is not going to be
encoded, and remains a dynamic value which is sent to the provider.

Most providers won't see that either, as the grpc request also encodes
and decodes the value to conform with the correct schema. The builtin
terraform provider does get the raw cty value though, and when that
dynamic value is returned validation fails when the type does not match.
2023-04-05 10:19:26 -04:00
Liam Cervante
84dc498b90
checks: always reference the nested data source from the check graph node (#32946)
* checks: always reference the nested data source from the check block graph node

* goimports
2023-04-05 08:48:42 +02:00
Alvin Huang
c960b16e87
comment out ironbank update in CI until it is set up (#32979) 2023-04-04 19:18:30 +02:00
CJ Horton
b8985e5c4d
Merge pull request #32970 from hashicorp/radditude/update-apt-instructions
update apt install instructions
2023-04-03 13:41:42 -07:00
CJ Horton
2738dc206e update apt install instructions 2023-04-03 13:31:53 -07:00
James Bardin
8ab7af8c5f validate unknown nested attribute collections
It is not valid for a provider to return an unknown value for a
configured nested collection, but we need to check for unknowns before
comparing the number of values in the collection.
2023-04-03 13:31:36 -04:00
Daniel Kimsey
64c4e1b4c1
Merge pull request #32951 from hashicorp/fix-incorrect-cgo-flag
ci: Correctly pass cgo_enabled=0 flag
2023-03-30 13:45:02 -05:00
Daniel Kimsey
e9628c5eba
ci: Correctly pass cgo_enabled=0 flag
This flag was not being passed correctly, it caused the value to be read as unset. Which effectively defaults to enabled.

Related to incident 230330-1
2023-03-30 13:38:50 -05:00
emily neil
649d6d3f12
Upload ECR image to correct ECR repo (#32948)
Co-authored-by: emilymianeil <eneil@hashicorp.com>
2023-03-30 11:38:02 -07:00
emily neil
b4d0de386e
Add depends block for promote-staging + add promote-staging-packaging (#32941)
* Add depends block for promote-staging + add promote-staging-packaging

* Fix ironbank dependency

---------

Co-authored-by: emilymianeil <eneil@hashicorp.com>
2023-03-29 12:45:59 -07:00
James Bardin
31f278b2d8
Merge pull request #32892 from hashicorp/jbardin/update-missing-sensitive
don't compare plan marks for missing values
2023-03-28 16:01:07 -04:00
James Bardin
81b74cdb22 don't compare plan marks for missing values
If a resource has a change in marks from the prior state, we need to
notify the user that an update is going to be necessary to at least
store that new value in the state. If the provider however returns the
prior state value in lieu of a new config value, we need to be sure to
filter any new marks for comparison as well. The comparison of the prior
marks and new marks must take into account whether those new marks could
even be applied, because if the value is unchanged the new marks may be
completely irrelevant.
2023-03-28 15:55:15 -04:00
James Bardin
a4e92f3fca
Merge pull request #32876 from hashicorp/jbardin/state-serialize-plan-error
Remove planned data source objects from state on error
2023-03-28 15:50:59 -04:00
James Bardin
fdb00b9a46
Merge pull request #32900 from hashicorp/jbardin/target-drift-upgrade
External changes report can fail with schema migrations and `-target`
2023-03-28 15:50:38 -04:00
emily neil
880b87a0e7
Releng/migrate common release tooling (#32797)
* Migrate set-output to GITHUB_OUTPUT

Signed-off-by: Scott Macfarlane <smacfarlane@hashicorp.com>

* Migrate terraform to CRT

* Update ci branches & ci notification channel

* Use version/VERSION file to parse version

* Remove fetch raw version script and update pipeline to run on current branch

* PR feedback: cgo-enabled now required flag, updated comments & include promotion steps in ci.hcl

* Update version for main

---------

Signed-off-by: Scott Macfarlane <smacfarlane@hashicorp.com>
Co-authored-by: Scott Macfarlane <smacfarlane@hashicorp.com>
Co-authored-by: emilymianeil <eneil@hashicorp.com>
2023-03-28 10:39:37 -07:00
Liam Cervante
c06db2aadd
checks: don't iterate through all the nodes when there is nothing to search for (#32927) 2023-03-28 18:14:27 +02:00
Liam Cervante
5f97f88025
ensure checks are reported before executed (#32925) 2023-03-28 15:20:54 +02:00
Craig Wright
9d93415d4c
Merge pull request #32898 from hashicorp/bflad/less-null-more-terraform-docs 2023-03-24 09:12:46 -07:00
Liam Cervante
978263efe9
Checks: Introduce check blocks into the terraform node and transform graph (#32735)
* Add support for scoped resources

* refactor existing checks addrs and add check block addr

* Add configuration for check blocks

* introduce check blocks into the terraform node and transform  graph

* address comments

* address comments

* don't execute checks during destroy operations

* don't even include check nodes for destroy operations
2023-03-23 16:07:31 +01:00
Liam Cervante
3827120c25
Checks: Add configuration for check blocks (#32734)
* Add support for scoped resources

* refactor existing checks addrs and add check block addr

* Add configuration for check blocks

* address comments
2023-03-23 09:12:53 +01:00
Liam Cervante
87c457781d
Checks: Refactor existing check addrs and add new check block addr (#32733)
* Add support for scoped resources

* refactor existing checks addrs and add check block addr

* address comments
2023-03-23 09:04:21 +01:00
Craig Wright
d53cb81bed
Merge pull request #32889 from fidelity/feature/doc-change 2023-03-21 15:31:34 -07:00
James Bardin
9504b2640f
Merge pull request #32891 from hashicorp/jbardin/sensitive-mod-outputs
Store all sensitive marks for non-root module outputs in state
2023-03-21 13:59:18 -04:00
James Bardin
240e345b45 test for untargeted schema mismatch 2023-03-21 12:55:26 -04:00
James Bardin
b10c4c54d9 prevent errors with -target and provider upgrades
In the case where a provider has been upgraded, and there are external
changes to resources outside of terraform, and -target is being used,
and resources which are not targeted require a schema migration; the
untargeted resources will not have been migrated and cannot be decoded for the
external changes report.

Since there is no way to decode the resources which have been excluded
via -target, we can only skip over them when inspecting
driftedResources. Return warnings for now to indicate that these
resources could not be decoded to help indicate that users will need to
eventually apply these changes.
2023-03-21 12:49:59 -04:00
Middleton, Nathan
2213d91746 description feedback change 2023-03-21 16:46:20 +00:00
Brian Flad
9150a1bb75
website: Minor fixes to Provisioners Without a Resource page
Some details about `null_resource` were not updated with the transition to `terraform_data`.
2023-03-21 09:51:40 -04:00
Craig Wright
bd75dade9c
Merge pull request #32884 from DocAdam/patch-2 2023-03-20 16:44:34 -07:00
Craig Wright
2073d6ac46
Merge pull request #32882 from ChristopherHackett/patch-2 2023-03-20 15:52:47 -07:00
Craig Wright
23db9f3062
Merge pull request #32883 from ChannyClaus/patch-1 2023-03-20 14:53:37 -07:00
James Bardin
defd7f0cde test that module outputs maintain sensitive marks 2023-03-20 14:22:08 -04:00
James Bardin
d33e627514 remove old comments 2023-03-20 14:22:08 -04:00
James Bardin
425c6bead2 store non-root sensitive outputs in state
Module outputs are evaluated from state, so in order to have detailed
information about sensitivity from non-root module outputs, we need to
store the value along with all sensitive marks. This aligns with the
usage of state being the in-memory store for other temporary values like
locals and variables.
2023-03-20 13:27:53 -04:00
Adam Pugh
3b4207a146
Spelling update
updated: configuratation to configuration
2023-03-19 07:14:06 -05:00
Chan Kang
2ec0bf3cea
Update BUGPROCESS.md
non-material / trivial grammar fix
2023-03-18 17:14:20 -04:00
Christopher Hackett
493973d6da
Correct docs on Configuration Directory
The option was removed in v0.15 and so is no-longer "plan[ed]" https://newreleases.io/project/github/hashicorp/terraform/release/v0.15.0
2023-03-18 20:22:31 +00:00
Craig Wright
4fff0bd857
Merge pull request #32877 from DocAdam/patch-1 2023-03-17 15:18:30 -07:00
Adam Pugh
f4c3611977
Update settings.mdx
updated misspelling to precedence
2023-03-17 11:05:07 -05:00
James Bardin
1ca631bda0 remove planned objects from state on error
When planning encounters an error we were returning early without
cleaning out any planed data sources which cannot be serialized. Move
the cleanup to the common walkPlan method where the PriorState is
assigned so that it cannot be missed.
2023-03-17 08:45:42 -04:00
Bryce Kalow
6b35927cf0
docs: fix up content issues, add content-check command (#32869) 2023-03-16 11:53:13 -05:00
Alisdair McDiarmid
dc00ee8c8a
Merge pull request #32870 from hashicorp/alisdair/revert-cty-upgrade
go.mod: Revert cty minor version v1.13 upgrade
2023-03-16 12:02:24 -04:00
Martin Atkins
9f827f57ae go.mod: Revert cty minor version v1.13 upgrade
We inadvertently incorporated the new minor release of cty into the 1.4
branch, and that's introduced some more refined handling of unknown values
that is too much of a change to introduce in a patch release.

Therefore this reverts back to the previous minor release for the v1.4
series, and then we'll separately get the main branch ready to work
correctly with the new cty before Terraform v1.5.

This reverts just the upgrade and the corresponding test changes from
#32775, while retaining the HCL upgrade and the new test case it
introduced for that bug it was trying to fix. That new test is still
passing so it seems that the cty upgrade is not crucial to that fix.
2023-03-16 11:48:41 -04:00
Martin Atkins
4e6e0bc47b core: Fix test flake in TestContext2Apply_stop
This test was previously not taking into account the fact that the
"Stopping" hook gets sent in the goroutine that calls ctx.Stop, whereas
all of the others get called from inside ctx.Apply, and so there are no
ordering guarantees for that event in relation to the others.

We now handle the stopping event as a special case that is allowed to
appear anywhere in the sequence as long as it appears. The other events
are still strongly ordered because their ordering is important for
correctness of Terraform Core's own behavior.

As some extra insurance we also now check whether the provider's
ApplyResourceChange and Stop functions both ran and reached a suitable
point of execution related to the stop request, which help to ensure not
only that something called Stop but that Terraform Core correctly
interacted with the provider to handle the stop.
2023-03-15 13:44:33 -07:00
Alan Szlosek Jr
8ab72c249d
add docs meta descriptions (#32771)
* add docs meta descriptions

* cleanups

* remove old docs files

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>

* remove testing-experiment from nav data

---------

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
2023-03-15 15:56:34 -04:00
Craig Wright
62d6e84b60
Merge pull request #32855 from amandabasara/patch-3 2023-03-15 12:43:07 -07:00
Amanda B
956627d661
Update index.mdx New PR for pinning providers
New PR for pinning providers
2023-03-15 14:55:28 -04:00