Skip to main content

azure_data_factory_datasets Resource

Use the azure_data_factory_datasets InSpec audit resource to test properties of multiple Azure Data Factory datasets for a resource group or the entire subscription.

See the Azure Data Factories Dataset documentation for additional information.

Azure REST API Version, Endpoint, and HTTP Client Parameters

This resource interacts with API versions supported by the resource provider. The api_version can be defined as a resource parameter. If not provided, this resource uses the latest version. For more information, refer to the azure_generic_resource document.

Unless defined, this resource uses the azure_cloud global endpoint and default values for the HTTP client. For more information, refer to the resource pack README.


This resource is available in the Chef InSpec Azure resource pack.

See the Chef InSpec documentation on cloud platforms for information on configuring your Azure environment for InSpec and creating an InSpec profile that uses the InSpec Azure resource pack.


An azure_data_factory_datasets resource block returns all Azure dataset, either within a Resource Group (if provided), or within an entire Subscription.

describe azure_data_factory_datasets(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME') do


resource_group (required)
Azure resource group that the targeted resource resides in.
factory_name (required)
The Azure Data factory name.


A list of the unique resource names.

Field: name

A list of dataset IDs.

Field: id

A list of properties for the resources.

Field: properties

A list of types for each resource.

Field: type

A list of descriptions of the resources.

Field: description

The list of LinkedService names.

Field: linkedServiceName_referenceName

The list of LinkedService types.

Field: linkedServiceName_type


See the documentation on FilterTable for information on using filter criteria on plural resources.


Test if Properties Match.

describe azure_data_factory_datasetsazure_data_factory_datasets(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME') do
  its('names') { should include 'DATASET_NAME' }
  its('types') { should include 'Microsoft.SecurityInsights/alertRules' }
  its('enableds') { should include true }


This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.

Test if Any Dataset Exists in the Data Factory

describe azure_data_factory_datasetsazure_data_factory_datasets(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME') do
  it { should exist }

Test That There Aren’t Any Datasets in a Data Factory

# Should not exist if no dataset are in the data factory

describe azure_data_factory_datasetsazure_data_factory_datasets(resource_group: 'RESOURCE_GROUP', factory_name: 'FACTORY_NAME') do
  it { should_not exist }

Azure Permissions

Your Service Principal must be set up with at least a contributor role on the subscription you wish to test.

Edit this page on GitHub

Thank you for your feedback!


Search Results