Skip to main content

azure_data_factories Resource

Use the azure_data_factories InSpec audit resource to test the properties related to data factories for a resource group or the entire subscription.

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.

Install

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

For information on configuring your Azure environment for Chef InSpec and creating an InSpec profile that uses the InSpec Azure resource pack, see the Chef InSpec documentation for the Azure cloud platform.

Syntax

An azure_data_factories resource block returns all Azure data factories, either within a resource group (if provided) or within an entire Subscription.

describe azure_data_factories do
  #...
end

or

describe azure_data_factories(resource_group: 'RESOURCE_GROUP') do
  #...
end

Parameters

resource_group
Azure resource group where the targeted resource resides.

Properties

names
A list of the unique resource names.

Field: name

ids
A list of data factory IDs.

Field: id

tags
A list of tag:value pairs for the resource.

Field: tag

provisioning_states
The Data Factory provisioning state.

Field: provisioning_state

types
The resource type.

Field: type

repo_configuration_types
The Git or VSTS repository configuration types.

Field: repo type

repo_configuration_project_names
The VSTS repository project names.

Field: project_name

repo_configuration_account_names
The Git or VSTS repository account names.

Field: account_name

repo_configuration_repository_names
The Git or VSTS repository names.

Field: repository_name

repo_configuration_collaboration_branches
The Git or VSTS repository collaboration branches.

Field: collaboration_branch

repo_configuration_root_folders
The Git or VSTS repository root folders.

Field: root_folder

repo_configuration_tenant_ids
The VSTS tenant IDs.

Field: tenant_id

Note

For information on using filter criteria on plural resources, see the documentation on FilterTable

Examples

Test if any Data Factories exist in the resource group

describe azure_data_factories(resource_group: 'RESOURCE_GROUP') do
  it { should exist }
  its('names') { should include "factory_name" }
end

Test that there are not any Data Factories in a resource group

# Should not exist if no Data Factory is in the resource group.

describe azure_data_factories(resource_group: 'RESOURCE_GROUP') do
  it { should_not exist }
end

Filter Data Factories in a resource group by properties

describe azure_data_factories(resource_group: 'RESOURCE_GROUP') do
  its('repo_configuration_type') { should include CONFIGURATION_TYPE }
  its('repo_configuration_project_name') { should include PROJECT_NAME }
  its('repo_configuration_account_name') { should include ACCOUNT_NAME }
  its('repo_configuration_repository_name') { should include REPOSITORY_NAME }
  its('repo_configuration_collaboration_branch') { should include COLLABORATION_BRANCH }
  its('repo_configuration_root_folder') { should include ROOT_FOLDER }
end

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