You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ This project is not associated with the Bitwarden project nor Bitwarden, Inc.
14
14
---
15
15
16
16
## Table of Contents
17
+
17
18
-[Supported Versions](#supported-versions)
18
19
-[Usage](#usage)
19
20
-[Embedded Client](#embedded-client)
@@ -22,7 +23,9 @@ This project is not associated with the Bitwarden project nor Bitwarden, Inc.
22
23
-[License](#license)
23
24
24
25
## Supported Versions
26
+
25
27
The plugin has been tested and built with the following components:
28
+
26
29
-[Terraform] v1.9.8 / [OpenTofu] v1.9.0
27
30
-[Bitwarden CLI] v2023.2.0 (when not using the [Embedded Client](#embedded-client))
28
31
-[Go] 1.23.4 (for development)
@@ -40,7 +43,7 @@ terraform {
40
43
required_providers {
41
44
bitwarden = {
42
45
source = "maxlaverse/bitwarden"
43
-
version = ">= 0.13.0"
46
+
version = ">= 0.13.2"
44
47
}
45
48
}
46
49
}
@@ -80,26 +83,30 @@ data "bitwarden_item_login" "example" {
80
83
See the [examples](./examples/) directory for more examples.
81
84
82
85
## Embedded Client
86
+
83
87
Since version 0.9.0, the provider contains an embedded client that can directly interact with Bitwarden's API, removing the need for a locally installed Bitwarden CLI.
84
88
The embedded client makes the provider faster, easier to use, but it still requires more testing.
85
89
For now, a feature flag needs to be set in order to use it (`experimental.embedded_client`), with the goal of having it the default in v1.0.0.
86
90
87
91
## Security Considerations
88
-
When not using the [Embedded Client](#embedded-client), the provider downloads the encrypted Vault locally during *plan* or *apply* operations as would the Bitwarden CLI if you used it directly.
92
+
93
+
When not using the [Embedded Client](#embedded-client), the provider downloads the encrypted Vault locally during _plan_ or _apply_ operations as would the Bitwarden CLI if you used it directly.
89
94
Currently, the Terraform SDK doesn't offer a way to remove the encrypted Vault once changes have been applied.
90
95
The issue [hashicorp/terraform-plugin-sdk#63] tracks discussions for adding such a feature.
91
96
92
97
If you want find out more about this file, you can read [Terraform's documentation on Data Storage].
93
98
Please note that this file is stored at `<your-project>/.bitwarden/` by default, in order to not interfere with your local Vaults.
94
99
95
100
## Developing the Provider
101
+
96
102
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).
97
103
98
104
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
99
105
100
106
To generate or update documentation, run `go generate`.
101
107
102
108
In order to run the full suite of Acceptance tests, start a Vaultwarden server:
109
+
103
110
```sh
104
111
$ make server
105
112
```
@@ -110,8 +117,8 @@ Then run `make testacc`.
110
117
$ make testacc
111
118
```
112
119
113
-
114
120
## License
121
+
115
122
Distributed under the Mozilla License. See [LICENSE](./LICENSE) for more information.
A Session Key is bound to a local copy of a Vault. It's therefore important that you set the right `BITWARDENCLI_APPDATA_DIR` to the path where your Vault is stored.
91
98
92
99
### Secrets Manager
100
+
93
101
The Secrets Manager only accepts [Access Tokens] (requires `access_token` to be set).
94
102
95
103
In order to generate an Access Token you need to:
104
+
96
105
1. Connect to your Vault on https://vault.bitwarden.com
97
106
2. Ensure the _Secrets Manager_ section is selected (bottom left)
98
107
3. Click on _Machine accounts_
@@ -101,14 +110,17 @@ In order to generate an Access Token you need to:
101
110
6. Select the _Access Tokens_ tab
102
111
7. Created a new Access Token and save it somewhere safe
103
112
104
-
105
113
## Configuration
114
+
106
115
Configuration for the Bitwarden Provider can be derived from two sources:
107
-
* Parameters in the provider configuration
108
-
* Environment variables
116
+
117
+
- Parameters in the provider configuration
118
+
- Environment variables
109
119
110
120
### Parameters
121
+
111
122
Credentials can be provided by adding a combination of `email`, `master_password`, `client_id`, `client_secret`, `access_token` or `session_key` to the bitwarden provider block.
123
+
112
124
```terraform
113
125
provider "bitwarden" {
114
126
email = "terraform@example.com"
@@ -132,9 +144,11 @@ provider "bitwarden" {
132
144
```
133
145
134
146
### Environment variables
147
+
135
148
Credentials can be provided by using a combination of `BW_EMAIL`, `BW_PASSWORD`, `BW_CLIENTID`, `BW_CLIENTSECRET`, `BWS_ACCESS_TOKEN` or `BW_SESSION` environment variables.
0 commit comments