Kong / terraform-provider-konnect

16 stars 3 forks source link

Regression in 0.3.0 with keyvaults #27

Closed andrea-migliaccio closed 2 weeks ago

andrea-migliaccio commented 2 weeks ago

For the 0.3.0 I had to change from config = jsonencode({}) to a proper hcl object. But the provider is failing to send it to the API

image

and then

│ Error: failure to invoke API
│
│   with module.multi_control_planes_dev[0].konnect_gateway_vault.global-vault[0],
│   on modules/control-plane/control-plane.tf line 16, in resource "konnect_gateway_vault" "global-vault":
│   16: resource "konnect_gateway_vault" "global-vault" {
│
│ unknown status code returned: Status 400
│ {"code":3,"message":"validation
│ error","details":[{"@type":"type.googleapis.com/kong.admin.model.v1.ErrorDetail","type":"ERROR_TYPE_FIELD","field":"config","messages":["missing
│ properties: 'vault_uri', 'location'"]}]}
mheap commented 2 weeks ago

Thanks @andrea-migliaccio! I found the issue + have released a patch. I'll update our regression testing to cover this next week. You'll need to add jsonencode() again as it's a dynamic object