Update NSG Rule - Unable to add ASG (source\destination)

Natanel Yaakovi 6 Reputation points
2022-09-15T13:10:11.58+00:00

I’m trying to update rule source that contain ASG with additional ASG, by using the following:

networkSecurityGroup
.update()
.updateRule(ruletest)
.withSourceApplicationSecurityGroup("/subscriptions/”subscription_id”/resourceGroups/TEST/providers/Microsoft.Network/applicationSecurityGroups/ASG2")
.parent()
.apply();

The code seems to execute with no errors or exceptions, but the ASG is not added to the source.

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.
2,389 questions
{count} votes

Your answer

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