hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.52k stars 4.6k forks source link

azurerm_private_endpoint returning internal server error, but still creating the resources #8691

Open obikay200 opened 3 years ago

obikay200 commented 3 years ago

Issue

Terraform (and AzureRM Provider) Version

Terraform v0.13.3

Affected Resource(s)

Terraform Configuration Files

resource "azurerm_private_endpoint" "development" {
  name                            = "development-kubernetes-endpoint"
  location                        = azurerm_resource_group.development.location
  resource_group_name = azurerm_resource_group.development.name
  subnet_id                     = azurerm_subnet.development.id

  private_service_connection {
    name                                          = "development"
    private_connection_resource_id = var.kubePrivateLink ( valid service id, confirmed )
    is_manual_connection                = false
  }
}

Debug Output

module.development.azurerm_private_endpoint.development: Creating... module.development.azurerm_private_endpoint.development: Still creating... [10s elapsed]

Error: waiting for creation of Private Endpoint "development-kubernetes-endpoint" (Resource Group "DEVELOPMENT"): Code="InternalServerError" Message="An error occurred." Details=[]

on development/private-endpoint.tf line 1, in resource "azurerm_private_endpoint" "development": 1: resource "azurerm_private_endpoint" "development" {

Expected Behavior

Create and wait for creation to complete of endpoint

Actual Behavior

Terraform exits with a internal server error from azure, but the resources still create in azure. If you run apply again it will will say the resource already exists...

module.development.azurerm_private_endpoint.development: Creating...

Error: A resource with the ID "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/DEVELOPMENT/providers/Microsoft.Network/privateEndpoints/development-kubernetes-endpoint" already exists - to be managed via Terraform this resource needs to be imported into the State. Please see the resource documentation for "azurerm_private_endpoint" for more information.

on development/private-endpoint.tf line 1, in resource "azurerm_private_endpoint" "development": 1: resource "azurerm_private_endpoint" "development" {

antonrademaker commented 2 years ago

Any news on this? Is there more information about the upstream issue? (a link for example?)

mirwaisbilal commented 2 years ago

I have a similar issue. Error: waiting for creation of Private Endpoint "pe-use-00021219-dv" (Resource Group "testrgp"): Code="InternalServerError" Message="An error occurred." Details=[]

When I rerun the pipeline it says a resource already exist.

blajsero commented 2 years ago

I have similar issue for code witch was not changed since it last worked: Error: updating Private Endpoint "lab-cognitivesearch-****-pe" (Resource Group "lab-****"): network.PrivateEndpointsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="InternalServerError" Message="An error occurred." Details=[]