Skip to content

Commit 061604f

Browse files
committed
feat(password credential): Add password credential type support
1 parent d7d7319 commit 061604f

File tree

11 files changed

+530
-78
lines changed

11 files changed

+530
-78
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "boundary_credential_password Resource - terraform-provider-boundary"
4+
subcategory: ""
5+
description: |-
6+
The password credential resource allows you to configure a credential using a password.
7+
---
8+
9+
# boundary_credential_password (Resource)
10+
11+
The password credential resource allows you to configure a credential using a password.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "boundary_scope" "org" {
17+
name = "organization_one"
18+
description = "global scope"
19+
scope_id = "global"
20+
auto_create_admin_role = true
21+
auto_create_default_role = true
22+
}
23+
24+
resource "boundary_scope" "project" {
25+
name = "project_one"
26+
description = "My first scope!"
27+
scope_id = boundary_scope.org.id
28+
auto_create_admin_role = true
29+
}
30+
31+
resource "boundary_credential_store_static" "example" {
32+
name = "example_static_credential_store"
33+
description = "My first static credential store!"
34+
scope_id = boundary_scope.project.id
35+
}
36+
37+
resource "boundary_credential_password" "example" {
38+
name = "example_password"
39+
description = "My first password credential!"
40+
credential_store_id = boundary_credential_store_static.example.id
41+
password = "my-password"
42+
}
43+
```
44+
45+
<!-- schema generated by tfplugindocs -->
46+
## Schema
47+
48+
### Required
49+
50+
- `credential_store_id` (String) The credential store in which to save this password credential.
51+
- `password` (String, Sensitive) The password of this password credential.
52+
53+
### Optional
54+
55+
- `description` (String) The description of this password credential.
56+
- `name` (String) The name of this password credential. Defaults to the resource name.
57+
58+
### Read-Only
59+
60+
- `id` (String) The ID of this password credential.
61+
- `password_hmac` (String) The password hmac.
62+
63+
## Import
64+
65+
Import is supported using the following syntax:
66+
67+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
68+
69+
```shell
70+
terraform import boundary_credential_password.example <my-id>
71+
```

docs/resources/target.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ resource "boundary_target" "rdp_foo" {
147147
injected_application_credential_source_ids = [
148148
boundary_credential_library_vault.foo.id
149149
]
150-
egress_worker_filter = "\"egress\" in \"/tags/type\""
150+
egress_worker_filter = "\"egress\" in \"/tags/type\""
151151
}
152152
153153
resource "boundary_target" "address_foo" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import boundary_credential_password.example <my-id>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
resource "boundary_scope" "org" {
2+
name = "organization_one"
3+
description = "global scope"
4+
scope_id = "global"
5+
auto_create_admin_role = true
6+
auto_create_default_role = true
7+
}
8+
9+
resource "boundary_scope" "project" {
10+
name = "project_one"
11+
description = "My first scope!"
12+
scope_id = boundary_scope.org.id
13+
auto_create_admin_role = true
14+
}
15+
16+
resource "boundary_credential_store_static" "example" {
17+
name = "example_static_credential_store"
18+
description = "My first static credential store!"
19+
scope_id = boundary_scope.project.id
20+
}
21+
22+
resource "boundary_credential_password" "example" {
23+
name = "example_password"
24+
description = "My first password credential!"
25+
credential_store_id = boundary_credential_store_static.example.id
26+
password = "my-password"
27+
}

examples/resources/boundary_target/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ resource "boundary_target" "rdp_foo" {
132132
injected_application_credential_source_ids = [
133133
boundary_credential_library_vault.foo.id
134134
]
135-
egress_worker_filter = "\"egress\" in \"/tags/type\""
135+
egress_worker_filter = "\"egress\" in \"/tags/type\""
136136
}
137137

138138
resource "boundary_target" "address_foo" {

go.mod

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module github.com/hashicorp/terraform-provider-boundary
22

3-
go 1.25.0
3+
go 1.25.1
44

55
require (
66
github.com/YakDriver/regexache v0.25.0
7-
github.com/hashicorp/boundary v0.20.1
8-
github.com/hashicorp/boundary/api v0.0.58
9-
github.com/hashicorp/boundary/sdk v0.0.55
7+
github.com/hashicorp/boundary v0.18.1-0.20251118203559-6533c8bdb302
8+
github.com/hashicorp/boundary/api v0.0.59-0.20251118203559-6533c8bdb302
9+
github.com/hashicorp/boundary/sdk v0.0.56-0.20251118203559-6533c8bdb302
1010
github.com/hashicorp/cap v0.11.0
1111
github.com/hashicorp/cap/ldap v0.0.0-20240206183135-ed8f24513744
1212
github.com/hashicorp/go-cty v1.5.0
@@ -34,7 +34,7 @@ require (
3434
github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect
3535
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
3636
github.com/Masterminds/goutils v1.1.1 // indirect
37-
github.com/Masterminds/semver/v3 v3.2.1 // indirect
37+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
3838
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
3939
github.com/Microsoft/go-winio v0.6.2 // indirect
4040
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
@@ -54,7 +54,7 @@ require (
5454
github.com/danieljoos/wincred v1.2.2 // indirect
5555
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5656
github.com/docker/cli v27.4.1+incompatible // indirect
57-
github.com/docker/docker v28.4.0+incompatible // indirect
57+
github.com/docker/docker v28.5.2+incompatible // indirect
5858
github.com/docker/go-connections v0.5.0 // indirect
5959
github.com/docker/go-units v0.5.0 // indirect
6060
github.com/dustin/go-humanize v1.0.1 // indirect
@@ -63,10 +63,10 @@ require (
6363
github.com/fatih/structs v1.1.0 // indirect
6464
github.com/glebarez/go-sqlite v1.22.0 // indirect
6565
github.com/glebarez/sqlite v1.11.0 // indirect
66-
github.com/go-asn1-ber/asn1-ber v1.5.7 // indirect
66+
github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
6767
github.com/go-jose/go-jose/v3 v3.0.4 // indirect
68-
github.com/go-jose/go-jose/v4 v4.1.1 // indirect
69-
github.com/go-ldap/ldap/v3 v3.4.8 // indirect
68+
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
69+
github.com/go-ldap/ldap/v3 v3.4.12 // indirect
7070
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
7171
github.com/godbus/dbus/v5 v5.1.0 // indirect
7272
github.com/golang-migrate/migrate/v4 v4.19.0 // indirect
@@ -75,13 +75,13 @@ require (
7575
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
7676
github.com/google/uuid v1.6.0 // indirect
7777
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
78-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
78+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
7979
github.com/hashicorp/cli v1.1.7 // indirect
8080
github.com/hashicorp/dbassert v0.0.0-20231012105025-1bc1bd88e22b // indirect
8181
github.com/hashicorp/errwrap v1.1.0 // indirect
8282
github.com/hashicorp/eventlogger v0.2.11 // indirect
8383
github.com/hashicorp/eventlogger/filters/encrypt v0.1.8-0.20231208142215-efdb51ec090d // indirect
84-
github.com/hashicorp/go-bexpr v0.1.14 // indirect
84+
github.com/hashicorp/go-bexpr v0.1.15 // indirect
8585
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
8686
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
8787
github.com/hashicorp/go-dbw v0.1.5-0.20240909162114-6cee92b3da36 // indirect
@@ -116,7 +116,7 @@ require (
116116
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
117117
github.com/hashicorp/terraform-registry-address v0.4.0 // indirect
118118
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
119-
github.com/hashicorp/vault/api v1.20.0 // indirect
119+
github.com/hashicorp/vault/api v1.22.0 // indirect
120120
github.com/hashicorp/vault/sdk v0.11.0 // indirect
121121
github.com/hashicorp/yamux v0.1.2 // indirect
122122
github.com/huandu/xstrings v1.4.0 // indirect
@@ -127,7 +127,7 @@ require (
127127
github.com/jackc/pgpassfile v1.0.0 // indirect
128128
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
129129
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
130-
github.com/jackc/pgx/v5 v5.7.5 // indirect
130+
github.com/jackc/pgx/v5 v5.7.6 // indirect
131131
github.com/jackc/puddle/v2 v2.2.2 // indirect
132132
github.com/jefferai/go-libsecret v0.0.0-20210525195240-b53481abef97 // indirect
133133
github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f // indirect
@@ -191,20 +191,20 @@ require (
191191
go.uber.org/atomic v1.11.0 // indirect
192192
go.yaml.in/yaml/v2 v2.4.2 // indirect
193193
golang.org/x/exp v0.0.0-20250506013437-ce4c2cf36ca6 // indirect
194-
golang.org/x/mod v0.29.0 // indirect
195-
golang.org/x/net v0.46.0 // indirect
194+
golang.org/x/mod v0.30.0 // indirect
195+
golang.org/x/net v0.47.0 // indirect
196196
golang.org/x/oauth2 v0.30.0 // indirect
197197
golang.org/x/sync v0.18.0 // indirect
198198
golang.org/x/sys v0.38.0 // indirect
199199
golang.org/x/term v0.37.0 // indirect
200200
golang.org/x/text v0.31.0 // indirect
201-
golang.org/x/time v0.13.0 // indirect
202-
golang.org/x/tools v0.38.0 // indirect
201+
golang.org/x/time v0.14.0 // indirect
202+
golang.org/x/tools v0.39.0 // indirect
203203
google.golang.org/appengine v1.6.8 // indirect
204204
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
205-
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
206-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
207-
google.golang.org/grpc v1.75.1 // indirect
205+
google.golang.org/genproto/googleapis/api v0.0.0-20250929231259-57b25ae835d4 // indirect
206+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250929231259-57b25ae835d4 // indirect
207+
google.golang.org/grpc v1.76.0 // indirect
208208
google.golang.org/protobuf v1.36.10 // indirect
209209
gopkg.in/yaml.v2 v2.4.0 // indirect
210210
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)