terraform-provider-azurerm: The requested resource of type 'Microsoft.DBforMariaDB/servers/privateEndpointConnectionProxies' with name '' was not found.
Community Note
- Please vote on this issue by adding a đ reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave â+1â or âme tooâ comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and AzureRM Provider) Version
terraform -v Terraform v0.12.23
- provider.azurerm v2.2.0
- provider.null v2.1.2
Affected Resource(s)
- azurerm_private_endpoint
Terraform Configuration Files
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]
}
Debug Output
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=[]
Panic Output
Expected Behavior
Create the private endpoint for MariaDB
Actual Behavior
It appears the NIC is not getting created in time
Important Factoids
References
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 7
- Comments: 19
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.
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.
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,