Commit Graph

89 Commits

Author SHA1 Message Date
Oleksandr Levchenkov
739a66a86c
fix panic when encryption enabled for remote and cloud backends (#1431)
Signed-off-by: ollevche <ollevche@gmail.com>
2024-03-25 20:42:18 +02:00
Christian Mesh
5ab6167bbf
Initial wiring of encryption through the command package (#1316)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-03-07 08:55:57 -05:00
Christian Mesh
2f5dcd5c0a
Integrate Encryption into State Backends (#1288)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-03-04 09:25:14 -05: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
Dmitry Kisler
7d73f2bbe6
Refactor tests to follow a safer way of setting envvars (#1215)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2024-01-31 11:25:02 +01:00
Joshua Shanks
4961996f51
Ignore version conflicts when unlocking state (#1123)
Signed-off-by: Joshua Shanks <jjshanks@gmail.com>
Signed-off-by: Kuba Martin <kubam@spacelift.io>
Co-authored-by: Kuba Martin <kubam@spacelift.io>
2024-01-17 12:02:27 +01:00
Christian Mesh
06b31cd26f
Replace additional Terraform -> OpenTofu (#1007)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: James Humphries <jamesh@spacelift.io>
2023-12-13 11:35:41 -05:00
Christian Mesh
54d2130473
Find additional places where terraform should be replaced with tofu (#1001)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2023-12-13 07:18:43 -05:00
Christian Mesh
25a6f51732
898 consolidate and remove tfe addr [part 2] (#998)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2023-12-12 11:22:39 -05: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
James Humphries
9c24b6183a
Revert PRs that introduced propogating contexts (#835)
Co-authored-by: Dmitry Kisler <admin@dkisler.com>
2023-11-08 21:09:14 +00:00
Igor Savchenko
572d8d95d1
Update user-agent from go-tfe to opentofu where go-tfe is used (#807) 2023-11-02 12:11:13 +01:00
Marcin Wyszynski
772ac1fc35
Pass context to all statemgr.Locker operations (#789)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-25 14:22:11 +02:00
Marcin Wyszynski
275dd116f9
Pass context to all remote.Client operations (#786)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-25 12:37:58 +02:00
Marcin Wyszynski
da1ba56b41
Make backend.Workspaces accept a context (#784)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 19:59:28 +02:00
Marcin Wyszynski
925db6dbc5
Make backend.DeleteWorkspace accept a context (#782)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 16:55:03 +02:00
Marcin Wyszynski
a6a54c3777
Make backend.StateMgr accept a context (#780)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 15:47:46 +02:00
Marcin Wyszynski
f906c4792a
Make backend.Configure accept a context (#779)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 13:55:21 +02:00
Marcin Wyszynski
b17374dc44
Make backend.PrepareConfig accept a context (#777)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 13:34:15 +02:00
Marcin Wyszynski
bda32938e4
Make backend.ConfigSchema accept a context (#776)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-10-24 13:14:01 +02:00
RLRabinowitz
26fb627af9
Remove all Terraform mentions in STDOUTs in the codebase (#704) 2023-10-12 14:24:04 +01:00
RLRabinowitz
e0ecd2ebb3
Use registry.opentofu.org as the default registry (#379)
Signed-off-by: RLRabinowitz <rlrabinowitz2@gmail.com>
2023-10-03 10:49:38 +03:00
Dmitry Kisler
a127607a85
Rename terraform to tofu in GoString method and docstrings (#576)
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
2023-09-26 19:09:27 +02:00
Yaron Yarimi
487d9bc6a4
Rename multiple packages to OpenTofu (addrs, backend, command) (#506) 2023-09-21 15:38:46 +03:00
Yaron Yarimi
794e3413bb
Rename opentf package to tofu (#466) 2023-09-20 15:16:53 +03:00
Elbaz
b524b2bdbe
Update internal/httpclient folder to OpenTofu (#467) 2023-09-20 14:59:20 +03:00
Yaron Yarimi
c8acedd885
Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +03:00
Lars Lehtonen
9e94fa8860
Missed Wrapped Errors (#441) 2023-09-19 10:10:18 +03:00
Lars Lehtonen
8044800a31
internal/backend: wrap formatted errors (#396) 2023-09-14 13:57:12 +03:00
Lars Lehtonen
bfbe8ee4df
internal/backend: deprecate io/ioutil (#312)
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2023-09-06 19:41:23 +02:00
Marcin Wyszynski
12897327b6
Require hostname for cloud/remote backends and login/logout (#291)
Signed-off-by: Marcin Wyszynski <marcin.pixie@gmail.com>
2023-09-06 12:54:39 +02:00
RLRabinowitz
035896a665 Remove terraform test file names in internal/backend/remote tests 2023-08-28 17:14:19 +03:00
RLRabinowitz
90dce4dd3c go fmt, change import order 2023-08-28 14:22:54 +03:00
RLRabinowitz
42e7c5b25c Replace internal/terraform -> internal/opentf 2023-08-28 14:21:34 +03:00
Elbaz
9362df1d9e rename func 2023-08-27 17:38:54 +03:00
Marcin Wyszynski
68e0b50085
Remove user-facing mentions of Hashi TFE/TFC (#154) 2023-08-23 18:04:21 +02:00
Elbaz
6e17054f15 enterprise 🌈 2023-08-22 14:48:33 +03:00
Elbaz
d80141255c last fixes 2023-08-22 12:49:16 +03:00
Elbaz
841025ba26 renames 2023-08-22 11:12:20 +03:00
Elbaz
a8d998fd9e remote folder 2023-08-21 18:19:35 +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
Nick Fagerlund
f9d937a4dd Apply a confirmable run when given a saved cloud plan (#33270)
It displays a run header with link to web UI, like starting a new plan does, then confirms the run
and streams the apply logs. If you can't apply the run (it's from a different workspace, is in an
unconfirmable state, etc. etc.), it displays an error instead.

Notable points along the way:

* Implement `WrappedPlanFile` sum type, and update planfile consumers to use it instead of a plain `planfile.Reader`.

* Enable applying a saved cloud plan

* Update TFC mocks — add org name to workspace, and minimal support for includes on MockRuns.ReadWithOptions.
2023-07-24 14:12:40 -04:00
Brandon Croft
c1a730314d
Relocate localterraform.com aliasing to backend configurators
Previously, remote and cloud backends would automatically alias localterraform.com as the configured hostname during configuration. This turned out to be an issue with how backends could potentially be used within the builtin terraform_remote_state data source. Those data sources each configure the same service discovery with different targets for localterraform.com, and do so simultaneously, creating an occasional concurrent map read & write panic when multiple data sources are defined.

localterraform.com is obviously not useful for every backend configuration. Therefore, I relocated the alias configuration to the callers, so they may specify when to use it. The modified design adds a new method to backend.Enhanced to allow configurators to ask which aliases should be defined.
2023-07-21 09:55:41 -06:00
Liam Cervante
6882dd9530
testing framework: introduce test command optional flags (#33504)
* testing framework: introduce test command optional flags

* address consistency checks
2023-07-19 10:07:46 +02:00
James Bardin
cf5ebaf685 s/Schemas/ProviderSchema/ 2023-07-06 10:37:35 -04:00
James Bardin
36d34135ad replace remaining types in tests 2023-07-06 10:37:35 -04:00
Brandon Croft
19b17ad0a2
remote: when saving state, create a pending state version then upload 2023-06-21 12:30:33 -06:00
CJ Horton
8a3f4e903b generating configuration is not allowed with the remote backend 2023-05-31 11:51:39 -07:00
Martin Atkins
efdc6e52bc cloud: Skip intermediate state snapshots in Terraform Cloud/Enterprise
We've seen some concern about the additional storage usage implied by
creating intermediate state snapshots for particularly long apply phases
that can arise when managing a large number of resource instances together
in a single workspace.

This is an initial coarse approach to solving that concern, just restoring
the original behavior when running inside Terraform Cloud or Enterprise
for now and not creating snapshots at all.

This is here as a solution of last resort in case we cannot find a better
compromise before the v1.5.0 final release. Hopefully a future commit
will implement a more subtle take on this which still gets some of the
benefits when running in a Terraform Enterprise environment but in a way
that will hopefully be less concerning for Terraform Enterprise
administrators.

This does not affect any other state storage implementation except the
Terraform Cloud integration and the "remote" backend's state storage when
running inside a TFC/TFE-driven remote execution environment.
2023-05-23 15:25:48 -07:00