Azure Security Center Subscription Pricing

This page shows how to write Terraform and Azure Resource Manager for Security Center Subscription Pricing and write them securely.

azurerm_security_center_subscription_pricing (Terraform)

The Subscription Pricing in Security Center can be configured in Terraform with the resource name azurerm_security_center_subscription_pricing. The following sections describe 8 examples of how to use the resource and its parameters.

Example Usage from GitHub

securitycenter.tf#L1
resource "azurerm_security_center_subscription_pricing" "seccenteraks" {
  tier          = "Standard"
  resource_type = "KubernetesService"
}

resource "azurerm_security_center_subscription_pricing" "seccenteracr" {
akssec.tf#L1
resource "azurerm_security_center_subscription_pricing" "asc_aks" {
  tier          = "Standard"
  resource_type = "KubernetesService"
}

resource "azurerm_security_center_subscription_pricing" "asc_cr" {
main.tf#L5
resource "azurerm_security_center_subscription_pricing" "example" {
  tier          = "Standard"
  resource_type = "VirtualMachines"
}
main.tf#L5
resource "azurerm_security_center_subscription_pricing" "example" {
  tier          = "Standard"
  resource_type = "VirtualMachines"
}
resource.tf#L6
resource "azurerm_security_center_subscription_pricing" "sec_pricing" {
  tier = "Standard"
securitycenter.tf#L9
resource "azurerm_security_center_subscription_pricing" "sc" {
  tier = "Standard"
}

resource "azurerm_security_center_workspace" "sc" {
  scope        = var.scope_id
security-centre.tf#L14
resource "azurerm_security_center_subscription_pricing" "main" {
  tier = var.security_contact_tier
main.tf#L20
resource "azurerm_security_center_subscription_pricing" "security_centre" {
  tier = "Free"
}

module "rg_shared" {
    source = "../modules/resource_group"

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Security Best Practices for azurerm_security_center_subscription_pricing

There are 3 settings in azurerm_security_center_subscription_pricing that should be taken care of for security reasons. The following section explain an overview and example code.

risk-label

Ensure to enable alert notifications

It is better to enable Azure Defender, which is a cloud workload protection service for App Services. In addition, It is also able to analyze non-Azure resources, utilizing Azure Arc, including those on-premises and in both AWS and GCP.

risk-label

Ensure to enable alert notifications

It is better to enable Azure Defender, which is a cloud workload protection service for container registries. In addition, It is also able to analyze non-Azure resources, utilizing Azure Arc, including those on-premises and in both AWS and GCP.

risk-label

Ensure to enable standard subscription tier to benefit from Azure Defender

It is better to select a standard subscription tier to use the advanced features such as behavioral analysis of Azure Defender even though it could be quite costly.

Review your Azure Security Center settings

You can check if the azurerm_security_center_subscription_pricing setting in your .tf file is correct in 3 min with Shisho Cloud.

Parameters

Explanation in Terraform Registry

Manages the Pricing Tier for Azure Security Center in the current subscription.

NOTE: Deletion of this resource does not change or reset the pricing tier to Free

Tips: Best Practices for The Other Azure Security Center Resources

In addition to the azurerm_security_center_contact, Azure Security Center has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

azurerm_security_center_contact

Ensure to enable alert notifications

It is better to configure at least one valid contact for the security center. Microsoft will inform you directly in the event of a security incident using emails.

Review your Azure Security Center settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

Microsoft.Security/pricings (Azure Resource Manager)

The pricings in Microsoft.Security can be configured in Azure Resource Manager with the resource name Microsoft.Security/pricings. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

Microsoft.Authorization_policyDefinitions-Deploy-ASC-Standard.parameters.json#L112
                "type": "Microsoft.Security/pricings",
                "deploymentScope": "subscription",
                "existenceScope": "subscription",
                "roleDefinitionIds": [
                  "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
                ],
Microsoft.Authorization_policyDefinitions-Deploy-ASC-Standard.parameters.json#L112
                "type": "Microsoft.Security/pricings",
                "deploymentScope": "subscription",
                "existenceScope": "subscription",
                "roleDefinitionIds": [
                  "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
                ],
policy_definition_es_deploy_asc_standard.json#L107
          "type": "Microsoft.Security/pricings",
          "deploymentScope": "subscription",
          "existenceScope": "subscription",
          "roleDefinitionIds": [
            "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
          ],
Microsoft.Authorization_policyDefinitions-Deploy-ASC-Standard.parameters.json#L112
                "type": "Microsoft.Security/pricings",
                "deploymentScope": "subscription",
                "existenceScope": "subscription",
                "roleDefinitionIds": [
                  "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
                ],
Microsoft.Authorization_policyDefinitions-Deploy-ASC-Standard.parameters.json#L115
                "type": "Microsoft.Security/pricings",
                "deploymentScope": "subscription",
                "existenceScope": "subscription",
                "roleDefinitionIds": [
                  "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
                ],
configureCustomWorkspaceStandard.json#L45
            "type": "Microsoft.Security/pricings",
            "apiVersion": "2018-06-01",
            "name": "AppServices",
            "properties": {
                "pricingTier": "Standard"
            }
Policy_Definition_security_center.json#L35
                      "type": "Microsoft.Security/pricings",
                      "name": "VirtualMachines",
                      "deploymentScope": "subscription",
                      "existenceScope": "subscription",
                      "roleDefinitionIds": [
                        "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
Microsoft.Authorization_policyDefinitions-Deploy-ASC-Standard.parameters.json#L112
                "type": "Microsoft.Security/pricings",
                "deploymentScope": "subscription",
                "existenceScope": "subscription",
                "roleDefinitionIds": [
                  "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
                ],
deploy.json#L28
            "type": "Microsoft.Security/pricings",
            "apiVersion": "2017-08-01-preview",
            "name": "default",
            "properties": {
                "pricingTier": "[variables('pricing')]"
            }
configureCustomWorkspaceStandard.json#L45
            "type": "Microsoft.Security/pricings",
            "apiVersion": "2018-06-01",
            "name": "AppServices",
            "properties": {
                "pricingTier": "Standard"
            }

Frequently asked questions

What is Azure Security Center Subscription Pricing?

Azure Security Center Subscription Pricing is a resource for Security Center of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Security Center Subscription Pricing?

For Terraform, the azure-adventure-day/aad-team, msandbu/akseks and saileshkaluva/terrarepo source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the remiminnebo/enterprise-scale-arm, lufussel/Enterprise-Scale-Sept and vrugelda/ESA source code examples are useful. See the Azure Resource Manager Example section for further details.