-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03-04-boundary-users-groups.tf
40 lines (34 loc) · 1.19 KB
/
03-04-boundary-users-groups.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## // https://developer.hashicorp.com/boundary/tutorials/hcp-administration/hcp-manage-users-groups
## // https://developer.hashicorp.com/boundary/docs/common-workflows/manage-users-groups
# // Enable password-type auth method in Org.
resource "boundary_auth_method" "password" {
name = "org_auth_method_pass"
description = "Password auth method for org"
type = "password"
scope_id = boundary_scope.org.id
}
# // Create an account for the org-scoped auth method.
resource "boundary_account_password" "test_account" {
name = "test_account"
description = "Test password account"
# type = "password"
login_name = "tester01"
password = "supersecure"
auth_method_id = boundary_auth_method.password.id
}
# // Create a user at the org scope.
resource "boundary_user" "tester01" {
name = "tester01"
description = "Test user"
account_ids = [
boundary_account_password.test_account.id
]
scope_id = boundary_scope.org.id
}
# // Create a group at the org scope.
resource "boundary_group" "group01" {
name = "group01"
description = "Test group"
member_ids = [boundary_user.tester01.id]
scope_id = boundary_scope.org.id
}