forked from okta/terraform-provider-okta
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuser_groups.tf
61 lines (51 loc) · 1.51 KB
/
user_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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
resource "okta_group" "group" {
name = "testAcc_replace_with_uuid"
}
resource "okta_group" "group1" {
name = "testAcc_replace_with_uuid_1"
}
resource "okta_group" "group2" {
name = "testAcc_replace_with_uuid_2"
}
resource "okta_user" "user" {
admin_roles = ["APP_ADMIN", "USER_ADMIN"]
first_name = "TestAcc"
last_name = "blah"
login = "[email protected]"
email = "[email protected]"
status = "ACTIVE"
}
resource "okta_user" "user1" {
first_name = "TestAcc1"
last_name = "blah"
login = "[email protected]"
email = "[email protected]"
status = "ACTIVE"
}
resource "okta_app_saml" "test" {
preconfigured_app = "amazon_aws"
label = "testAcc_replace_with_uuid"
users {
id = okta_user.user.id
username = okta_user.user.email
}
users {
id = okta_user.user1.id
username = okta_user.user1.email
}
groups = [okta_group.group.id, okta_group.group1.id, okta_group.group2.id]
key_years_valid = 3
key_name = "hello"
app_settings_json = <<EOT
{
"appFilter":"okta",
"awsEnvironmentType":"aws.amazon",
"groupFilter": "aws_(?{{accountid}}\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\-_]+)",
"joinAllRoles": false,
"loginURL": "https://console.aws.amazon.com/ec2/home",
"roleValuePattern": "arn:aws:iam::$${accountid}:saml-provider/OKTA,arn:aws:iam::$${accountid}:role/$${role}",
"sessionDuration": 3600,
"useGroupMapping": false
}
EOT
}