-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update examples and add README to examples
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Important | ||
As for now currently examples inside this folder are just to show how some specific resources could look like, or how they could be implemented. | ||
Examples inside this folder are not intended to provide complete picture or full working example. | ||
Please be careful to understand what resources you copy from this folder and give it a double check if it will suite your needs (or not) and adjust this code to your specific needs. | ||
|
||
## Some generic consideration | ||
If you have small amount of users it is okay to use local users (created inside CloudConnexa), examples in this folder will help you to achieve this. | ||
If you have quite big amount of users - at some point it would be beneficial to look into managing users via LDAP or SAML. It is not possible (yet) configure LDAP and SAML settings via Terraform provider, this functionality will be added in the future releases. | ||
If you have configured LDAP or SAML via CloudConnexa Admin UI - then using Terraform resource "cloudconnexa_user" will be not needed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
# Simple example | ||
resource "cloudconnexa_user_group" "this" { | ||
name = "test-group" | ||
vpn_region_ids = ["eu-central-1"] | ||
connect_auth = "AUTH" | ||
} | ||
|
||
# Advanced example | ||
resource "cloudconnexa_user_group" "this" { | ||
for_each = var.user_groups | ||
name = each.key | ||
connect_auth = try(each.value.connect_auth, "AUTO") | ||
internet_access = try(each.value.internet_access, "LOCAL") | ||
max_device = try(each.value.max_device, 3) | ||
all_regions_included = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ variable "users" { | |
group = "Developer" | ||
role = "MEMBER" | ||
} | ||
"Username3" = { | ||
"Max_Mustermann" = { | ||
username = "Username3" | ||
email = "[email protected]" | ||
group = "Support" | ||
|
@@ -68,3 +68,18 @@ variable "routes" { | |
}, | ||
] | ||
} | ||
|
||
variable "user_groups" { | ||
description = "Variable for specifying configuration for User Groups" | ||
type = map(object({ | ||
connect_auth = optional(string) | ||
internet_access = optional(string) | ||
max_device = optional(number) | ||
})) | ||
default = { | ||
admins = { max_device = 10 } | ||
users = { max_device = 6 } | ||
support = {} | ||
marketing = {} | ||
} | ||
} |