Error creating auth0_flow_vault_connection for sendgrid using terraform

Getting this error in terraform

Blockquote 10:51:26 e[31m│e[0m e[0me[1me[31mError: e[0me[0me[1m400 Bad Request: The provided input does not satisfy the expected schemae[0m 10:51:26 e[31m│e[0m e[0m 10:51:26 e[31m│e[0m e[0me[0m with auth0_flow_vault_connection.sendgrid, 10:51:26 e[31m│e[0m e[0m on auth0_form_common.tf line 16, in resource “auth0_flow_vault_connection” “sendgrid”: 10:51:26 e[31m│e[0m e[0m 16: resource “auth0_flow_vault_connection” “sendgrid” e[4m{e[0me[0m 10:51:26 e[31m│e[0m e[0m

When trying to create this resource using terraform

resource "auth0_flow_vault_connection" "sendgrid" {
  name         = "SendGrid"
  app_id       = "SENDGRID"
  account_name = "asdf"
  ready        = true
  setup        = {
    api_key = "asfd***xyz"
  }
}```

Auth0 Provider version 1.7.1

The above question was answered in a Support Ticket. I will share my reply below in case someone else runs into this issue.
By checking the body of the request in the network tab in the browser when creating a test vault connection for the SendGrid flow integration in the Dashboard UI, we can see this is the schema you should use:

resource "auth0_flow_vault_connection" "sendgrid" {
app_id = "SENDGRID"
name = "MySendGrid1" // (String) Name of the vault connection
setup = {
api_key = "xxxxxxxx" // (String) Your SendGrid API Key
type = "API_KEY"
}
}
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.