Azure Cloud-Eigenschaften
2 minute read
Azure inventory provides the option to create custom properties to capture additional details about Azure resources. These properties can be defined using JSONPath expressions to extract specific information from the resource data.
Add a new property:
- In Azure inventory, select the New button to create a custom property.
- Define an appropriate Name for the property (e.g., PasswordAuthentication).
- Choose the relevant Resource Type (e.g., microsoft.compute/virtualmachines).
Define JSONPath:
Enter the path in the JSONPath field that describes the desired information (e.g.,
$.properties.osProfile.computerName
for the hostname).The JSONPath for the property can be identified from a resource already inventoried with Docusnap.
Analyze the JSON structure:
Locate the section in the ARM template that contains the required property (e.g.,osProfile
orstorageProfile
). The JSONPath specifies the exact path to this property.
Example JSONPath:$.properties.osProfile.linuxConfiguration.disablePasswordAuthentication
- The starting point is the resources property, which contains an array of defined resources in the document. Select the desired element from this array.
- The
$
symbol represents the root of the JSON document. Within the selected resource entry, the properties property is accessed. - The path navigates from resources through properties, osProfile, and linuxConfiguration to the disablePasswordAuthentication property.
- The value of this property indicates whether password authentication is disabled (true) or enabled (false).
Enter JSONPath:
Input the identified JSONPath into the corresponding field to define the custom property.
Save:
- Save the property using the Save button.
These steps enable the easy extension and customization of Azure inventory.