mirror of
https://github.com/hanzokms/terraform-provider.git
synced 2026-10-30 20:29:45 +00:00
2.4 KiB
2.4 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| kms_access_approval_policy Resource - terraform-provider | Approval | Create access approval policy for your projects |
kms_access_approval_policy (Resource)
Create access approval policy for your projects
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_access_approval_policy" "prod-policy" {
project_id = kms_project.example.id
name = "my-approval-policy"
environment_slugs = ["prod"]
secret_path = "/"
approvers = [
{
type = "group"
id = "52c70c28-9504-4b88-b5af-ca2495dd277d"
},
{
type = "user"
username = "[email protected]"
}]
required_approvals = 1
enforcement_level = "soft"
}
Schema
Required
approvers(Attributes Set) The required approvers (see below for nested schema)project_id(String) The ID of the project to add the access approval policyrequired_approvals(Number) The number of required approverssecret_path(String) The secret path to apply the access approval policy to
Optional
enforcement_level(String) The enforcement level of the policy. This can either be hard or softenvironment_slug(String) (DEPRECATED, Use environment_slugs instead) The environment to apply the access approval policy toenvironment_slugs(List of String) The environments to apply the access approval policy toname(String) The name of the access approval policy
Read-Only
id(String) The ID of the access approval policy
Nested Schema for approvers
Required:
type(String) The type of approver. Either group or user
Optional:
id(String) The ID of the approverusername(String) The username of the approver. By default, this is the email