Open kaidaguerre opened 3 years ago
This seems to be a bug with Azure SDK where we have a custom marshaler for the AzureFirewallIPConfigurationPropertiesFormat
struct which does not marshal the PrivateIPAddress
and ProvisioningState
properties. The function is:
// MarshalJSON is the custom marshaler for AzureFirewallIPConfigurationPropertiesFormat.
func (aficpf AzureFirewallIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if aficpf.Subnet != nil {
objectMap["subnet"] = aficpf.Subnet
}
if aficpf.PublicIPAddress != nil {
objectMap["publicIPAddress"] = aficpf.PublicIPAddress
}
return json.Marshal(objectMap)
}
The workaround for this would be something we are already doing with a transform function.
Slack conversation thread https://turbothq.slack.com/archives/C01AC8JQNHH/p1610017247038000
Test column using transform
Here in field test_column we are getting all the properties but not in the field ip_configurations missing keys for ip_configurations
steampipe query --output json "select name, test_column, ip_configurations from azure.azure_firewall"
Test transform function
Struct for IPConfigurations
Branch name
azure-firewall-test
on https://github.com/turbotio/steampipe-plugin-azure repo