Terraform v0.11.8
+ provider.azurerm v1.13.0
See issue.tf
See output.log
The load balancer, backend pool, probe and rule should be created.
The backend pool is not created:
Error: Error applying plan:
1 error(s) occurred:
* azurerm_lb_backend_address_pool2018-10-03T16:41:32.155+0100 [DEBUG] plugin: plugin process exited: path=C:\Users\Me\workspace\Terraform-Azure-Issue\.terraform\plugins\windows_amd64\terraform-provider-azurerm_v1.16.0_x4.exe
.example-backendpool: 1 error(s) occurred:
* azurerm_lb_backend_address_pool.example-backendpool: Error Creating/Updating Load Balancer "example-lb" (Resource Group "terraform-example-resource-group"): network.LoadBalancersClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=500 Code="InternalServerError" Message="An error occurred." Details=[]
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
- `$ENV:TF_LOG="trace"
terraform init
terraform apply
If you comment out the loadbalancer rule, Terraform will create the backend pool. However, uncommenting the rule after successfully doing this will result in a similar error when you try to apply the rule. If you successfully apply the backend pool, you can manually add the loadbalancer rules to the loadbalancer in the portal. However, if you apply the rules and the backend pool fails to create, the rules are left in a broken state as they are supposed to be created after the backend pool.