Skip to main content

azure_migrate_assessment_projects Resource

Use the azure_migrate_assessment_projects InSpec audit resource to test the properties related to all Azure Migrate assessment projects within a 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_migrate_assessment_projects resource block returns all Azure Migrate projects within a subscription.

describe azure_migrate_assessment_projects do
  #...
end

Parameters

This resource does not require any parameters.

Properties

ids
Path reference to the projects.

Field: id

names
Name of the projects.

Field: name

types
Type of the project.

Field: type

eTags
A list of eTags for all the assessments.

Field: eTag

locations
Azure locations in which the project is created.

Field: location

tags
A list of Tags provided by Azure Tagging service.

Field: tags

properties
A list of Properties for all the projects.

Field: properties

assessmentSolutionIds
Assessment solution ARM IDs tracked by Microsoft.Migrate/migrateProjects.

Field: assessmentSolutionId

createdTimestamps
Times when this project is created. Date-Time is represented in ISO-8601 format.

Field: createdTimestamp

customerStorageAccountArmIds
The ARM IDs of the storage account used for interactions when public access is disabled.

Field: customerStorageAccountArmId

customerWorkspaceIds
The ARM IDs of the service map workspace created by customer.

Field: customerWorkspaceId

customerWorkspaceLocations
Locations of the service map workspace created by customer.

Field: customerWorkspaceLocation

lastAssessmentTimestamps
Times when the last assessment is created.

Field: lastAssessmentTimestamp

numberOfAssessments
Number of assessments created in the project.

Field: numberOfAssessments

numberOfGroups
Number of groups created in all the projects.

Field: numberOfGroups

numberOfMachines
Number of machines in all the projects.

Field: numberOfMachines

privateEndpointConnections
The list of private endpoint connections to the projects.

Field: privateEndpointConnections

projectStatuses
Assessment project statuses.

Field: projectStatus

provisioningStates
Provisioning states of all the projects.

Field: provisioningState

publicNetworkAccesses
Public network access for all the projects.

Field: publicNetworkAccess

serviceEndpoints
Service endpoints of all the projects.

Field: serviceEndpoint

updatedTimestamps
Times when this project is last updated.

Field: updatedTimestamp

Note

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

Examples

Loop through migrate assessment projects by their names

azure_migrate_assessment_projects.names.each do |name|
  describe azure_migrate_assessment_project(resource_group: 'RESOURCE_GROUP', name: name) do
    it { should exist }
  end
end

Test to ensure that migrate assessment projects in West Europe location

describe azure_migrate_assessment_projects.where(location: 'westeurope') do
  it { should exist }
end

Matchers

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

This resource has the following special matchers.

exists

# Should not exist if no Migrate Assessment projects are present in the subscription.

describe azure_migrate_assessment_projects do
  it { should_not exist }
end

not_exists

# Should exist if the filter returns at least one Migrate Assessment project in the subscription.

describe azure_migrate_assessment_projects do
  it { should exist }
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