Skip to content

Commit

Permalink
Merge pull request #4137 from bentterp/issue3730
Browse files Browse the repository at this point in the history
azurerm_subnet - Fixed delegation (fixes #3730)
  • Loading branch information
tombuildsstuff authored Aug 29, 2019
2 parents c56de62 + c0664e3 commit a4da6b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions azurerm/resource_arm_subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func resourceArmSubnet() *schema.Resource {
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{
"Microsoft.Network/virtualNetworks/subnets/action",
"Microsoft.Network/virtualNetworks/subnets/join/action",
"Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action",
}, false),
},
},
Expand Down
10 changes: 6 additions & 4 deletions website/docs/r/subnet.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "azurerm_subnet" "test" {
service_delegation {
name = "Microsoft.ContainerInstance/containerGroups"
actions = ["Microsoft.Network/virtualNetworks/subnets/action"]
actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"]
}
}
}
Expand Down Expand Up @@ -74,7 +74,9 @@ The following arguments are supported:
---

A `delegation` block supports the following:

* `name` (Required) A name for this delegation.

* `service_delegation` (Required) A `service_delegation` block as defined below.

---
Expand All @@ -83,9 +85,9 @@ 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)

* `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` or `Microsoft.Web/serverFarms`.
* `actions` - (Optional) A list of Actions which should be delegated. Possible values include: `Microsoft.Network/virtualNetworks/subnets/action`.
* `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`.

* `actions` - (Required) 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`.

## Attributes Reference

Expand Down

0 comments on commit a4da6b3

Please sign in to comment.