Closed hund030 closed 5 years ago
This issue was fixed in PR #35
@hund030, could you please verify the fix and accordingly close this issue?
@houkms , After fixed in PR #35 , the scale_unit
property correctly convert to int32 but other int32 object who work well before now is converted to **int32. They are set within a flatten method, which is different from scale_unit
set directly.
func flattenArmP2sVpnGatewayVpnClientConnectionHealth(input *network.VpnClientConnectionHealth) []interface{} {
if input == nil {
return make([]interface{}, 0)
}
result := make(map[string]interface{})
result["allocated_ip_addresses"] = utils.FlattenStringSlice(input.AllocatedIPAddresses)
if totalEgressBytesTransferred := input.TotalEgressBytesTransferred; totalEgressBytesTransferred != nil {
result["total_egress_bytes_transferred"] = int(**totalEgressBytesTransferred)
}
if totalIngressBytesTransferred := input.TotalIngressBytesTransferred; totalIngressBytesTransferred != nil {
result["total_ingress_bytes_transferred"] = int(**totalIngressBytesTransferred)
}
if vpnClientConnectionsCount := input.VpnClientConnectionsCount; vpnClientConnectionsCount != nil {
result["vpn_client_connections_count"] = int(**vpnClientConnectionsCount)
}
return []interface{}{result}
}
Above totalIngressBytesTransferred
and TotalEgressBytesTransferred
are int64 and VpnClientConnectionsCount
is int32
@hund030 Fixed in PR #38, please try it again.
generating codes: d.Set("scale_unit", int(p2SVpnGatewayProperties.VpnGatewayScaleUnit))
Error: azurerm\resource_arm_p2s_vpn_gateway.go:213:26: cannot convert p2SVpnGatewayProperties.VpnGatewayScaleUnit (type *int32) to type int make: *** [GNUmakefile:20: build] Error 2