-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.tf
32 lines (31 loc) · 1.25 KB
/
user.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
resource "oci_identity_user" "users" {
provider = oci.home_region
count = length(var.uidList)
name = var.uidList[count.index]
email = var.uidList[count.index]
description = "Users for PoC activity using ${data.oci_identity_compartment.test_compartment.name}"
compartment_id = var.tenancy_ocid
}
resource "oci_identity_ui_password" "passwords" {
provider = oci.home_region
count = length(var.uidList)
user_id = oci_identity_user.users.*.id[count.index]
}
resource "oci_identity_user_group_membership" "view-mem1" {
provider = oci.home_region
count = length(var.uidList)
user_id = oci_identity_user.users[count.index].id
group_id = oci_identity_group.viewOnlyGroup.id
}
resource "oci_identity_user_group_membership" "dba-mem1" {
provider = oci.home_region
count = length(var.uidList)
user_id = oci_identity_user.users[count.index].id
group_id = oci_identity_group.dbaGroup.id
}
resource "oci_identity_user_group_membership" "sysAdmin-mem1" {
provider = oci.home_region
count = length(var.uidList)
user_id = oci_identity_user.users[count.index].id
group_id = oci_identity_group.sysAdminGroup.id
}