Denying OpenAI Resource Creation with Abuse Monitoring Enabled using Azure Policy

SwathiDhanwada-MSFT 18,771 Reputation points
2024-08-01T08:17:29.8633333+00:00

How can I create an Azure policy to deny the creation of OpenAI resources with abuse monitoring enabled, when my current policy only marks resources as non-compliant after creation?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
911 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,193 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,771 Reputation points
    2024-08-01T08:17:51.9233333+00:00

    When attempting to create an Azure policy to deny the creation of OpenAI resources with abuse monitoring enabled, you might find that the resource is created but marked as non-compliant only after a policy scan. This occurs because the capabilities property, which includes the ContentLogging attribute, only appears after the resource is deployed. Thus, it cannot be used to block the resource creation during deployment.

    As a workaround, you can consider implementing other policies or strategies. One approach is to create policies that identify non-compliant resources after they are deployed and take appropriate actions, such as remediation scripts or alerts. Alternatively, you can restrict the models that can be deployed within the OpenAI resources, which can indirectly prevent the creation of non-compliant resources.

    For more detailed guidance on creating and managing Azure policies, refer to the following resources:

    Resources:

    Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

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.