VSChina / magic-modules

Magic Modules: Automagically generate Google Cloud Platform support for OSS
Apache License 2.0
1 stars 4 forks source link

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

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 }

houkms commented 5 years ago

@neil-yechenwei Seems to be the same issue with Issue #34 .

mybayern1974 commented 5 years ago

Close for dup