Skip to content

Commit

Permalink
Merge pull request #22812 from magodo/network_custom_ip_prefix_client…
Browse files Browse the repository at this point in the history
…_init

`azurerm_custom_ip_prefix` - Honors customized resource manager endpoint
  • Loading branch information
tombuildsstuff authored Aug 4, 2023
2 parents 1ea562c + 9d2a983 commit ce775a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/network/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewClient(o *common.ClientOptions) (*Client, error) {
configurationPolicyGroupClient := network.NewConfigurationPolicyGroupsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&configurationPolicyGroupClient.Client, o.ResourceManagerAuthorizer)

customIpPrefixesClient := network.NewCustomIPPrefixesClient(o.SubscriptionId)
customIpPrefixesClient := network.NewCustomIPPrefixesClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&customIpPrefixesClient.Client, o.ResourceManagerAuthorizer)

DDOSProtectionPlansClient := network.NewDdosProtectionPlansClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
Expand Down
8 changes: 8 additions & 0 deletions scripts/run-gradually-deprecated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ function runGraduallyDeprecatedFunctions {
exit 1
fi
fi

# require Azure SDK clients are created with the resource manager endpoint specified
grep -H -n "Client(o.SubscriptionId)" "$f" && {
echo "The Azure SDK (track1 & kermit) clients should be created with the function NewFoosClientWithBaseURI() "
echo "that has the resource manager endpoint explicitly specified. These can be found in:"
echo "* $f"
exit 1
}
fi

done
Expand Down

0 comments on commit ce775a7

Please sign in to comment.