Repository navigation
Expand file tree
/
Copy pathresource.tf
More file actions
80 lines (63 loc) · 1.83 KB
/
Copy pathresource.tf
File metadata and controls
80 lines (63 loc) · 1.83 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# ===================================================================
# Example users resource administration
#
# Username can not be reused, even after deleted
# ===================================================================
terraform {
required_providers {
cachefly = {
source = "cachefly/cachefly"
version = "0.1.0"
}
}
}
provider "cachefly" {
api_token = ""
}
resource "cachefly_user" "support_user" {
username = "ssemantha2.mark"
email = "semantha.mark@example.com"
full_name = "Semantha Mark (account)"
phone = "+1-555-123-4567"
password = "SecurePassword123!"
password_change_required = true
# Permissions to grant to the user
permissions = [
"P_ACCOUNT_VIEW",
#"P_BILLING_VIEW",
"P_SERVICE_PURGE",
"P_SERVICE_MANAGE"
]
}
resource "cachefly_user" "billing_user" {
username = "ssam2.moller"
email = "sam.moller@example.com"
full_name = "Sam Moller (billig)"
phone = "+1-555-123-4567"
password = "SecurePassword123!"
password_change_required = true
# Permissions to grant to the user
permissions = [
"P_ACCOUNT_VIEW",
"P_BILLING_VIEW",
"P_SERVICE_PURGE",
"P_SERVICE_MANAGE"
]
}
# created user verification
output "support_user_id" {
description = "The ID of the created user"
value = cachefly_user.support_user.id
}
output "support_user_status" {
description = "Status of the created user"
value = cachefly_user.support_user.status
}
output "billing_user_id" {
description = "The ID of the created user"
value = cachefly_user.billing_user.id
}
output "billing_user_status" {
description = "Status of the created user"
value = cachefly_user.billing_user.status
}