Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 4.3 KB

azure_data_lake_storage_gen2_filesystem.md

File metadata and controls

102 lines (68 loc) · 4.3 KB
title platform
About the azure_data_lake_storage_gen2_filesystem Resource
azure

azure_data_lake_storage_gen2_filesystem

Use the azure_data_lake_storage_gen2_filesystem InSpec audit resource to test the properties related to Azure Data Lake Storage Gen2 Filesystem.

Azure REST API Version, Endpoint, and HTTP Client Parameters

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

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

Availability

Installation

This resource is available in the InSpec Azure resource pack. For an example, inspec.yml file and how to set up your Azure credentials, refer to resource pack README.

Syntax

name and account_name are required parameters, and dns_suffix is an optional parameter.

describe azure_data_lake_storage_gen2_filesystem(account_name: 'ACCOUNT_NAME', name: 'FILE_SYSTEM') do
  it  { should exist }
end
describe azure_data_lake_storage_gen2_filesystem(account_name: 'ACCOUNT_NAME', name: 'FILE_SYSTEM')  do
  it  { should exist }
end

Parameters

name (required)

Name of the Azure Date Lake Storage Gen2 to test.

account_name (required)

Azure storage account name.

dns_suffix (optional)

The DNS suffix for the Azure Data Lake Storage endpoint.

Properties

Property Description
last_modified Last modified timestamp of the resource.
etag HTTP strong entity tag value.
x_ms_properties Properties of the filesystem.
x_ms_namespace_enabled Boolean string for namespace enablement.
x_ms_default_encryption_scope Default encryption scope.
x_ms_deny_encryption_scope_override Boolean string for deny encryption scope.
x_ms_request_id Request ID.
x_ms_version Version of the API.
date Date string of the request.

For properties applicable to all resources, such as type, name, id, and properties, refer to azure_generic_resource.

Also, refer to Azure documentation for other properties available.

Examples

Test that the Data Lake Storage Gen2 filesystem has namespace enabled

describe azure_data_lake_storage_gen2_filesystem(account_name: 'ACCOUNT_NAME', name: 'FILE_SYSTEM')  do
  its('x_ms_namespace_enabled') { should eq 'false' }
end

Matchers

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

exists

# If the Data Lake Storage Gen2 Filesystem is found, it exists
describe azure_data_lake_storage_gen2_filesystem(account_name: 'ACCOUNT_NAME', name: 'FILE_SYSTEM')  do
  it { should exist }
end

# Ff the Data Lake Storage Gen2 Filesystem is not found, it exists
describe azure_data_lake_storage_gen2_filesystem(account_name: 'ACCOUNT_NAME', name: 'FILE_SYSTEM')  do
  it { should_not exist }
end

Azure Permissions

Your Service Principal must be set up with a contributor role on the subscription and Storage Blob Data Contributor role on the ADLS Gen2 Storage Account you wish to test.