Skip to content

Commit

Permalink
Add missing subnet delegation services and actions (#4690)
Browse files Browse the repository at this point in the history
This PR fixes #4599
  • Loading branch information
richardzone authored and katbyte committed Oct 27, 2019
1 parent 95296c5 commit 2c1362e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions azurerm/resource_arm_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
},
},
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/subnet.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2c1362e

Please sign in to comment.