From 2c1362eca71d5ec9baac85ddaa11545cd742fce9 Mon Sep 17 00:00:00 2001 From: Richard Liu Date: Sun, 27 Oct 2019 06:59:35 -0700 Subject: [PATCH] Add missing subnet delegation services and actions (#4690) This PR fixes #4599 --- azurerm/resource_arm_subnet.go | 4 ++++ website/docs/r/subnet.html.markdown | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/azurerm/resource_arm_subnet.go b/azurerm/resource_arm_subnet.go index f352eea7af8a..84e8eb2746d8 100644 --- a/azurerm/resource_arm_subnet.go +++ b/azurerm/resource_arm_subnet.go @@ -106,12 +106,14 @@ func resourceArmSubnet() *schema.Resource { "Microsoft.Batch/batchAccounts", "Microsoft.ContainerInstance/containerGroups", "Microsoft.Databricks/workspaces", + "Microsoft.DBforPostgreSQL/serversv2", "Microsoft.HardwareSecurityModules/dedicatedHSMs", "Microsoft.Logic/integrationServiceEnvironments", "Microsoft.Netapp/volumes", "Microsoft.ServiceFabricMesh/networks", "Microsoft.Sql/managedInstances", "Microsoft.Sql/servers", + "Microsoft.StreamAnalytics/streamingJobs", "Microsoft.Web/hostingEnvironments", "Microsoft.Web/serverFarms", }, false), @@ -122,9 +124,11 @@ func resourceArmSubnet() *schema.Resource { Elem: &schema.Schema{ Type: schema.TypeString, ValidateFunc: validation.StringInSlice([]string{ + "Microsoft.Network/networkinterfaces/*", "Microsoft.Network/virtualNetworks/subnets/action", "Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action", + "Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action", }, false), }, }, diff --git a/website/docs/r/subnet.html.markdown b/website/docs/r/subnet.html.markdown index 867fd05b0674..fde57267db04 100644 --- a/website/docs/r/subnet.html.markdown +++ b/website/docs/r/subnet.html.markdown @@ -83,11 +83,11 @@ A `delegation` block supports the following: A `service_delegation` block supports the following: --> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations) +-> **NOTE:** Delegating to services may not be available in all regions. Check that the service you are delegating to is available in your region using the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). Also, `actions` is specific to each service type. The exact list of `actions` needs to be retrieved using the aforementioned [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/network/vnet/subnet?view=azure-cli-latest#az-network-vnet-subnet-list-available-delegations). -* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.Databricks/workspaces`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.Netapp/volumes`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.Web/hostingEnvironments` and `Microsoft.Web/serverFarms`. +* `name` - (Required) The name of service to delegate to. Possible values include `Microsoft.BareMetal/AzureVMware`, `Microsoft.BareMetal/CrayServers`, `Microsoft.Batch/batchAccounts`, `Microsoft.ContainerInstance/containerGroups`, `Microsoft.Databricks/workspaces`, `Microsoft.DBforPostgreSQL/serversv2`, `Microsoft.HardwareSecurityModules/dedicatedHSMs`, `Microsoft.Logic/integrationServiceEnvironments`, `Microsoft.Netapp/volumes`, `Microsoft.ServiceFabricMesh/networks`, `Microsoft.Sql/managedInstances`, `Microsoft.Sql/servers`, `Microsoft.StreamAnalytics/streamingJobs`, `Microsoft.Web/hostingEnvironments` and `Microsoft.Web/serverFarms`. -* `actions` - (Optional) A list of Actions which should be delegated. Possible values include `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action`, `Microsoft.Network/virtualNetworks/subnets/action` and `Microsoft.Network/virtualNetworks/subnets/join/action`. +* `actions` - (Optional) A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values include `Microsoft.Network/networkinterfaces/*`, `Microsoft.Network/virtualNetworks/subnets/action`, `Microsoft.Network/virtualNetworks/subnets/join/action`, `Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action` and `Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action`. ## Attributes Reference