Azure / Azure/terraform-provider-azapi

issue "azapi_resource" "privateEndpoint1" for Azure Elastic Jobs Private Endpoint creation

Open
#886 6 comments 0 reactions 1 assignee Claimed by @gerrytan View on GitHub
triaged
Dominant language
Go
Stars
244
Forks
97
Avg merge
5d 9h
Merged PRs (30d)
9

Description

```
resource "azapi_resource" "privateEndpoint1" {
type = "Microsoft.Sql/servers/jobAgents/privateEndpoints@2024-05-01-preview"
name = "pep-${var.mytargetgroupName}"
parent_id = azurerm_mssql_job_agent.jobAgent.id
schema_validation_enabled = true
ignore_missing_property = true

body = {
properties = {
targetServerAzureResourceId = "/subscriptions/${var.subscription_id}/resourceGroups/${var.resource_group_name}/providers/Microsoft.Sql/servers/${var.TargetServerName}"
}
}
}

azapi = {
source = "azure/azapi"
version = "2.4.0"
}
```
When I run this code in Terraform I get:
azapi_resource.privateEndpoint1: Creating...

Then I get this
azapi_resource.privateEndpoint1: Still creating... [4m0s elapsed]

Strange part is when I go to the Azure portal for the Elastic Jobs Private endpoint it is created and is pending.
If I go to the Private Link and approve the connection the task finish and outputs the Id.
azapi_resource.privateEndpoint1: Creation complete after 4m2s
If I don't approve it will timeout.

I will not be able to create the private Endpoints with Terraform if it just hangs at this step every time I add a new server to my target groups.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.