Commit Graph

30384 Commits

Author SHA1 Message Date
Martin Atkins
edb1152ae0 build: Enable command echo for various Makefile targets
When we run many of these together e.g. in the checks.yaml GitHub Actions
workflow, it's hard to tell from the output exactly which command is
producing which subset of the output.

To help clarify that, we'll ask make to print out the command line it's
running before it runs it.
2022-08-26 09:47:30 -07:00
Martin Atkins
c2ec25e359 build: goimports check relative to PR base branch
At the risk of a little bit of hidden spooky action at a distance, this
will slightly change the behavior of the "goimports check" to compare
against the base branch of a PR rather than to origin/main if we happen
to find one of the environment variables that GitHub Actions sets
automatically in its runners. This is targeting our "checks.yml" workflow
in particular.

The intention here is to avoid misreporting files that haven't actually
changed when a PR is targeting a branch other than the main branch, such
as directly targeting a historical release branch.

We'll still run against origin/main when we're not running in GitHub
Actions, since that's _typically_ the correct branch to use for new
work, even if it will eventually get backported to a release branch.
2022-08-26 09:47:30 -07:00
Martin Atkins
246686813d build: goimports check supports any number of changed files
The previous implementation of this check tried to accumulate all of the
changed files into a single big string and then run goimports once with
all of them, but that approach ran into problems for changesets of a
certain (platform-specific) size due to limits on maximum command line
length.

This new version instead uses bash arrays and runs goimports separately
for each of the files which appear to have changed relative to the
base branch. This is likely to be slower to complete for changesets that
have many different changed files, but it's better for it to be slow than
to return an error and fail to check some of the files.
2022-08-26 09:47:30 -07:00
kmchau
031c8bba82
Update init.mdx 2022-08-26 09:02:15 +08:00
Megan Bang
4fab46749a update persist state 2022-08-25 14:57:40 -05:00
Martin Atkins
101d0d91af
Update CHANGELOG.md 2022-08-25 10:22:54 -07:00
Martin Atkins
f8669d2351
Update CHANGELOG.md 2022-08-25 10:16:56 -07:00
Martin Atkins
2ee9589650 lang/funcs: "timecmp" function
This is a complement to "timestamp" and "timeadd" which allows
establishing the ordering of two different timestamps while taking into
account their timezone offsets, which isn't otherwise possible using the
existing primitives in the Terraform language.
2022-08-25 10:15:42 -07:00
Laura Pacilio
03f5085026
Merge pull request #31686 from hashicorp/remove-future-statement-import
Remove future-facing statement from import page
2022-08-25 09:41:21 -04:00
Laura Pacilio
c7b2843539
Update website/docs/cli/import/usage.mdx 2022-08-24 18:41:39 -04:00
Laura Pacilio
46a40cb44a
Update website/docs/cli/import/usage.mdx 2022-08-24 18:40:20 -04:00
Laura Pacilio
89da56b932
Update usage.mdx 2022-08-24 18:35:39 -04:00
kmchau
0741760f3f
Update init.mdx
Suspect it is a typo...
2022-08-24 14:37:11 +08:00
Craig Wright
036db86c1f
Merge pull request #31672 from tochev/docs-fix-typo
docs: Fix condition example
2022-08-23 09:41:30 -07:00
kmoe
22db2e09ae
remove incorrect argument (#31666) 2022-08-23 10:33:43 +01:00
Martin Atkins
07225e0a61
Update CHANGELOG.md 2022-08-22 16:37:54 -07:00
Martin Atkins
a6de221a22 go.mod: go get github.com/zclconf/go-cty@v1.11.0
This fixes a possible panic in what Terraform calls the "flatten" function
in situations where a user passes in a null value of a sequence type.
The function will now treat that the same as a null value of any other
type.
2022-08-22 11:10:08 -07:00
Martin Atkins
f6cc907166 build: Disable errors for deprecated functions in staticcheck
Because we maintain multiple versions of Terraform across different
release branches, we aim to avoid creating needless differences between
the branches to maximize the chance of successful automatic backporting.

Part of that policy is that we don't make cross-cutting changes to respond
to deprecation of functions in upstream packages and instead we respond
to them gradually over time when we'd be changing the nearby code anyway,
or when new work requires using the replacement APIs.

In recognition of that, this turns of the staticcheck rule that would
otherwise force us to resolve all deprecations before moving forward with
any other change.
2022-08-22 10:59:12 -07:00
Martin Atkins
783a07d9e8 build: Use Go 1.19
Go 1.19's "fmt" has some awareness of the new doc comment formatting
conventions and adjusts the presentation of the source comments to make
it clearer how godoc would interpret them. Therefore this commit includes
various updates made by "go fmt" to acheve that.

In line with our usual convention that we make stylistic/grammar/spelling
tweaks typically only when we're "in the area" changing something else
anyway, I also took this opportunity to review most of the comments that
this updated to see if there were any other opportunities to improve them.
2022-08-22 10:59:12 -07:00
Tocho Tochev
4e506d5fda docs: Fix condition example 2022-08-21 23:54:37 +03:00
Craig Wright
023ab3207f
Merge pull request #31670 from hashicorp/form-fix
Minor copy fixes for the issue form title reminder text.
2022-08-19 17:12:35 -07:00
Craig Wright
a63a2e3ec8 Minor copy fixes for the issue form title reminder text. 2022-08-19 17:11:13 -07:00
Craig Wright
b10eb84ea1
Merge pull request #31669 from hashicorp/form-fix
Fixing placeholder values, adding usage note to bottom of the form.
2022-08-19 17:08:34 -07:00
Craig Wright
9ca1b18988 Fixing placeholder values, adding usage note to bottom of the form. 2022-08-19 17:07:03 -07:00
Craig Wright
dc0f196cbb
Merge pull request #31651 from hashicorp/issue-forms
Migrating from Markdown to Form style Github issues.
2022-08-19 16:44:43 -07:00
Craig Wright
95c133f2ec Modifying the version input to use shell rendering.
This simplifies entry for the user, no longer requiring markdown
formatting wrappers.
2022-08-19 16:29:42 -07:00
Alvin Huang
c27d068830
Merge pull request #31663 from hashicorp/fix-docker-version-label
set PRODUCT_VERSION for default docker build
2022-08-19 13:22:26 -04:00
Laura Pacilio
d20a1fa3b1
Merge pull request #31637 from szemek/system-parameter
docs: Use more consistent naming in Module Registry Protocol documentation
2022-08-19 11:47:18 -04:00
Alvin Huang
634c875bea set PRODUCT_VERSION for default docker build 2022-08-18 12:50:41 -04:00
Brandon Croft
76d40d281d
Merge pull request #31617 from glennsarti/gs/TF-410-add-prep-plan
Add Pre-Plan Run Tasks to Terraform CLI
2022-08-18 10:14:46 -06:00
James Bardin
9c9af81d00
Merge pull request #31660 from hashicorp/jbardin/module-subdir-globs
Expand module subdirectory globs
2022-08-18 12:04:46 -04:00
Glenn Sarti
8562f8a744 Add Pre-Plan Run Tasks to Terraform CLI
Prevously the cloud backend would only render post-plan run tasks. Now
that pre-plan tasks are in beta, this commit updates the plan phase to
render pre-plan run tasks.  This commit also moves some common code to
the common backend as it will be used by other task stages in the
future.
2022-08-18 10:08:57 +08:00
Glenn Sarti
b6a478b683 Update go-tfe to v1.7.0 2022-08-18 10:08:22 +08:00
James Bardin
553b8c6de5 expand module subdir globs 2022-08-17 16:27:58 -04:00
Przemysław Dąbek
39f0d91530
Apply suggestions from code review
Thanks @laurapacilio!

Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-08-17 18:14:29 +02:00
hc-github-team-tf-core
ec9c67e9ca Cleanup after v1.3.0-alpha20220817 release 2022-08-17 15:37:53 +00:00
hc-github-team-tf-core
61b7f83616
Release v1.3.0-alpha20220817 2022-08-17 15:25:05 +00:00
Alisdair McDiarmid
270406632e
Merge pull request #31212 from hashicorp/update-path-cwd
Update wording for 'path.cwd' to be explicit about implications
2022-08-17 09:17:20 -04:00
Alisdair McDiarmid
81b50892ed
Update references.mdx 2022-08-17 09:02:37 -04:00
Alisdair McDiarmid
d7377ca141
Merge branch 'main' into update-path-cwd 2022-08-17 08:58:26 -04:00
Alisdair McDiarmid
4960e6aeba
Merge pull request #31634 from hashicorp/alisdair/optional-object-attribute-explicit-null
typeexpr: Replace null attr values with defaults
2022-08-17 08:54:21 -04:00
Craig Wright
9854783d34
Merge pull request #31648 from nnzv/patch-3
typo: use destructions singular form
2022-08-16 15:17:38 -07:00
Craig Wright
ed274f3788
Merge pull request #31647 from nnzv/patch-2
doc: use american english
2022-08-16 15:16:51 -07:00
Craig Wright
aba0ac0fae Migrating from Markdown to Form style Github issues.
The goal of this change is to simplify the process of filing
issues with hashicorp/terraform. In the previous Markdown syntax,
the instructions tended to get washed out in a sea of comment
markers. The new Github Form Issues breaks each section into a form
element, with instructions printed clearly as HTML in the page.

We are further hoping to guide users to the correct repository when
filing provider issues, or the community forums when asking usage
questions.
2022-08-16 12:12:48 -07:00
kmoe
473334cded
Update CHANGELOG.md 2022-08-16 16:54:45 +02:00
kmoe
56a1e0d1c6
allow cross-package move statements (#31556) 2022-08-16 16:52:57 +02:00
Enzo Venturi
235a8b7fcc
typo: use destructions singular form 2022-08-16 01:21:32 -05:00
Enzo Venturi
467f1d32a0
doc: use american english
_Behaviour_ noun is standard in British English.
2022-08-16 01:17:18 -05:00
Martin Atkins
22633a280d website: Optional object attributes handling of null
Previously we didn't describe the interaction between default values and
callers explicitly passing "null".

We treat an explicit null as the same as omitting the attribute when
applying defaults, because that then allows callers to use the typical
pattern for conditional assignment, using explicit null as a fallback
to the module's defined default without having to duplicate that default:
    example = var.foo ? "hello" : null
2022-08-15 14:45:06 -07:00
Alisdair McDiarmid
f79e912a81
Update CHANGELOG.md 2022-08-12 13:55:02 -04:00