You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to create a PostgreSQL virtual network rule from Terraform using postgresql.VirtualNetworkRulesClient with IgnoreMissingVnetServiceEndpoint set to false but the service endpoint is not configured on the target subnet.
The API unexpectedly responded with HTTP 202 Accepted.
What did you expect or want to happen?
The API should have responded with HTTP 400 Bad Request, similar to the behaviour seen with SQL virtual network rules under similar circumstances (service endpoint is missing, IgnoreMissingVnetServiceEndpoint is false).
How can we reproduce it?
Create a virtual network with a subnet
Ensure that the Microsoft.Sql service endpoint is not configured on the subnet
Create a PostgreSQL server
Attempt to create the PostgreSQL virtual network rule and observe the response code
Anything we should know about your environment.
This behaviour has been observed through Terraform's use of the Azure SDK for Go.
Fine details
What follows is the detailed output when running terraform with TF_LOG=debug. Terraform is attempting to create the rule but does not receive an error code. Additionally, the documentation for virtual network rules does not indicate that this error will be received even though the SQL virtual network rule creation fails.
There are two output blocks, the first relates to the PostgreSQL virtual network rule and the second relates to the SQL virtual network rule.
For comparison, the debug output for creating an azurerm_sql_virtual_network_rule follows. When the ARM request is sent, the HTTP status received in response is 400 instead of 202.
Bug Report
Affects hashicorp/terraform-provider-azurerm#1774.
services/postgresql/mgmt/2017-12-01/postgresql
v18.0.0
go version go1.10.3 darwin/amd64
What happened?
Attempting to create a PostgreSQL virtual network rule from Terraform using
postgresql.VirtualNetworkRulesClient
withIgnoreMissingVnetServiceEndpoint
set tofalse
but the service endpoint is not configured on the target subnet.The API unexpectedly responded with HTTP 202 Accepted.
What did you expect or want to happen?
The API should have responded with HTTP 400 Bad Request, similar to the behaviour seen with SQL virtual network rules under similar circumstances (service endpoint is missing,
IgnoreMissingVnetServiceEndpoint
is false).How can we reproduce it?
Microsoft.Sql
service endpoint is not configured on the subnetAnything we should know about your environment.
This behaviour has been observed through Terraform's use of the Azure SDK for Go.
Fine details
What follows is the detailed output when running terraform with
TF_LOG=debug
. Terraform is attempting to create the rule but does not receive an error code. Additionally, the documentation for virtual network rules does not indicate that this error will be received even though the SQL virtual network rule creation fails.There are two output blocks, the first relates to the PostgreSQL virtual network rule and the second relates to the SQL virtual network rule.
For comparison, the debug output for creating an
azurerm_sql_virtual_network_rule
follows. When the ARM request is sent, the HTTP status received in response is 400 instead of 202.The text was updated successfully, but these errors were encountered: