mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
2.7 KiB
2.7 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_project_user Resource - terraform-provider | Projects | Create project users & save to Hanzo KMS. Only Machine Identity authentication is supported for this resource |
kms_project_user (Resource)
Create project users & save to Hanzo KMS. Only Machine Identity authentication is supported for this resource
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_user" "test-user" {
project_id = kms_project.example.id
username = "<username/email>"
roles = [
{
role_slug = "admin"
}
]
}
Schema
Required
project_id(String) The id of the projectroles(Attributes List) The roles assigned to the project user (see below for nested schema)username(String) The usename of the user. By default its the email
Read-Only
membership_id(String) The membershipId of the project useruser(Attributes) The user details of the project user (see below for nested schema)
Nested Schema for roles
Required:
role_slug(String) The slug of the role
Optional:
custom_role_id(String) The id of the custom role slugis_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_end_time(String) ISO time for which temporary access will end. Computed based on temporary_range and temporary_access_start_timetemporary_access_start_time(String) ISO time for which temporary access should begin. The current time is used by default.temporary_mode(String) Type of temporary access given. Types: relative. Default: relativetemporary_range(String) TTL for the temporary time. Eg: 1m, 1h, 1d. Default: 1h
Read-Only:
id(String) The ID of the project user role.
Nested Schema for user
Read-Only:
email(String) The email of the userfirst_name(String) The first name of the userid(String) The id of the userlast_name(String) The last name of the user