Commit Graph

93 Commits

Author SHA1 Message Date
Christian Mesh
586c45fe5a
Refactor encryption configuration (#1387)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-03-13 10:58:52 -04: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
Christian Mesh
ac3ed86617
Integrate encryption into plan serialization (#1292)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
2024-03-04 09:00:29 -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
Joshua Shanks
a7125c651a
Return false when assertBackendStateLocked fails and update comments for it and assertBackendStateUnlocked (#1106)
Signed-off-by: Joshua Shanks <jjshanks@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
2024-01-11 15:18:25 -05:00
Jon Johnson
cf0d953dc1
statemgr: Make Filesystem impl "correct" and fast (#579)
Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
2024-01-03 10:28:17 -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
Kuba Martin
9c789368dc
Stop reading providers from the HashiCorp registry based on the statefile if not specified in code. (#773)
Signed-off-by: Jakub Martin <kubam@spacelift.io>
2023-10-27 16:23:41 +02: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
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
Yaron Yarimi
c8acedd885
Rename github.com/placeholderplaceholderplaceholder/opentf to github.com/opentofu/opentofu (#461) 2023-09-20 14:35:35 +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
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
ecea3e2591 missed that 2023-08-22 14:15:25 +03:00
Elbaz
d80141255c last fixes 2023-08-22 12:49:16 +03:00
Elbaz
141e72246d fix tests + english 2023-08-21 19:33:20 +03:00
Elbaz
da73538433 local folder 2023-08-21 16:32:46 +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
Sebastian Rivera
08e58fd484 Fix saved plan test regressions, fixtures 2023-07-25 10:22:46 -04:00
Sebastian Rivera
31cf55fe12 Reword error message when using local exec 2023-07-24 14:12:44 -04: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
Liam Cervante
f74a8d16cf
[testing framework] implement expect_failures functionality (#33443) 2023-07-10 11:30:44 +01: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
James Bardin
4e8dd5866c update schemas type 2023-07-06 10:37:35 -04:00
James Bardin
53901a7e62 Add basic global schema cache
Add a single global schema cache for providers. This allows multiple
provider instances to share a single copy of the schema, and prevents
loading the schema multiple times for a given provider type during a
single command.

This does not currently work with some provider releases, which are
using GetProviderSchema to trigger certain initializations. A new server
capability will be introduced to trigger reloading their schemas, but
not store duplicate results.
2023-07-06 10:37:35 -04:00
CJ Horton
cdce4c4a6d write generated config when using the cloud integration 2023-05-30 00:17:02 -07:00
Liam Cervante
07aa7ee1d5
Propagate generated config filename into the Terraform graph (#33255) 2023-05-24 13:58:26 +02:00
Martin Atkins
8884bef59d backend/local: Allow storage impls to customize intermediate persistence
Previously we just always used the same intermediate state persistence
behavior for all state storages. However, some storages might have access
to additional information that allows them to tailor when they persist,
such as reacting to API rate limit status headers in responses, or just
knowing that a particular storage isn't suited to intermediate snapshots
at all for some reason.

This commit doesn't actually change any observable behavior yet, but it
introduces an optional means for a state storage to customize the behavior
which we may make use of in certain storage implementations in future
commits.
2023-05-23 15:25:48 -07:00
kmoe
b4d1146f58
plannable import: improve gen config human plan output (#33194)
* renderer: remove hard-coded config gen path

* mention config gen file in plan next steps
2023-05-15 15:21:41 +01:00
Liam Cervante
d5fed58fc5
plannable import: write generated config to out flag (#33186)
* plannable import: write generated config to out flag

* Add example command to diagnostic
2023-05-12 23:05:00 +01:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00: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
James Bardin
c02e7e8754 return early from opPlan when the plan is nil
While the returned plan is checked for nil in most cases, there was
a single point where the plan was dereferenced which could panic. Rather
than always guarding the dereferences, return early when the plan is
nil.
2023-03-10 09:34:47 -05:00