Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_route_table - Subnet association is dropped on update. #450

Merged
merged 8 commits into from
Oct 23, 2017
1 change: 1 addition & 0 deletions azurerm/resource_arm_route_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func resourceArmRouteTable() *schema.Resource {
"route": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Expand Down
2 changes: 2 additions & 0 deletions website/docs/authenticating_via_azure_cli.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ The output (similar to below) will display one or more Subscriptions - with the
```shell
$ az account set --subscription="SUBSCRIPTION_ID"
```

Also, if you have been authenticating with a service principal and you switch to Azure CLI, you must null out the ARM_* environment variables. Failure to do so causes errors to be thrown.
32 changes: 31 additions & 1 deletion website/docs/r/role_assignment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "azurerm_role_assignment" "test" {
}
```

## Example Usage (Custom Role)
## Example Usage (Custom Role & Service Principal)

```
data "azurerm_subscription" "primary" {}
Expand Down Expand Up @@ -60,6 +60,36 @@ resource "azurerm_role_assignment" "test" {
}
```

## Example Usage (Custom Role & User)

```
data "azurerm_subscription" "primary" {}

data "azurerm_client_config" "test" {}

resource "azurerm_role_definition" "test" {
role_definition_id = "00000000-0000-0000-0000-000000000000"
name = "my-custom-role-definition"
scope = "${data.azurerm_subscription.primary.id}"

permissions {
actions = ["Microsoft.Resources/subscriptions/resourceGroups/read"]
not_actions = []
}

assignable_scopes = [
"${data.azurerm_subscription.primary.id}",
]
}

resource "azurerm_role_assignment" "test" {
name = "00000000-0000-0000-0000-000000000000"
scope = "${data.azurerm_subscription.primary.id}"
role_definition_id = "${azurerm_role_definition.test.id}"
principal_id = "${data.azurerm_client_config.test.client_id}"
}
```

## Argument Reference

The following arguments are supported:
Expand Down