Kong / terraform-provider-konnect

Terraform Provider for Kong Konnect
https://registry.terraform.io/providers/kong/konnect/latest
28 stars 7 forks source link

Terraform resource konnect_gateway_vault Azure Key Vault: type not found #81

Closed mbarrera-kong closed 1 month ago

mbarrera-kong commented 2 months ago

Hi,

when trying to configure the Azure Key Vault via Terraform for Konnect we run into following issue. As mentioned per the terraform documentation we provide the config as json.

Azure Key Vaults

konnect_gateway_vault.name-global-vault: Creating...
╷
│ Error: failure to invoke API
│ 
│   with konnect_gateway_vault.name-global-vault,
│   on main.tf line 161, in resource "konnect_gateway_vault" "name-global-vault":
│  161: resource "konnect_gateway_vault" "name-global-vault" {
│ 
│ unknown status code returned: Status 400
│ {"message":"vault type not found"}
resource "konnect_gateway_vault" "name-global-vault" {
  config           = jsonencode({
    "type" = "secrets",
    "location" = "uk-south",
    "vault_uri" = "https://name-vault.vault.azure.net"
    })
  control_plane_id = konnect_gateway_control_plane.name-global-cp.id
  description      = "Name Global Vault"
  name             = "Name Global Vault"
  prefix           = "ngv"
}

Kind regards

mheap commented 1 month ago

The vault name must be one of the supported Vault types. Try this:

resource "konnect_gateway_vault" "name-global-vault" {
  config           = jsonencode({
    "type" = "secrets",
    "location" = "uk-south",
    "vault_uri" = "https://name-vault.vault.azure.net"
    })
  control_plane_id = konnect_gateway_control_plane.name-global-cp.id
  description      = "Name Global Vault"
  name             = "azure"
  prefix           = "ngv"
}