| page_title | configcat_permission_group Resource - terraform-provider-configcat |
|---|---|
| subcategory | |
| description | Creates and manages a Permission Group. What is a Permission Group in ConfigCat? https://configcat.com/docs/advanced/team-management/team-management-basics/#permissions--permission-groups-product-level |
Creates and manages a Permission Group. What is a Permission Group in ConfigCat?
variable "product_id" {
type = string
}
variable "test_environment_id" {
type = string
}
variable "productuction_environment_id" {
type = string
}
resource "configcat_permission_group" "admin_permission_group" {
product_id = var.product_id
name = "Administrators"
accesstype = "full"
can_manage_members = true
can_createorupdate_config = true
can_delete_config = true
can_createorupdate_environment = true
can_delete_environment = true
can_createorupdate_setting = true
can_tag_setting = true
can_delete_setting = true
can_createorupdate_tag = true
can_delete_tag = true
can_manage_webhook = true
can_use_exportimport = true
can_manage_product_preferences = true
can_manage_integrations = true
can_view_sdkkey = true
can_rotate_sdkkey = true
can_createorupdate_segment = true
can_delete_segment = true
can_view_product_auditlog = true
can_view_product_statistics = true
}
resource "configcat_permission_group" "custom_permission_group" {
product_id = var.product_id
name = "Read only except Test environment"
accesstype = "custom"
environment_accesses = {
(var.test_environment_id) = "full"
(var.productuction_environment_id) = "readOnly"
}
}
output "admin_permission_group_id" {
value = configcat_permission_group.admin_permission_group.id
}
output "custom_permission_group_id" {
value = configcat_permission_group.custom_permission_group.id
}name(String) The name of the Permission Group.product_id(String) The ID of the Product.
accesstype(String) Represent the Feature Management permission. Possible values: readOnly, full, customcan_createorupdate_config(Boolean) Group members can create/update Configs.can_createorupdate_environment(Boolean) Group members can create/update Environments.can_createorupdate_segment(Boolean) Group members can create/update Segments.can_createorupdate_setting(Boolean) Group members can create/update Feature Flags and Settings.can_createorupdate_tag(Boolean) Group members can create/update Tags.can_delete_config(Boolean) Group members can delete Configs.can_delete_environment(Boolean) Group members can delete Environments.can_delete_segment(Boolean) Group members can delete Segments.can_delete_setting(Boolean) Group members can delete Feature Flags and Settings.can_delete_tag(Boolean) Group members can delete Tags.can_disable_2fa(Boolean) Group members can disable two-factor authentication for other members.can_manage_integrations(Boolean) Group members can add and configure integrations.can_manage_members(Boolean) Group members can manage team members.can_manage_product_preferences(Boolean) Group members can update Product preferences.can_manage_webhook(Boolean) Group members can create/update/delete Webhooks.can_rotate_sdkkey(Boolean) Group members can rotate SDK keys.can_tag_setting(Boolean) Group members can attach/detach Tags to Feature Flags and Settings.can_use_exportimport(Boolean) Group members can use the export/import feature.can_view_product_auditlog(Boolean) Group members has access to audit logs.can_view_product_statistics(Boolean) Group members has access to product statistics.can_view_sdkkey(Boolean) Group members has access to SDK keys.environment_accesses(Map of String) The environment specific permissions map block. Keys are the Environment IDs and the values represent the environment specific Feature Management permission. Possible values: full, readOnlynew_environment_accesstype(String) Represent the environment specific Feature Management permission for new Environments. Possible values: full, readOnly, none
id(String) The unique ID of the Permission Group.
Import is supported using the following syntax:
# Permission Groups can be imported using the PermissionGroupId. Get the PermissionGroupId using the [List Permission Groups API](https://api.configcat.com/docs/#tag/Permission-Groups/operation/get-permission-groups) for example.
terraform import configcat_permission_group.example 123