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 Resource - terraform-provider | Projects | Create projects & save to Hanzo KMS. Only Machine Identity authentication is supported for this data source. |
kms_project (Resource)
Create projects & 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" "gcp-project" {
name = "GCP Project"
slug = "gcp-project"
description = "This is a GCP project"
type = "secret-manager" # Default project type
}
resource "kms_project" "aws-project" {
name = "AWS Project"
slug = "aws-project"
description = "This is an AWS project"
type = "secret-manager"
}
resource "kms_project" "kms-project" {
name = "KMS Project"
slug = "kms-project"
description = "This is a KMS project for key management"
type = "kms"
}
resource "kms_project" "certificate-project" {
name = "Certificates Project"
slug = "certificate-project"
description = "This is a certificates project for certificate management"
type = "cert-manager"
}
Schema
Required
name(String) The name of the projectslug(String) The slug of the project
Optional
audit_log_retention_days(Number) The audit log retention in daysdescription(String) The description of the projecthas_delete_protection(Boolean) Whether the project has delete protection, defaults to falsekms_secret_manager_key_id(String) The ID of the KMS secret manager key to use for the projectshould_create_default_envs(Boolean) Whether to create default environments for the project (dev, staging, prod), defaults to truetemplate_name(String) The name of the template to use for the projecttype(String) The type of the project. Supported values: secret-manager, cert-manager, kms. Defaults to 'secret-manager'.
Read-Only
id(String) The ID of the projectlast_updated(String)
Import
Import is supported using the following syntax:
# This will import the project by the project ID
terraform import kms_project.example <project_id>