Commit Graph

29705 Commits

Author SHA1 Message Date
Martin Atkins
95f26b340b build: "Quick Checks" no longer uses goenv
goenv was making things more complicated than needed since it's really
designed to help with interactive use in a shell more than automated use
like this.

Instead, we'll follow the same strategy that our build.yml was doing of
just reading the .go-version file directly and then using the official
actions/setup-go action to do the actual installation. The key advantage
here is that Go ends up installed in a way where just running "go" will
do the right thing, and we no longer need to fuss with shims and
version-based path prefixes.

Rather than duplicating the logic from build.yml, instead it's factored
out into a separate composite action which both build.yml and checks.yml
will now share, in case we want to change the Go version selection
methodology in the future.
2022-04-04 08:12:44 -07:00
Martin Atkins
67fedd48a6 build: "Quick Checks" avoid repeating Install Go
This factors out the "Install Go" step into a separate composite action
which we can then call from both of the jobs that need it.

We can't factor out the "Cache Go Modules" because GitHub doesn't allow
composite actions to refer to other external actions.
2022-04-04 08:12:44 -07:00
Martin Atkins
9210ce6cdd build: GitHub Actions "Quick Checks" workflow
This is intended to eventually replace the CircleCI-based checks we use
as part of the PR process in this repository. We're already using GitHub
Actions for various other processes in this repository, so this change is
motivated by consistency of having all of our automation running in the
same system and written in the same language.

This is not a complete replacement for our CircleCI workflow yet, and
probably won't ever be because the CircleCI workflow contains some steps
that are arguably redundant with other processes we follow elsewhere.
However, the CircleCI workflow remains for now and won't be removed until
we're satisfied that enough of it is replicated by this GitHub Actions
workflow.
2022-04-04 08:12:44 -07:00
Martin Atkins
49d7c879ac Fix problems caught by staticcheck v0.3.0
This will allow us to upgrade to this version in a later commit without
causing the our build checks to fail.
2022-04-04 08:12:44 -07:00
kmoe
58b563e440
Update CHANGELOG.md 2022-04-01 10:12:25 +01:00
kmoe
5907a86301
command/format: Correctly quote diff object keys (#30766)
When rendering a diff, we should quote object attribute names if the
string representation is not a valid identifier. While this is not
strictly necessary, it makes the diff output more closely resemble the
configuration language, which is less confusing.

This commit applies to both top-level schema attributes and any object
value attributes. We use a simplistic "%q" Go format string to quote the
strings, which is not strictly identical to HCL's quoting requirements,
but is the pattern used elsewhere in HCL and Terraform.

Co-Authored-By: Katy Moe <katy@katy.moe>

Co-authored-by: Alisdair McDiarmid <alisdair@users.noreply.github.com>
2022-04-01 10:09:28 +01:00
Lars Lehtonen
88c9b90c93
internal/backend/remote-state/oss: fix dropped error (#30352) 2022-04-01 08:07:31 +01:00
Jane
8d490aad9f
Merge pull request #30774 from hashicorp/janehojy-patch-1
Add `hostname` argument to cloud block
2022-04-01 14:22:38 +08:00
Jane
4de27fc52b
Update website/docs/language/settings/terraform-cloud.mdx
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-04-01 14:22:14 +08:00
James Bardin
0bd59238d6
Merge pull request #30765 from hashicorp/jbardin/contributing-attributes
improve the contributing attributes filter
2022-03-31 16:56:09 -04:00
UKEME BASSEY
1c9929a378
Merge pull request #30773 from hashicorp/uk1288/fix-for-cloud-integration-panic
command/meta_backend: fix for cloud integration panic
2022-03-31 13:53:00 -04:00
Alisdair McDiarmid
52995ae468
Update CHANGELOG.md 2022-03-31 13:44:41 -04:00
gabriel376
f5a8608989
cli: Make state commands check required version (#30511) 2022-03-31 13:42:42 -04:00
Sebastian Rivera
6ce6955a4f
Merge pull request #30776 from hashicorp/sebasslash/resolve-flaky-env-var-test
Fix a flaky test manipulating environment variables
2022-03-31 10:28:26 -04:00
Sebastian Rivera
a52c87cb5a Fix a flaky test manipulating environment variables
This test resolves an issue where variables were going unset causing leaks into other test
cases and therefore resulting in failures.
2022-03-31 09:57:15 -04:00
Jane
5b6eaa4fea
Add hostname argument to cloud block 2022-03-31 09:50:37 +08:00
Martin Atkins
d3e7c5e8a9
Update CHANGELOG.md 2022-03-30 16:18:55 -07:00
Martin Atkins
9f4b84c35e Build official releases with Go 1.18
There is no special reason to do this; we just typically adopt the latest
minor release of the Go toolchain for each new minor release of
Terraform CLI so that we can make use of its new library and language
features gradually over the subsequent patch releases.

Adopting early will give us more time to exercise this and catch any
wrinkles before the Terraform CLI v1.2 release.
2022-03-30 16:15:38 -07:00
uk1288
9093b487fd fix for cloud integration panic 2022-03-30 17:50:08 -04:00
Sebastian Rivera
910966ccbe
Merge pull request #30748 from hashicorp/sebasslash/add-tf-hostname-env-var
Add TF_HOSTNAME env var support
2022-03-30 15:29:05 -04:00
Sebastian Rivera
7af879f680 Update changelog entry for TF_ORGANIZATION and TF_HOSTNAME 2022-03-30 12:39:28 -04:00
Sebastian Rivera
100031a2d9 Update docs to include TF_HOSTNAME env var 2022-03-30 11:54:51 -04:00
Sebastian Rivera
232d48fe00 Add support for TF_HOSTNAME env var 2022-03-30 11:54:50 -04:00
Sebastian Rivera
b4b4f4e9d9
Merge pull request #30719 from hashicorp/sebasslash/add-tf-org-env-var
Add TF_ORGANIZATION env var support
2022-03-30 11:41:07 -04:00
Sebastian Rivera
b1c22d333e Fix error formatting for missing env and config value
We previously used to throw an error denoting where in the configuration the attribute was missing or invalid.
Considering that organization can be now be omitted from the configuration, our previous error message will be
improperly formatted. This commit also updates the message to mention `TF_ORGANIZATION` as a valid substitute if
organization is missing or invalid in the configuration.
2022-03-30 11:04:30 -04:00
James Bardin
09dde8d5ed improve the contributing attributes filter
The initial rough implementation contained a bug where it would
incorrectly return a NilVal in some cases.

Improve the heuristics here to insert null values more precisely when
parent objects change to or from null. We also check for dynamic types
changing, in which case the entire object must be taken when we can't
match the individual attribute values.
2022-03-30 10:04:48 -04:00
Matthias Baur
971c899c12
Clarify multiple times usage (#30724)
* Clarify multiple times usage


Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2022-03-30 09:52:49 +01:00
Laura Pacilio
38dd0ef2f3
Merge pull request #30423 from noce2/patch-1
Docs Update: Show example of state lock table access control
2022-03-29 15:20:49 -04:00
Nsikan
a813854a82
Update website/docs/language/settings/backends/s3.mdx
Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
2022-03-29 16:40:59 +01:00
Jamie Finnigan
032a4d0837
update from go 1.17.2 to 1.17.8 (various bug & security fixes) (#30756) 2022-03-29 09:07:30 +01:00
Alisdair McDiarmid
120d096615
Merge pull request #30747 from george-mengelberg/patch-1
Description of '-' symbol as used in format()
2022-03-28 12:58:12 -04:00
Laura Pacilio
b5c0955cb9
Merge pull request #30712 from hashicorp/file-provisioner-powershell-warning
Add PowerShell note to file provisioner page
2022-03-28 11:13:28 -04:00
hc-github-team-tf-core
11aaff859a Cleanup after v1.2.0-alpha-20220328 release 2022-03-28 10:27:27 +00:00
hc-github-team-tf-core
9ba701fb1e
Release v1.2.0-alpha-20220328 2022-03-28 09:54:29 +00:00
Sebastian Rivera
b260883a98 Update docs to mention TF_ORGANIZATION env var 2022-03-26 16:44:16 -04:00
Sebastian Rivera
45357f5004 Add TF_ORGANIZATION env var support
TF_ORGANIZATION will serve as a fallback for configuring the organization in the `cloud`
block. This is the first step to make it easier for users wanting to configure Terraform
programmatically.
2022-03-26 16:44:16 -04:00
george-mengelberg
d7316e79ca
Description of '-' symbol as used in format()
The existing description for the '-' symbol as use in format() stated that the result would padded spaces to the left.  When tested in via 'terraform console' using format("%-10.1f", 3) the result was "3.0       "

Terraform v1.1.7
2022-03-26 08:26:44 -07:00
kmoe
7e849473a4
version: main branch is tracking v1.2 2022-03-25 18:12:57 +00:00
Katy Moe
8ee0ba12f9
Revert "main branch is now tracking v1.3"
This reverts commit 28fa6f4515.
2022-03-25 18:12:25 +00:00
Katy Moe
60d1becff7
Revert "version: main branch is now tracking v1.3"
This reverts commit 100056269f.
2022-03-25 18:12:09 +00:00
kmoe
28fa6f4515
main branch is now tracking v1.3 2022-03-25 17:31:11 +00:00
kmoe
100056269f
version: main branch is now tracking v1.3 2022-03-25 17:29:58 +00:00
Luces Huayhuaca
c1ed0fa0b1
Update CHANGELOG.md (#30738)
Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2022-03-25 07:56:34 -07:00
Markus Bösling
275ff5b223
double word removed (#30679) 2022-03-25 14:31:52 +00:00
kmoe
d9186fa9f8
Update CHANGELOG.md 2022-03-25 14:29:45 +00:00
shinbunbun
a1ead44c71
cidrnetmask() produce an error with IPv6 (#30703)
* Add error handling for IPv6



Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2022-03-25 14:26:47 +00:00
rita
4b516bb90e
Merge pull request #30728 from hashicorp/link_workflow_tutorials
Link workflow tutorials from docs
2022-03-24 11:11:42 -04:00
Michele Degges
187a34a89e
[RelAPI Onboarding] Add release API metadata file (#30717) 2022-03-23 14:20:54 -07:00
Luces Huayhuaca
bdc7d8c0a1
Upgrade go-tfe dependency to use 1.0 version. It contains breaking changes, so we are updating method signatures, method names and the type of optional parameters, as needed. (#30626) 2022-03-23 13:58:47 -07:00
ritsok
bef18c47cb Link workflow tutorials from docs 2022-03-23 16:38:36 -04:00