Skip to main content

azure_microsoft_defender_setting Resource

Use the azure_microsoft_defender_setting Chef InSpec audit resource to test the properties of a Microsoft Defender for Cloud Setting configuration.

Syntax

describe azure_microsoft_defender_setting(name: 'SETTING_NAME') do
  it { should exist }
end

Parameters

name
The name of the resource.

Properties

id
The ID of the resource.
name
The name of the resource.
kind
The resource kind.
type
The resource type.
properties.enabled
Is the alert sync setting enabled.

See the Azure documentation on Defender for Cloud Settings configuration for additional information. You may access any attribute in the response with the key names separated by dots (.).

Examples

Test if a name exists

This resource does not have any examples.

Matchers

For a full list of available matchers, see our Universal Matchers page.

This resource has the following special matchers.

exists

The control passes if the filter returns at least one result.

describe azure_microsoft_defender_setting(name: 'SETTING_NAME') do
  it { should exist }
end

Use should_not if you expect zero matches.

describe azure_microsoft_defender_setting(name: 'SETTING_NAME') do
  it { should_not exist }
end

Azure Permissions

Graph resources require specific privileges granted to your service principal. Please refer to the Microsoft Documentation for information on how to grant these permissions to your application.

Edit this page on GitHub

Thank you for your feedback!

×