Skip to content

Commit

Permalink
Merge pull request #450 from sebastus/issue36
Browse files Browse the repository at this point in the history
azurerm_route_table - Subnet association is dropped on update.
  • Loading branch information
mbfrahry authored Oct 23, 2017
2 parents 871e728 + 25548aa commit d5fccc8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
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

0 comments on commit d5fccc8

Please sign in to comment.