Commit Graph

132 Commits

Author SHA1 Message Date
Nathan Baulch
ea558d9d4b
Fix typos (#1905)
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-08-29 13:20:33 -04:00
Oleksandr Levchenkov
5a161c8bcc
add automated copyright header check (#1696)
Signed-off-by: ollevche <ollevche@gmail.com>
Signed-off-by: Oleksandr Levchenkov <ollevche@gmail.com>
2024-06-03 16:49:36 +03:00
Janos
dd5f9afe89
Coding standards (#1423)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: ollevche <ollevche@gmail.com>
Co-authored-by: James Humphries <james@james-humphries.co.uk>
Co-authored-by: Oleksandr Levchenkov <ollevche@gmail.com>
2024-05-13 11:39:46 +02:00
Christian Mesh
07a9185767
Initial implementation of aws_kms encryption.key_provider (#1349)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Signed-off-by: James Humphries <james@james-humphries.co.uk>
Co-authored-by: James Humphries <james@james-humphries.co.uk>
2024-03-13 13:19:20 -04:00
namgyalangmo
cb2e9119aa
Update copyright notice (#1232)
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
2024-02-08 09:48:59 +00:00
Christian Mesh
abd324ea7c
Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
Janos
15bef1428a
Fixes #898: Replace hashicorp and terraform references (#973)
Signed-off-by: Janos Bonic <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2023-12-08 08:03:09 -05:00
Dmitry Kisler
398a2cf4f8
Add definition of integration tests with Postgres backend (#920)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2023-11-24 14:48:03 +01:00
Christian Mesh
637c65f6f2
Update s3 remote state tests (#865)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2023-11-14 10:40:25 -05:00
Serdar Dalgıç
7a1d3f3ac1
Add DEBUGGING.md (#711)
Signed-off-by: Serdar Dalgıç <sd@serdardalgic.org>
Co-authored-by: James Humphries <James@james-humphries.co.uk>
2023-10-25 17:11:12 +02:00
Elbaz
8465827f03
go build / go install should generate tofu binary (#590) 2023-09-27 15:37:55 +03:00
Elbaz
922f61d847
Update scripts directory to OpenTofu (#508) 2023-09-20 16:51:36 +03:00
Yaron Yarimi
c8acedd885
Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
Marcin Białoń
1b6233617b
Release workflow (#173)
Signed-off-by: Marcin Białoń <mbialon@spacelift.io>
2023-08-29 11:00:24 +02:00
RLRabinowitz
ef0bcc3d43 Rename terraform_attr file and debug-terraform script 2023-08-27 13:34:20 +03:00
Kuba Martin
8469049a48
Rename scripts to use OpenTF (#166)
Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-08-24 11:43:51 +02:00
Yaron Yarimi
da56f706e7 Renaming of Terraform to OpenTF 2023-08-22 15:45:05 +03:00
Kuba Martin
ebcf7455eb
Rename root module name. (#4)
* Rename module name from "github.com/hashicorp/terraform" to "github.com/placeholderplaceholderplaceholder/opentf".

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Gofmt.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Regenerate protobuf.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix comments.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo issue and pull request link changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo comment changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Fix comment.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* Undo some link changes.

Signed-off-by: Jakub Martin <kubam@spacelift.io>

* make generate && make protobuf

Signed-off-by: Jakub Martin <kubam@spacelift.io>

---------

Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-08-17 14:45:11 +02:00
CJ Horton
11a68eaa40 set useDevelopmentVersion correctly for release builds 2023-07-17 11:11:35 -07:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
kmoe
755757e8b2
build: exclude .go-version from imports check (#32141) 2022-11-02 15:49:01 +00:00
Martin Atkins
746bd49723 build: Exclude .pb.go files from goimports checking
protoc-gen-go generates non-style-compliant import directives, but since
those files are just generated anyway we don't need to worry too much
about what style they are in: the style that protoc-gen-go generates is
the canonical style for these ones.
2022-08-26 11:02:52 -07:00
Martin Atkins
443d470a86 build: FIXME to make goimportscheck.sh work on Bash 3 maybe 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
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
Liam Cervante
c4e223c7a0
Only perform the importscheck on added or modified files (#31605) 2022-08-09 16:50:54 +01:00
Liam Cervante
985325a0fc
Remove -local flag from goimports check (#31555) 2022-08-02 15:08:38 +01:00
Liam Cervante
afd273d636
Add goimports as a check to the Github commit actions (#31432)
* Add goimports as a check to the Github commit actions

* check diff against main instead of last commit

* goimports should fix the problems

* fix up conditionals and wildcard matching

* specify origin/main in diff

* fetch main branch when checkout

* back to origin main
2022-07-19 10:14:28 +01:00
Klaus Frank
39bbcf2f9c
Fix for newer go version (#30889)
go get for compiling and installing is deprecated. Updating it to the new "go install"
2022-04-22 14:30:35 +01: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
James Bardin
f031fcaa97 no need for TF_FORK=0 2021-10-28 11:51:39 -04:00
Martin Atkins
965c0f3f91 build: Run staticcheck with "go run"
Running the tool this way ensures that we'll always run the version
selected by our go.mod file, rather than whatever happened to be available
in $GOPATH/bin on the system where we're running this.

This change caused some contexts to now be using a newer version of
staticcheck with additional checks, and so this commit also includes some
changes to quiet the new warnings without any change in overall behavior.
2021-10-12 11:42:17 -07:00
Alisdair McDiarmid
e09bad76ff build: Add exhaustive switch statement lint
For now, only check the JSON views package, since this was the instance
that most recently tripped us up. There are a few dozen failures
elsewhere in Terraform which would need to be addressed before expanding
this to other packages.
2021-09-24 15:12:44 -04:00
James Bardin
a3fb07d008 add staticcheck make target
cleanup the old fmtcheck script while we're in here
2021-09-01 11:36:21 -04:00
Martin Atkins
ce96d82de0 build: Centralize our protobuf compilation steps
We have a few different .proto files in this repository that all need to
get recompiled into .pb.go files each time we change them, but we were
previously handling that with some scripts that just assumed that protoc
and the relevant plugins were already installed on the system somewhere,
at the right versions.

In practice we've been constantly flopping between different versions of
these tools due to folks having different versions installed in their
development environments. In particular, the state of the .pb.go files
in the prior commit wasn't reproducible by any single version of the tools
because they've all slightly diverged from one another.

In the interests of being more consistent here and avoiding accidental
inconsistencies, we'll now centralize the protocol buffer compile steps
all into a single tool that knows how to fetch and install the expected
versions of the various tools we need and then run those tools with the
right options to get a stable result.

If we want to upgrade to either a newer protoc or a newer protoc-gen-go
in future then we'll do that in a central location and update all of the
.pb.go files at the same time, so that we're always consistently tracking
the same version of protocol buffers everywhere.

While doing this I attempted to keep as close as possible to the toolchain
we'd most recently used, but since they were not consistent with each
other they've now all changed which version numbers they record at minimum,
and the planproto stub in particular now also has a slightly different
descriptor serialization but is otherwise offering the same API.
2021-08-20 16:18:48 -07:00
Pam Selle
83e6703bf7 Remove revision from version command
The revision field is only populated on dev builds so this means
most releases of Terraform have an empty "terraform_revision" field
in the JSON output. Since we recommend developers use go tooling
to `go build` this tool when developing, the revision is not useful
data and so it is removed.
2021-01-12 16:35:30 -05:00
James Bardin
1032db4f9d remove generate-plugins script and test
We no longer use internal plugins.
2020-12-02 12:45:00 -05:00
Pam Selle
e39e0e3d04 Remove vendor provisioners and add fmt Make target
Remove chef, habitat, puppet, and salt-masterless provsioners,
which follows their deprecation. Update the documentatin for these
provisioners to clarify that they have been removed from later versions
of Terraform. Adds the fmt Make target back and updates fmtcheck script
for correctness.
2020-11-17 11:22:03 -05:00
Kristin Laemmert
bad0adb996
build: remove unused scripts (#26484)
* build: remove unused build scripts
2020-10-06 13:26:38 -04:00
Alvin Huang
b52715a8f7 use alpine:latest as the base image for terraform docker containers 2020-07-01 16:03:06 -04:00
Julian Grinblat
0b3c0f64c2
build: Allow building on non-terraform named directory (#25340)
* Allow building on non-terraform named directory

* Fix gofmt errors

* Fix generate-plugins.go unused variable error
2020-06-26 12:07:58 -04:00
Alvin Huang
ada89661d5 don't update deps of gox in docker build and use -mod=readonly 2020-06-17 15:34:30 -04:00
Alvin Huang
9364cf5964 bump base image of light docker image to alpine:3.12 2020-06-17 13:08:28 -04:00
Alvin Huang
2de5556491 pass ARG to second stage docker light image build 2020-06-17 13:07:30 -04:00
Alvin Huang
1c3805efae fix make fmtcheck hint output 2020-06-17 11:06:19 -04:00
Alvin Huang
21b78a15be remove travis script file 2020-04-06 10:49:28 -04:00
Pam Selle
9ae266f8fe Coverage updates, roll back makefile change, use travis specific script 2020-03-03 14:10:17 -05:00
Radek Simko
01bc8898fc
make: Add check for protobuf dependencies 2019-09-05 14:30:54 +02:00
Radek Simko
5b9f2fafc8 Standardise directory name for test data 2019-06-30 10:16:15 +02:00