Files

2.1 KiB

page_title, subcategory, description
page_title subcategory description
kms_projects Data Source - terraform-provider Projects Interact with Hanzo KMS projects. Only Machine Identity authentication is supported for this data source.

kms_projects (Data Source)

Interact with Hanzo KMS projects. 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>"
    }
  }
}

data "kms_projects" "test-project" {
  slug = "<project-slug>"
}

// Get the value of the "dev" environment
output "dev-environment" {
  value = data.kms_projects.test-project.environments["dev"]
}

// Get the entire project
output "entire-project" {
  value = data.kms_projects.test-project
}

Schema

Required

  • slug (String) The slug of the project to fetch

Read-Only

  • auto_capitalization (Boolean) The auto capitalization status of the project
  • created_at (String) The creation date of the project
  • environments (Attributes Map) (see below for nested schema)
  • id (String) The ID of the project
  • name (String) The name of the project
  • org_id (String) The ID of the organization to which the project belongs
  • type (String) The type of the project ('secret-manager' or 'kms')
  • updated_at (String) The last update date of the project
  • upgrade_status (String) The upgrade status of the project
  • version (Number) The version of the project

Nested Schema for environments

Read-Only:

  • id (String) The ID of the environment
  • name (String) The name of the environment
  • slug (String) The slug of the environment