Azure / magic-module-specs

The magic module resource definitions for Azure.
MIT License
3 stars 9 forks source link

MM shouldn't pass the read-only field to request body while creating or updating #110

Closed neil-yechenwei closed 5 years ago

neil-yechenwei commented 5 years ago

Runtime error(terraform apply -auto-approve): Diff ... State ...

.go file: func expandArmVirtualHubHubVirtualNetworkConnection(input []interface{}) *[]network.HubVirtualNetworkConnection {     results := make([]network.HubVirtualNetworkConnection, 0)     for _, item := range input {         v := item.(map[string]interface{})         id := v["id"].(string)         remoteVirtualNetwork := v["remote_virtual_network"].([]interface{})         allowHubToRemoteVnetTransit := v["allow_hub_to_remote_vnet_transit"].(bool)         allowRemoteVnetToUseHubVnetGateways := v["allow_remote_vnet_to_use_hub_vnet_gateways"].(bool)         enableInternetSecurity := v["enable_internet_security"].(bool)         name := v["name"].(string)         result := network.HubVirtualNetworkConnection{             ID:   utils.String(id),             Name: utils.String(name),             HubVirtualNetworkConnectionProperties: &network.HubVirtualNetworkConnectionProperties{                 AllowHubToRemoteVnetTransit:         utils.Bool(allowHubToRemoteVnetTransit),                 AllowRemoteVnetToUseHubVnetGateways: utils.Bool(allowRemoteVnetToUseHubVnetGateways),                 EnableInternetSecurity:              utils.Bool(enableInternetSecurity),                 RemoteVirtualNetwork:                expandArmVirtualHubSubResource(remoteVirtualNetwork),             },         }         results = append(results, result)     }     return &results }