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
resource "azurerm_security_center_subscription_pricing" "seccenteraks" {
tier = "Standard"
resource_type = "KubernetesService"
}
resource "azurerm_security_center_subscription_pricing" "seccenteracr" {
resource "azurerm_security_center_subscription_pricing" "asc_aks" {
tier = "Standard"
resource_type = "KubernetesService"
}
resource "azurerm_security_center_subscription_pricing" "asc_cr" {
resource "azurerm_security_center_subscription_pricing" "example" {
tier = "Standard"
resource_type = "VirtualMachines"
}
resource "azurerm_security_center_subscription_pricing" "example" {
tier = "Standard"
resource_type = "VirtualMachines"
}
resource "azurerm_security_center_subscription_pricing" "sec_pricing" {
tier = "Standard"
resource "azurerm_security_center_subscription_pricing" "sc" {
tier = "Standard"
}
resource "azurerm_security_center_workspace" "sc" {
scope = var.scope_id
resource "azurerm_security_center_subscription_pricing" "main" {
tier = var.security_contact_tier
resource "azurerm_security_center_subscription_pricing" "security_centre" {
tier = "Free"
}
module "rg_shared" {
source = "../modules/resource_group"
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.
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.
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.
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.
Parameters
-
id
optional computed - string -
resource_type
optional - string -
tier
required - string -
timeouts
single block
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.
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.
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
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"apiVersion": "2018-06-01",
"name": "AppServices",
"properties": {
"pricingTier": "Standard"
}
"type": "Microsoft.Security/pricings",
"name": "VirtualMachines",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
"type": "Microsoft.Security/pricings",
"deploymentScope": "subscription",
"existenceScope": "subscription",
"roleDefinitionIds": [
"/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635"
],
"type": "Microsoft.Security/pricings",
"apiVersion": "2017-08-01-preview",
"name": "default",
"properties": {
"pricingTier": "[variables('pricing')]"
}
"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.