mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
2.3 KiB
2.3 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_project_group Resource - terraform-provider | Projects | Create project groups & save to Hanzo KMS. Only Machine Identity authentication is supported for this data source |
kms_project_group (Resource)
Create project groups & save to Hanzo KMS. Only Machine Identity authentication is supported for this data source
Example Usage
terraform {
required_providers {
kms = {
# version = <latest version>
source = "hanzokms/kms"
}
}
}
provider "kms" {
host = "https://kms.hanzo.ai" # Only required if using self hosted instance of Hanzo KMS, default is https://kms.hanzo.ai
auth = {
universal = {
client_id = "<machine-identity-client-id>"
client_secret = "<machine-identity-client-secret>"
}
}
}
resource "kms_project" "example" {
name = "example"
slug = "example"
}
resource "kms_project_group" "group" {
project_id = kms_project.example.id
# Either group_id or group_name is required.
group_id = "<>"
group_name = "<>"
roles = [
{
role_slug = "admin",
is_temporary = true,
temporary_access_start_time = "2024-09-19T12:43:13Z",
temporary_range = "1y"
},
{
role_slug = "my-custom-role",
},
]
}
Schema
Required
project_id(String) The id of the project.roles(Attributes Set) The roles assigned to the project group (see below for nested schema)
Optional
group_id(String) The id of the group.group_name(String) The name of the group.
Read-Only
membership_id(String) The membership Id of the project group
Nested Schema for roles
Required:
role_slug(String) The slug of the role
Optional:
is_temporary(Boolean) Flag to indicate the assigned role is temporary or not. When is_temporary is true fields temporary_mode, temporary_range and temporary_access_start_time is required.temporary_access_start_time(String) ISO time for which temporary access should begin. This is in the format YYYY-MM-DDTHH:MM:SSZ e.g. 2024-09-19T12:43:13Ztemporary_range(String) TTL for the temporary time. Eg: 1m, 1h, 1d. Default: 1h