Share via

Creating Service Association Link between Azure subnet and GitHub gives Subnet In use message

Walter V 5 Reputation points
2026-03-24T20:23:07.4633333+00:00

When creating a Service Association Link with GitHub, I get a 'The subnet is in use by another resource' message.

Documentation being followed:

https://docs.github.com/en/organizations/managing-organization-settings/configuring-private-networking-for-github-hosted-runners-in-your-organization

Command:

az resource create --resource-group $RESOURCE_GROUP_NAME --name $NETWORK_SETTINGS_RESOURCE_NAME --resource-type GitHub.Network/networkSettings --properties "{ \"location\": \"$AZURE_LOCATION\", \"properties\" : { \"subnetId\": \"/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME\", \"businessId\": \"$DATABASE_ID\" }}" --is-full-object --output table --query "{GitHubId:tags.GitHubId, name:name}" --api-version $API_VERSION

Output:

(SubnetInUse) The subnet is in use by another resource.
Code: SubnetInUse
Message: The subnet is in use by another resource.

I had this subnet associated with GitHub previously, then had it removed to debug network issues. Now I am trying to connect it back to GitHub. There are currently no NICs or other Azure resources attached to this subnet.

Is the error 'The subnet is in use by another resource.' coming from Azure or GitHub?

Azure Virtual Network
Azure Virtual Network

An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.


1 answer

Sort by: Most helpful
  1. Walter V 5 Reputation points
    2026-03-26T18:34:26.61+00:00

    There was something that needed to be done on the GitHub side, that required to create a support ticket. After making a support ticket out to GitHub, I am able to make the Service Association Link to github as per the documentation.

    https://docs.github.com/en/organizations/managing-organization-settings/configuring-private-networking-for-github-hosted-runners-in-your-organization

    Thanks All,

    Closing this off.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.