resource "kopicloud_distribution_group" "test_distribution_global" {
name = "kopicloud-europe-distribution-group"
scope = "Global"
description = "This is a very cool Global distribution group"
email = "europe.distribution@kopicloud.com"
ou_path = "CN=Users,DC=kopicloud,DC=local"
}
Returns Created Global Distribution Group:
1234
output "OUTPUT_global_distribution_group" {
description = "Created Global Distribution Group"
value = resource.kopicloud_distribution_group.test_distribution_global
}
Create a Universal Distribution Group:
1234567
resource "kopicloud_distribution_group" "test_distribution_universal" {
name = "kopicloud-america-distribution-group"
scope = "Universal"
description = "This is a very cool Universal distribution group"
email = "america.distribution@kopicloud.com"
ou_path = "CN=Users,DC=kopicloud,DC=local"
}
Returns Created Universal Distribution Group:
1234
output "OUTPUT_universal_distribution_group" {
description = "Created Universal Distribution Group"
value = resource.kopicloud_distribution_group.test_distribution_universal
}
Create a Domain Local Distribution Group:
1234567
resource "kopicloud_distribution_group" "test_distribution_domain_local" {
name = "kopicloud-asia-distribution-group"
scope = "Domain_Local"
description = "This is a very cool Domain Local distribution group"
email = "asia.distribution@kopicloud.com"
ou_path = "CN=Users,DC=kopicloud,DC=local"
}
Returns Created Domain Local Distribution Group:
1234
output "OUTPUT_domain_local_distribution_group" {
description = "Created Domain Local Distribution Group"
value = resource.kopicloud_distribution_group.test_distribution_domain_local
}
Schema
Required:
description (String) AD Group Description
email (String) AD Group Email Address
name (String) AD Group Name
Optional:
ou_path (String) OU Path (Distinguished Name)
scope (String) AD Group Scope, possible values are Global, Universal or Domain_Local. Default is Global
Read-Only:
id (String) The ID of this Resource
result (List of Objects) Single AD Group (see below for nested schema)
data "kopicloud_distribution_group_list" "test_distribution" { }
Returns the List of Distribution Groups:
1234
output "OUTPUT_kopicloud_distribution_groups_list" {
description = "All Existing Distribution Groups"
value = data.kopicloud_distribution_group_list.test_distribution
}
Schema
Read-Only:
id (String) The ID of this Resource
result (List of Objects) Single AD Group (see below for nested schema)
Running this resource with terraform apply will create or update the AD group and running terraform destroy will remove this AD Group from the Active Directory.