Commit Graph

106 Commits

Author SHA1 Message Date
Elbaz
b3080211d0 rollback protocol namings 2023-08-22 14:20:40 +03:00
Elbaz
d80141255c last fixes 2023-08-22 12:49:16 +03:00
Elbaz
c10a300b58 s3 2023-08-21 18:24:40 +03:00
Elbaz
15ae0bc167 oss 2023-08-21 18:23:08 +03:00
Elbaz
e6d0a90db5 k8s 2023-08-21 18:22:37 +03:00
Elbaz
44da5b5e3a more 2023-08-21 18:21:16 +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
Graham Davison
47fc769da9 Adds tests for region 2023-07-24 17:20:16 -07:00
Graham Davison
f3ce646756 Adds authentication tests 2023-07-24 16:23:52 -07:00
Graham Davison
344e9de6b9 Linting fixes 2023-07-17 11:34:33 -07:00
Graham Davison
d179b686d9 Consolidates endpoint tests 2023-07-06 16:05:52 -07:00
Graham Davison
2f00c86255 Adds endpoint tests when configured in configuration 2023-07-06 16:05:52 -07:00
Graham Davison
90c10ebbe9 Removes redundant ARN parsing 2023-07-06 16:05:52 -07:00
Graham Davison
29e14d148b Reorders skip_... parameters 2023-07-06 16:05:52 -07:00
Graham Davison
c3f4f9cedd Fixes region validation 2023-07-06 16:05:52 -07:00
Graham Davison
454eed63e7 Adds KMS Key validation 2023-07-06 16:05:52 -07:00
Graham Davison
2fda09aab2 Updates attribute validation messages 2023-07-06 16:05:52 -07:00
Graham Davison
e8c7722d3e Restores conflict between kms_key_id and envvar AWS_SSE_CUSTOMER_KEY 2023-07-06 16:05:52 -07:00
Graham Davison
827d7bd384 Combines sse_customer_key and AWS_SSE_CUSTOMER_KEY validation 2023-07-06 16:05:52 -07:00
Graham Davison
4eaa44c5a5 Adds functions for clearing all envvars 2023-07-06 16:05:52 -07:00
Graham Davison
2d12f242c7 Adds checks for not getting validation errors when they are expected 2023-07-06 16:05:52 -07:00
Graham Davison
95eb523c02 Sets service endpoints from envvar and adds tests 2023-07-06 16:05:52 -07:00
Graham Davison
8d018cfef3 Adds test for setting region from envvars 2023-07-06 16:05:52 -07:00
Graham Davison
9bea21e8b2 Moves schema to ConfigSchema and removes references to legacy schema 2023-07-06 16:05:52 -07:00
Graham Davison
467e6256da Moves configuration to Configure 2023-07-06 16:05:52 -07:00
Graham Davison
381006742b Moves validation to PrepareConfig 2023-07-06 16:05:52 -07:00
Graham Davison
b5de540643 Fully populates schema values 2023-07-06 16:05:52 -07:00
Graham Davison
9257dfa8a7 S3 backend: Adds tests for defaults and validation 2023-07-06 16:05:52 -07:00
Alisdair McDiarmid
ad2298b114
Merge pull request #33108 from unRob/patch-1
Return debuggable CAS errors on consul state put
2023-06-30 09:50:11 -04:00
Roberto Hidalgo
8e5a66b2f5
use multierror.Append instead of append
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
2023-06-26 13:02:58 -04:00
Roberto Hidalgo
787cc693cd
use go-multierror instead of manually joining error reasons
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
2023-06-24 11:04:55 -06:00
guimin.hgm
ce8790c939 backend/oss: Removes the deprecated warning for configuraion variable assume_role 2023-06-12 12:34:47 -07:00
hashicorp-copywrite[bot]
325d18262e [COMPLIANCE] Add Copyright and License Headers 2023-05-02 15:33:06 +00:00
Roberto Hidalgo
1b7f772f8b
fix breaking code
this is what i get for submitting PRs late at night
2023-04-27 10:13:38 -06:00
Roberto Hidalgo
0dda1d5c61
Return debuggeble CAS errors on consul state put
ran into this error while running terraform on a container and saving state to Consul. I suspect my policy needs tweaking but it's impossible to tell with an error like this:

```
╷
│ Error: Failed to save state
│ 
│ Error saving state: consul CAS failed with transaction errors:
│ [0xc0006e93c8]
╵
```

This PR makes the will include the error messaage in the details so I can continue debugging
2023-04-26 23:44:39 -06:00
Rémi Lapeyre
af571b2642
Improve environment variable support for the pg backend (#33045)
* Improve environment variable support for the pg backend

This patch does two things:
  - it adds environment variable support to the parameters that did
    not have it (and uses `PG_CONN_STR` instead of `PGDATABASE` which is
    actually more appropriate to match the behavior of other PostgreSQL
    utilities)
  - better documents how to give the connection parameters as environment
    variables for the ones that were already supported based on the
	recommendation of @bsouth00

I will prepare a backport of the documentation part of this once it is
merged.

Closes https://github.com/hashicorp/terraform/issues/33024

* Remove global variable in test of the PG backend
2023-04-21 08:39:19 +02:00
janaurka
1f603b1a7f
backend/pg: Accept connection string in PGDATABASE environment variable 2023-04-05 15:42:44 -07:00
Yin Luo
e9b066f514
Support assume role for cos backend (#32631)
* go get github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts/v20180813@v1.0.588

* feat:support assume_role for COS backend

* update go.mod and go.sum

* change secret_id and secret_key from required to optional

* update cos doc

* update logic by comments

* rm sensitive info in log
2023-02-13 10:25:58 +01:00
megan07
d7d8a2262c
Merge pull request #32557 from bharathkkb/gcs-backend-impersonate-envvar
Add a GCS backend specific env var for impersonation
2023-02-09 09:28:26 -06:00
Sheridan C Rawlins
75e5ae27a2
[fixes 31700] Add mTLS support for http backend by way of client cert & key, as well as enterprise cacert. (#31699)
* Add mTLS support for http backend by way of client cert & key, as well as enterprise cacert.

* Fix style.

* Skip cert validation to be sure error is related to missing client cert; not untrusted server cert.

* Remove misplaced err check.

* Fix the size of test using http backend.

* Just for correctness, include all certs in the pem encoded cert - sometimes certs come with a chain of their signers.

* Adjusted names as recommended in PR comments.

* Adjusted names to be full-length and more descriptive.

* Added full-fledged testing with mTLS http server

* Fix goimports.

* Fix the names of the backend config.

* Exclusive lock for write and delete.

* Revert "Fix goimports."

This reverts commit 7d40f6099fbbb675fb2e25e35ee40aeafe3d0a22.

* goimports just for server test.

* Added the go:generation for the mock.

* Move the TLS configuration out to make it more readable - don't replace the HTTPClient as the retryablehttp already creates one - just configure its TLS.

* Just switch the client/data params - felt more natural this way.

* Update internal/backend/remote-state/http/backend.go

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* Update internal/backend/remote-state/http/testdata/gencerts.sh

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* Update internal/backend/remote-state/http/backend.go

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* Update internal/backend/remote-state/http/backend.go

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* Update internal/backend/remote-state/http/backend.go

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* Update internal/backend/remote-state/http/backend.go

Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>

* the location of the file name is not sensitive.

* Added error if only one of client_certificate_pem and client_private_key_pem are set.

* Remove testify from test cases; use t.Error* for assert and t.Fatal* for require.

* Fixed import consistency

* Just use default openssl.

* Since file(...) is so trivial to use, changed the client cert, key, and ca cert to be the data.

See also https://github.com/hashicorp/terraform-provider-http/pull/211

Co-authored-by: Sheridan C Rawlins <scr@ouryahoo.com>
Co-authored-by: kmoe <5575356+kmoe@users.noreply.github.com>
2023-01-26 14:08:07 +00:00
bharathkkb
05ff3c3278 Add a GCS backend specific env var for impersonation 2023-01-21 05:20:31 +00:00
xiaozhu36
ec62ca1b70 backend/oss: Ignore the getting oss endpoint error and using string concat instead; Improves the error message level 2022-12-04 11:51:29 +08:00
James Bardin
79175b29f3
Merge pull request #32261 from sivchari/fix-prealloc
fix: pre allocate for composite literal
2022-11-22 09:18:47 -05:00
Jarrett Spiker
1dafd7c0b1 Fix test compilation errors caused by interface change 2022-11-21 14:35:33 -05:00
Jarrett Spiker
060255a9d5 Use safe or force workspace delete for cloud backend 2022-11-21 14:35:33 -05:00
sivchari
ef4798de8e fix: pre allocate for composite literal 2022-11-22 02:20:54 +09:00
Paschalis Tsilias
4cb355f3d6 S3 Backend : Bucket key should not contain trailing slash 2022-10-31 16:19:26 -07:00
Tom Bamford
ff68c8d129
Merge pull request #31966 from kschu91/feature/azure-generic-oidc
backend/azurerm: add support for generic OIDC authentication
2022-10-31 11:25:36 +00:00
Tom Bamford
82c0b440dc
Fix default values 2022-10-12 13:24:16 +01:00
Sarah French
89ef27d3b4
Add Private Service Connect endpoint support to GCS backend (#31967)
* Add support for `storage_custom_endpoint` in `gcs` backend

* Add documentation for new `storage_custom_endpoint` endpoint

* Empty commit to trigger Vercel deployment
2022-10-11 18:57:09 +01:00