0

While running the below query I get null on internalDomainNameSuffix, but the same has value on Json view from the resource page overview.

resources | where type == 'microsoft.network/networkinterfaces' and name == 'interface1'| project  name, properties.dnsSettings.internalDomainNameSuffix

The query result shows correct data for a few resources, but shows null in others while it still shows data through the Json view (It is inconsistent, shows data for some resources but not for others).

Godson
  • 1
  • 1
  • 2
  • Can replace your project statement with this `| project name,tostring(parse_json(properties).dnsSettings.internalDomainNameSuffix) ` and check using this whether you can obtain all the resource results or not. – VenkateshDodda Jun 10 '22 at 04:26
  • @VenkateshDodda-MSFT Unfortunately its still the same with your suggestion. Even querying just the parse_json(properties).dnsSettings does not show the internalDomainNameSuffix property itself. – Godson Jun 10 '22 at 06:16

2 Answers2

0

Try this:

resources 
| where type == 'microsoft.network/networkinterfaces' 
| where isnotnull(name) and isnotnull(properties.dnsSettings.internalDomainNameSuffix)
| project  name, properties.dnsSettings.internalDomainNameSuffix , resourceGroup
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • 1
    Welcome to Stack Overflow. Code is a lot more helpful when it is accompanied by an explanation. Stack Overflow is about learning, not providing snippets to blindly copy and paste. Please [edit] your answer and explain how it answers the specific question being asked. See [answer]. – ChrisGPT was on strike Jul 08 '22 at 15:19
0

Thanks for your suggestions all.

After few conversations with msft, the conclusion is that at specific scenarios involving VM/Network Interface the resource manager is not updated with the property internalDomainNameSuffix along with other properties.

Workaround suggested is: Any operation performed on the resource will force update the resource manager which in-turn updates all the properties. Just a simple tag update does this as well.

Reg fix: Msft understands this behaviour but does not have any plans on fixing it anytime in the near future or ever.

Godson
  • 1
  • 1
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 11 '22 at 14:14