Commit Graph

31011 Commits

Author SHA1 Message Date
Liam Cervante
324c82b077
Update CHANGELOG.md 2023-04-21 09:50:53 +02:00
Liam Cervante
aae6990d38
Add native plantimestamp function to Terraform (#32980)
* add plantimestamp function

* documentation

* add missing links

* fix typo
2023-04-21 09:47:28 +02:00
Liam Cervante
5275392303
Update CHANGELOG.md 2023-04-21 08:44:13 +02:00
Rémi Lapeyre
af571b2642
Improve environment variable support for the pg backend (#33045)
* Improve environment variable support for the pg backend

This patch does two things:
  - it adds environment variable support to the parameters that did
    not have it (and uses `PG_CONN_STR` instead of `PGDATABASE` which is
    actually more appropriate to match the behavior of other PostgreSQL
    utilities)
  - better documents how to give the connection parameters as environment
    variables for the ones that were already supported based on the
	recommendation of @bsouth00

I will prepare a backport of the documentation part of this once it is
merged.

Closes https://github.com/hashicorp/terraform/issues/33024

* Remove global variable in test of the PG backend
2023-04-21 08:39:19 +02:00
Glenn Sarti
7e2e834aff
Emit warnings for certain run events in cloud backend (#33020)
The cloud backend, which communicates with TFC like APIs, can create
runs which may have one more configuration parameters altered. These
alterations are emitted as run-events on the run so that API clients
can consume and display them to users. This commit adds a step in
plan operation to query the run-events once a run is created and then
emit specific run-event descriptions to the console as warnings for
the user.
2023-04-17 08:53:47 -07:00
The Terraform Team
c10a07f3b2 Automated equivalence test golden file update for release 1.5.0-alpha20230405. 2023-04-17 09:35:26 +00:00
Liam Cervante
1a36d07ead
Add new actions for executing the equivalence tests after a CRT release (#32959)
* add new actions for executing the equivalence tests after a CRT release

* ready for review

* Update .github/actions/equivalence-test/action.yml

Co-authored-by: CJ Horton <17039873+radditude@users.noreply.github.com>

* address comments

---------

Co-authored-by: CJ Horton <17039873+radditude@users.noreply.github.com>
2023-04-17 10:51:04 +02:00
Sebastian Rivera
e6c3aab6c5
Merge pull request #33018 from hashicorp/tf-5529-sro-tfe-version-check 2023-04-14 11:55:12 -04:00
James Bardin
0e0db2d206
Merge pull request #33013 from Harmelodic/patch-1
Document new -or-create flag.
2023-04-14 08:46:58 -04:00
Liam Cervante
2c624acea1
Fix rendering unknown values in map and null string primitives (#33029)
* fix rendering unknown values in map and null string primitives

* Update map.go

* fix code consistency checks
2023-04-14 09:56:32 +02:00
Sebastian Rivera
300a60f393 Fix typo in format version check 2023-04-13 18:30:56 -04:00
Sebastian Rivera
5634ae3e18 Unit tests to ensure renderer is appropriately called 2023-04-13 18:30:56 -04:00
Sebastian Rivera
b23cfaefe8 Refactor SRO check to prevent duplicate plan output 2023-04-13 18:30:56 -04:00
Liam Cervante
7c439b25da
add copywrite file that excludes .tf extension (#33012) 2023-04-11 15:51:44 +02:00
Matt Smith
2a2e1904ea
Document new -or-create flag. 2023-04-11 13:52:59 +02:00
Liam Cervante
9c87006c34
checks: hide check diagnostics during plans that will not wait for approval (#32938)
* checks: filter out check diagnostics during certain plans

* wrap diagnostics produced by check blocks in a dedicated check block diagnostic

* address comments
2023-04-11 10:54:30 +02:00
Craig Wright
c993569591
Merge pull request #33000 from hibbertda/azrm_backend_metadata 2023-04-07 10:12:48 -07:00
kt
ee2f418f36
Update website/docs/language/settings/backends/azurerm.mdx 2023-04-06 17:19:23 -07:00
Daniel Hibbert
c1b6c45791 added metadata_host param for AzureRM backend. 2023-04-06 16:11:33 -04:00
Daniel Kimsey
eed06e2342
Merge pull request #32990 from hashicorp/releng/smoke-test-docker-builds
ci: Smoke test docker builds
2023-04-06 10:51:25 -05:00
James Bardin
acbcbcb311
Merge pull request #32988 from hashicorp/jbardin/destroy-plan-null-type
the destroy plan should use correct type
2023-04-06 09:53:55 -04:00
Martin Atkins
9b31ae9a9c
Update CHANGELOG.md 2023-04-05 15:43:56 -07:00
janaurka
1f603b1a7f
backend/pg: Accept connection string in PGDATABASE environment variable 2023-04-05 15:42:44 -07:00
Robert Hafner
dfbb9c2e10
website: templatefile variables are an object, not a map
Although maps and objects are similar, maps require that all values be of the same type while objects can allow different values to have their own type.

This function does not restrict itself to maps- the examples themselves include cases where both strings and lists are passed through, making this an object and not a map.
2023-04-05 15:36:22 -07:00
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
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