Skip to content

Commit fde4e1d

Browse files
committed
prepare release v0.13.2
1 parent a53f0d7 commit fde4e1d

File tree

3 files changed

+37
-14
lines changed

3 files changed

+37
-14
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This project is not associated with the Bitwarden project nor Bitwarden, Inc.
1414
---
1515

1616
## Table of Contents
17+
1718
- [Supported Versions](#supported-versions)
1819
- [Usage](#usage)
1920
- [Embedded Client](#embedded-client)
@@ -22,7 +23,9 @@ This project is not associated with the Bitwarden project nor Bitwarden, Inc.
2223
- [License](#license)
2324

2425
## Supported Versions
26+
2527
The plugin has been tested and built with the following components:
28+
2629
- [Terraform] v1.9.8 / [OpenTofu] v1.9.0
2730
- [Bitwarden CLI] v2023.2.0 (when not using the [Embedded Client](#embedded-client))
2831
- [Go] 1.23.4 (for development)
@@ -40,7 +43,7 @@ terraform {
4043
required_providers {
4144
bitwarden = {
4245
source = "maxlaverse/bitwarden"
43-
version = ">= 0.13.0"
46+
version = ">= 0.13.2"
4447
}
4548
}
4649
}
@@ -80,26 +83,30 @@ data "bitwarden_item_login" "example" {
8083
See the [examples](./examples/) directory for more examples.
8184

8285
## Embedded Client
86+
8387
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.
8488
The embedded client makes the provider faster, easier to use, but it still requires more testing.
8589
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.
8690

8791
## 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.
8994
Currently, the Terraform SDK doesn't offer a way to remove the encrypted Vault once changes have been applied.
9095
The issue [hashicorp/terraform-plugin-sdk#63] tracks discussions for adding such a feature.
9196

9297
If you want find out more about this file, you can read [Terraform's documentation on Data Storage].
9398
Please note that this file is stored at `<your-project>/.bitwarden/` by default, in order to not interfere with your local Vaults.
9499

95100
## Developing the Provider
101+
96102
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).
97103

98104
To compile the provider, run `go install`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
99105

100106
To generate or update documentation, run `go generate`.
101107

102108
In order to run the full suite of Acceptance tests, start a Vaultwarden server:
109+
103110
```sh
104111
$ make server
105112
```
@@ -110,8 +117,8 @@ Then run `make testacc`.
110117
$ make testacc
111118
```
112119

113-
114120
## License
121+
115122
Distributed under the Mozilla License. See [LICENSE](./LICENSE) for more information.
116123

117124
[Bitwarden CLI]: https://bitwarden.com/help/article/cli/#download-and-install

docs/index.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ terraform {
1818
required_providers {
1919
bitwarden = {
2020
source = "maxlaverse/bitwarden"
21-
version = ">= 0.13.0"
21+
version = ">= 0.13.2"
2222
}
2323
}
2424
}
@@ -51,20 +51,25 @@ data "bitwarden_item_login" "example" {
5151
```
5252

5353
## Authentication
54+
5455
Depending on the type of credentials you use, you'll be able to connect either with a Password Manager or Secret Manager.
5556
If you want your workspace to interact with both, have a look at [provider aliases].
5657

5758
### Password Manager
59+
5860
The Password Manager accepts different combinations of credentials to authenticate:
59-
* _[Personal API Key]_ (requires `master_password`, `client_id` and `client_secret` to be set).
60-
* _Email and Password_ (requires `email` and `master_password` to be set) (prefer _Personal API keys_ instead).
61-
* User-provided _Session Key_ (requires `session_key` to be set), which only works with a pre-downloaded Vault (See _Generating a Session Key_).
61+
62+
- _[Personal API Key]_ (requires `master_password`, `client_id` and `client_secret` to be set).
63+
- _Email and Password_ (requires `email` and `master_password` to be set) (prefer _Personal API keys_ instead).
64+
- User-provided _Session Key_ (requires `session_key` to be set), which only works with a pre-downloaded Vault (See _Generating a Session Key_).
6265

6366
#### Generating a Client ID and Secret
67+
6468
The recommended way to interact with your Password Manager Vault using the Bitwarden Provider Terraform plugin is to generate an API key.
6569
This allows you to easily revoke access to your Vault without having to change your master password.
6670

6771
In order to generate a pair of Client ID and Secret, you need to:
72+
6873
1. Connect to your Vault on https://vault.bitwarden.com, or your self-hosted instance
6974
2. Click on _Settings_ and then _My Account_
7075
3. Scroll down to the _API Key_ section
@@ -75,11 +80,13 @@ In order to generate a pair of Client ID and Secret, you need to:
7580

7681
If you don't want to use an API key, you can use a Session Key instead.
7782
When doing so, it's your responsibility to:
78-
* ensure the validity of the Session Key
79-
* keep the Session Key safe
80-
* revoke it when you don't need it anymore
83+
84+
- ensure the validity of the Session Key
85+
- keep the Session Key safe
86+
- revoke it when you don't need it anymore
8187

8288
You can generate a Session Key by running the following command in your Terraform Workspace:
89+
8390
```console
8491
BITWARDENCLI_APPDATA_DIR=.bitwarden bw login
8592

@@ -90,9 +97,11 @@ BITWARDENCLI_APPDATA_DIR=<vault_path> bw login
9097
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.
9198

9299
### Secrets Manager
100+
93101
The Secrets Manager only accepts [Access Tokens] (requires `access_token` to be set).
94102

95103
In order to generate an Access Token you need to:
104+
96105
1. Connect to your Vault on https://vault.bitwarden.com
97106
2. Ensure the _Secrets Manager_ section is selected (bottom left)
98107
3. Click on _Machine accounts_
@@ -101,14 +110,17 @@ In order to generate an Access Token you need to:
101110
6. Select the _Access Tokens_ tab
102111
7. Created a new Access Token and save it somewhere safe
103112

104-
105113
## Configuration
114+
106115
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
109119

110120
### Parameters
121+
111122
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+
112124
```terraform
113125
provider "bitwarden" {
114126
email = "terraform@example.com"
@@ -132,9 +144,11 @@ provider "bitwarden" {
132144
```
133145

134146
### Environment variables
147+
135148
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.
136149

137150
For example:
151+
138152
```bitwarden
139153
provider "bitwarden" {}
140154
```
@@ -147,6 +161,7 @@ export BW_CLIENTSECRET="my-client-secret"
147161
```
148162

149163
<!-- schema generated by tfplugindocs -->
164+
150165
## Schema
151166

152167
### Optional
@@ -163,6 +178,7 @@ export BW_CLIENTSECRET="my-client-secret"
163178
- `vault_path` (String) Alternative directory for storing the Vault locally (default: `.bitwarden/`, env: `BITWARDENCLI_APPDATA_DIR`).
164179

165180
<a id="nestedblock--experimental"></a>
181+
166182
### Nested Schema for `experimental`
167183

168184
Optional:

examples/quick/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
bitwarden = {
44
source = "maxlaverse/bitwarden"
5-
version = ">= 0.13.0"
5+
version = ">= 0.13.2"
66
}
77
}
88
}

0 commit comments

Comments
 (0)