terraform -v
Terraform v0.12.23
resource "azurerm_private_endpoint" "main" {
name = var.name
location = var.location
resource_group_name = var.resource_group_name
subnet_id = data.azurerm_subnet.main.id
private_service_connection {
name = azurerm_mariadb_server.main.name
is_manual_connection = "false"
private_connection_resource_id = azurerm_mariadb_server.main.id
subresource_names = ["mariadbServer"]
}
depends_on = [azurerm_mariadb_server.main]
}
2020/03/20 10:26:45 [DEBUG] module.db.azurerm_private_endpoint.main["server1"]: apply errored, but we're indicating that via the Error pointer rather than returning it: Error waiting for creation of Private Endpoint "my_resource_group" (Resource Group "my_resource_group"): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforMariaDB/servers/privateEndpointConnectionProxies' with name 'my_nic.*' was not found." Details=[]
2020/03/20 10:26:45 [ERROR] module.db: eval: terraform.EvalApplyPost, err: Error waiting for creation of Private Endpoint "my_resource_group" (Resource Group "my_resource_group"): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforMariaDB/servers/privateEndpointConnectionProxies' with name 'my_nic.*' was not found." Details=[]
2020/03/20 10:26:45 [ERROR] module.db: eval: terraform.EvalSequence, err: Error waiting for creation of Private Endpoint "my_resource_group" (Resource Group "my_resource_group"): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforMariaDB/servers/privateEndpointConnectionProxies' with name 'my_nic.**' was not found." Details=[]
Error: Error waiting for creation of Private Endpoint "my_resource_group" (Resource Group "my_resource_group"): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforMariaDB/servers/privateEndpointConnectionProxies' with name 'my_nic.*' was not found." Details=[]
Create the private endpoint for MariaDB
It appears the NIC is not getting created in time
Possibly related to this
I have this same issue trying to add a Private Endpoint to PostgreSQL, so not just limited to mariadb, but a private endpoint issue.
I have this same issue trying to add a Private Endpoint to PostgreSQL, so not just limited to mariadb, but a private endpoint issue.
I am also facing the same issue. Any update?
Error: Error waiting for creation of Private Endpoint "{private_endpoint_name}" (Resource Group {resources_group_name}): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforPostgreSQL/servers/privateEndpointConnectionProxies' with name '{private_endpoint_name}.xxxxxx-x-xxxxxx-xxxxxxx' was not found."
What I am struggling to understand is, is it the problem from the azure side or from the terraform side?
It is not clear if the source error is Postgres or Private Endpoint. When I check in the portal, Postgres is being created all fine but a Private endpoint is in a failed state.
Also, the private endpoint for the storage account is being created perfectly.
If anyone is facing the similar issue please let me know if you want to to discuss regarding this.
FWIW I've been in touch with Microsoft support on this issue and it's on their side. There's no ETA for the permanent fix, and in the meantime you have to reach out to support and they can fix it manually, for each individual private endpoint you need.
You will hit the same error if you do the same thing via the Azure Portal, or the Azure CLI tool, or Powershell, and of course Terraform.
This affects their Postgres, MariaDB and MySQL managed DB products.
@fabiendelpierre Thanks for clearing the doubt. Hope it gets resolved soon.
FWIW I've been in touch with Microsoft support on this issue and it's on their side. There's no ETA for the permanent fix, and in the meantime you have to reach out to support and they can fix it manually, for each individual private endpoint you need.
You will hit the same error if you do the same thing via the Azure Portal, or the Azure CLI tool, or Powershell, and of course Terraform.
This affects their Postgres, MariaDB and MySQL managed DB products.
Can confirm as well - the same error via the Azure Portal.
Additional can say, that first creating of DB and Private Endpoint with new original name will succeed, but if drop and recreate them with the same names this issue is appeared.
Additional can say, that first creating of DB and Private Endpoint with new original name will succeed, but if drop and recreate them with the same names this issue is appeared.
I'm told it's random but you're likely to hit the issue more often than not. It's happened to me on the first creation of a DB with a never-before-used name.
I've had more success with the 2.5 azurerm provider... anyone else experiencing the same?
I haven't played with v2.5 of the provider, but since this is an Azure API issue, I would assume the provider has nothing to do with it and you've simply been lucky.
I've had more success with the 2.5 azurerm provider... anyone else experiencing the same?
it's the same issue without terraform at all.
FWIW I've been in touch with Microsoft support on this issue and it's on their side. There's no ETA for the permanent fix, and in the meantime you have to reach out to support and they can fix it manually, for each individual private endpoint you need.
You will hit the same error if you do the same thing via the Azure Portal, or the Azure CLI tool, or Powershell, and of course Terraform.
This affects their Postgres, MariaDB and MySQL managed DB products.Can confirm as well - the same error via the Azure Portal.
Additional can say, that first creating of DB and Private Endpoint with new original name will succeed, but if drop and recreate them with the same names this issue is appeared.
I tried this and it happened exactly like that.
I'm using azurerm 2.7 with mysql.
Error: Error waiting for creation of Private Endpoint "my-private-endpoint" (Resource Group "my-resource"): Code="ResourceNotFound" Message="The requested resource of type 'Microsoft.DBforMySQL/servers/privateEndpointConnectionProxies' with name 'my-private-endpoint.XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' was not found." Details=[]
Please try with a name that is never used before.
Generally, if you have tried to configure Private Endpoint for PostgreSQL/MySQL/MariaDB instance many times but somehow the first time failed, the issue will be hit during retry because it tried to getprivateendpointconnection proxies of the previously deleted server, which is empty.
The reason that caused the first failure,
So far, the fix is deploying and the completed regions are (by the time I posted this comment):
westcentralus, brazilsouth, westeurope, westus2, uksouth1&2, uaecentral, switzerlandnorth, southafricanorth,norwayeast, northcentralus, koreasouth, japaneast, indiawest, indiacentral, germanynorth, francecesouth, eastus1&2, eastasia, chinanorth1&2, australiaeast, australiacentral,
As a workaround, I've added a random_id as a suffix to the names of the resources which are having this problem. Now it's working very well each time I run the script.
Fix deployed btw. It should be working as expected now.
Just chiming in here, this is still an issue using 2.34 with MySQL.
I don't really see how randomly adding a number to the name solve anything and it doesn't for me. It still times out after 10 minutes.
Importing the resource as a stop-gap for the few environments that I have, still doesn't work. When it tries to "modify" the existing endpoint then it times out.
When you say that a "fix is deployed to the completed regions" I am not sure, since when I add "germanynorth" I get a "LocationNotAvailableForResourceType" which isn't ideal either way since that isn't even where our subnet is located.
Are there any workarounds? I am at a complete loss here.
Alright, I figured it out when I tried to "work around it" by manually created the resource. It was "not a supported resource type" which I had to look up and it turns out that you can't use Basic tier resources with Private Endpoints. Nowhere in this process did I see such an error message. Really, I am not sure where this can be displayed but it must.
Most helpful comment
FWIW I've been in touch with Microsoft support on this issue and it's on their side. There's no ETA for the permanent fix, and in the meantime you have to reach out to support and they can fix it manually, for each individual private endpoint you need.
You will hit the same error if you do the same thing via the Azure Portal, or the Azure CLI tool, or Powershell, and of course Terraform.
This affects their Postgres, MariaDB and MySQL managed DB products.