Files
terraform-provider/docs/resources/secret_sync_azure_devops.md

2.7 KiB

page_title, subcategory, description
page_title subcategory description
kms_secret_sync_azure_devops Resource - terraform-provider Secret Syncs Create and manage Azure DevOps secret syncs

kms_secret_sync_azure_devops (Resource)

Create and manage Azure DevOps secret syncs

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_secret_sync_azure_devops" "app-configuration-demo" {
  name          = "demo-sync"
  description   = "This is a demo sync."
  project_id    = "<project-id>"
  environment   = "dev"
  secret_path   = "/"
  connection_id = "<app-connection-id>" # The ID of your Azure DevOps App Connection

  sync_options = {}

  destination_config = {
    devops_project_id = "<devops-project-id>",
  }
}

Schema

Required

  • connection_id (String) The ID of the azure-devops Connection to use for syncing.
  • destination_config (Attributes) The destination configuration for the secret sync. (see below for nested schema)
  • environment (String) The slug of the project environment to sync secrets from.
  • name (String) The name of the Azure DevOps sync to create. Must be slug-friendly.
  • project_id (String) The ID of the Hanzo KMS project to create the sync in.
  • secret_path (String) The folder path to sync secrets from.
  • sync_options (Attributes) Parameters to modify how secrets are synced. (see below for nested schema)

Optional

  • auto_sync_enabled (Boolean) Whether secrets should be automatically synced when changes occur at the source location or not.
  • description (String) An optional description for the Azure DevOps sync.

Read-Only

  • id (String) The ID of the Azure DevOps secret sync

Nested Schema for destination_config

Required:

  • devops_project_id (String) The ID of the Azure DevOps project to sync secrets to.

Nested Schema for sync_options

Optional:

  • disable_secret_deletion (Boolean) When set to true, Hanzo KMS will not remove secrets from Azure DevOps. Enable this option if you intend to manage some secrets manually outside of Hanzo KMS.
  • key_schema (String) The format to use for structuring secret keys in the Azure DevOps destination.