oracle api connection is generating error of

Krishan Nagwan 0 Reputation points
2025-11-27T05:16:46.9533333+00:00

Hi,

I m trying to create oracle api connection from terraform with pipeline , but it is creating error.

im giving all values and keys , as per azurerm terraform format.



resource "azurerm_api_connection" "oracle_connection" {
 
  name                = "abc"
  resource_group_name ="abc


  display_name = "new_conn_oracle"

  managed_api_id = ""

  parameter_values = {
    # gateway            = ""
 
    server             = ""
    # authenticationType = "Basic"
    authType           = "basic"
    # port               = 
    username           = ""
    password           = ""
    # database           = "" 
    database= ""
    

  }

  tags = each.value.tags
  
  lifecycle {
    ignore_changes = [parameter_values]
  }

}

Error: creating Connection (Subscription: "xxxxxx"

│ Resource Group Name: "rg-d"

│ Connection Name: "oracleapiconnection9"): unexpected status 400 (400 Bad Request) with error: ConnectionGatewayReferenceMissing: The gateway reference connection parameter is missing for the on-premise connection request.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Krishan Nagwan 0 Reputation points
    2025-11-27T05:18:37.2566667+00:00

    i have already mentioned the gateway also, but it is still giving error.


  2. Kalyani Kondavaradala 4,595 Reputation points Microsoft External Staff Moderator
    2025-12-01T13:40:22.9533333+00:00

    Hi Krishan Nagwan,

    If you’re deploying via pipeline, double-check that the service principal has RBAC permissions on the gateway resource.

    • managed_api_id is empty This must point to the Oracle connector ARM ID (e.g. /subscriptions//providers/Microsoft.Web/locations//managedApis/oracle). Leaving it blank guarantees a 400 error
    • Are there any firewall rules or network restrictions that could block the gateway?
    gateway = "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.Web/gateways/<gateway-name>"
    

    make sure you provide the values to the parameters.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.