-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmain.tf
More file actions
45 lines (39 loc) · 1.13 KB
/
main.tf
File metadata and controls
45 lines (39 loc) · 1.13 KB
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
39
40
41
42
43
44
45
terraform {
required_providers {
coderd = {
source = "coder/coderd"
version = ">=0.0.0"
}
}
}
resource "coderd_organization" "test" {
name = "test-org-group-sync"
display_name = "Test Organization for Group Sync"
description = "Organization created for testing group sync functionality"
}
resource "coderd_group" "test" {
organization_id = coderd_organization.test.id
name = "test-group"
display_name = "Test Group"
quota_allowance = 50
}
resource "coderd_group" "admins" {
organization_id = coderd_organization.test.id
name = "admin-group"
display_name = "Admin Group"
quota_allowance = 100
}
resource "coderd_organization_group_sync" "test" {
organization_id = coderd_organization.test.id
field = "groups"
regex_filter = "test_.*|admin_.*"
auto_create_missing = false
mapping = {
"test_developers" = [coderd_group.test.id]
"admin_users" = [coderd_group.admins.id]
"mixed_group" = [coderd_group.test.id, coderd_group.admins.id]
}
}
data "coderd_organization" "test_data" {
id = coderd_organization.test.id
}