Azure Network Service Endpoint Storage Policy

This page shows how to write Terraform and Azure Resource Manager for Network Service Endpoint Storage Policy and write them securely.

azurerm_subnet_service_endpoint_storage_policy (Terraform)

The Service Endpoint Storage Policy in Network can be configured in Terraform with the resource name azurerm_subnet_service_endpoint_storage_policy. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

network.tf#L37
resource "azurerm_subnet_service_endpoint_storage_policy" "storage" {
  name                = "storage-policy"
  resource_group_name = azurerm_resource_group.rg.name
  location            = azurerm_resource_group.rg.location
  definition {
    name        = "aksAccess"
network.tf#L37
resource "azurerm_subnet_service_endpoint_storage_policy" "storage" {
  name                = "storage-policy"
  resource_group_name = azurerm_resource_group.rg.name
  location            = azurerm_resource_group.rg.location
  definition {
    name        = "aksAccess"

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).

Parameters

Explanation in Terraform Registry

Manages a Subnet Service Endpoint Storage Policy.

Tips: Best Practices for The Other Azure Network Resources

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

risk-label

azurerm_network_security_group

Ensure to disable RDP port from the Internet

It is better to disable the RDP port from the Internet. RDP access should not be accepted from the Internet (*, 0.0.0.0, /0, internet, any), and consider using the Azure Bastion Service.

risk-label

azurerm_network_security_rule

Ensure to set a more restrictive CIDR range for ingress from the internet

It is better to set a more restrictive CIDR range not to use very broad subnets. If possible, segments should be divided into smaller subnets.

risk-label

azurerm_network_watcher_flow_log

Ensure to enable Retention policy for flow logs and set it to enough duration

It is better to enable a retention policy for flow logs. Flow logs show us all network activity in the cloud environment and support us when we face critical incidents.

Review your Azure Network 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.Network/serviceEndpointPolicies (Azure Resource Manager)

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

Example Usage from GitHub

sep.template.json#L34
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "apiVersion": "[variables('api_version')]",
            "name": "[parameters('sep_name')]",
            "location": "[parameters('location')]",
            "properties": {
                "serviceEndpointPolicyDefinitions": [
ARM_stgSvcEndpoint.json#L23
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "name": "[parameters('serviceEndpointPolicyName')]",
            "location": "[parameters('location')]",
            "apiVersion": "2019-08-01",
            "dependsOn": [],
            "properties": {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {
ServiceEndpointPolicyListAll.json#L13
            "type": "Microsoft.Network/serviceEndpointPolicies",
            "location": "westus",
            "properties":
             {
              "serviceEndpointPolicyDefinitions": [
              {

Parameters

  • name required - string
  • type required - string
  • apiVersion required - string
  • location required - string

    Resource location.

  • tags optional - string

    Resource tags.

  • properties required
      • serviceEndpointPolicyDefinitions optional array
          • properties optional
              • description optional - string

                A description for this rule. Restricted to 140 chars.

              • service optional - string

                Service endpoint name.

              • serviceResources optional - array

                A list of service resources.

          • name optional - string

            The name of the resource that is unique within a resource group. This name can be used to access the resource.

Frequently asked questions

What is Azure Network Service Endpoint Storage Policy?

Azure Network Service Endpoint Storage Policy is a resource for Network of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Network Service Endpoint Storage Policy?

For Terraform, the reload/dpl-platform-poc and reload/dpl-platform-poc source code examples are useful. See the Terraform Example section for further details.

For Azure Resource Manager, the plzm/azure-deploy, Lauan/Azure and sanjaypavan/OldAzure-Rest-API source code examples are useful. See the Azure Resource Manager Example section for further details.