New Azure Resource Alias for Subscriptions

Sebastian Claesson 0 Reputation points
2023-05-09T13:02:10.2433333+00:00

Hi,

I'm trying to create an Azure policy that allows certain subscriptions offer types, which are listed here:
https://azure.microsoft.com/en-us/support/legal/offer-details/

The thought behind this is that we can separate for example on management group to only allow Visual studio / free trials etc. in one management group structure, Enterprise dev/test subscriptions in another etc.

This would allow us to prevent a subscription, which has the intention for a dev/test or personal sandbox environments to accidently have harder or less azure policies controlling it.

However, the Microsoft.Resource provider does not have any aliases for the Subscription resource type.

There's only aliases provided for the Microsoft.Subscription/SubscriptionDefinitions resource type.

Creating an azure policy to find any Subscriptions with this logic works:

{
	"field": "type",
	"equals": "microsoft.resources/subscriptions"
}

However, when trying to access properties for the resource, using for example "subscriptionPolicies.qoutaId" I get the following error message:
Using PowerShell and trying to list aliases for Subscriptions, It returns nothing of the kind.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
860 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,661 Reputation points
    2023-05-09T13:21:22.2+00:00

    @Sebastian Claesson Welcome to Microsoft Q & A Community Forum and thanks for detailed information. As you are already aware that there are no aliases available Microsoft.Resources/subscriptions. Support for requesting aliases is now handled by Azure Customer Support. Open a new Azure Customer Support ticket if you believe you need new aliases to be published.

    If this answers your query, do click "Accept as Answer" and click "Yes" for the same, which might be beneficial to other community members reading this thread. If you have further questions, kindly revert with further information so that we can assist you accordingly.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.