diff --git a/docs/resources/azure_migrate_project_solution.md b/docs/resources/azure_migrate_project_solution.md index 45e762b4a..50b4f1d35 100644 --- a/docs/resources/azure_migrate_project_solution.md +++ b/docs/resources/azure_migrate_project_solution.md @@ -5,60 +5,57 @@ platform: azure # azure_migrate_project_solution -Use the `azure_migrate_project_solution` InSpec audit resource to test properties related to an Azure Migrate Project Solution. +Use the `azure_migrate_project_solution` InSpec audit resource to test the properties related to an Azure Migrate Project Solution. -## Azure REST API version, endpoint and http client parameters +## 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, the latest version will be used. -For more information, refer to [`azure_generic_resource`](azure_generic_resource.md). +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`](azure_generic_resource.md). -Unless defined, `azure_cloud` global endpoint, and default values for the http client will be used. -For more information, refer to the resource pack [README](../../README.md). +Unless defined, `azure_cloud` global endpoint and default values for the HTTP client is used. For more information, refer to the resource pack [README](../../README.md). ## Availability ### Installation -This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). -For an example `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal). +This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). For an example, `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal). ## Syntax -`name` and `resource_group` is a required parameter. +`name` and `resource_group` are required parameters. ```ruby -describe azure_migrate_project_solution(resource_group: 'migrate_vms', project_name: 'zoneA_migrate_project', name: 'zoneA_machines_migrate_solution') do +describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: 'ZONEA_ASSESSMENT_NAME') do it { should exist } - its('name') { should cmp 'zoneA_machines_migrate_solution' } + its('name') { should cmp 'ZONEA_ASSESSMENT_NAME' } its('type') { should cmp 'Microsoft.Migrate/MigrateProjects/Solutions' } end ``` ```ruby -describe azure_migrate_project_solution(resource_group: 'migrate_vms', project_name: 'zoneA_migrate_project', name: 'zoneA_machines_migrate_solution') do +describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: 'ZONEA_ASSESSMENT_NAME') do it { should exist } end ``` + ## Parameters | Name | Description | |----------------|----------------------------------------------------------------------------------| -| name | Name of the Azure Migrate Project Solution to test. | -| resource_group | Azure resource group that the targeted resource resides in. `MyResourceGroup` | -| project_name | Azure Migrate Project. | +| name | Name of the Azure Migrate project solution to test. | +| resource_group | Azure resource group that the targeted resource resides in. | +| project_name | Azure Migrate project. | The parameter set should be provided for a valid query: -- `resource_group` and `project_name` and `name` + +- `resource_group`, `project_name`, and `name`. ## Properties | Property | Description | |-------------------------------|------------------------------------------------------------------| -| id | Path reference to the Project Solution. | -| name | Unique name of the Project Solution. | -| type | Type of the object. `Microsoft.Migrate/MigrateProjects/Solutions`| +| id | Path reference to the project solution. | +| name | Unique name of the project solution. | +| type | Object type. `Microsoft.Migrate/MigrateProjects/Solutions` | | eTag | For optimistic concurrency control. | | properties | Properties of the project Solution. | | properties.cleanupState | The cleanup state of the solution. | @@ -66,19 +63,17 @@ The parameter set should be provided for a valid query: | properties.summary | The summary of the solution. | | properties.purpose | The purpose of the solution. | +For properties applicable to all resources, such as `type`, `name`, `id`, and `properties`, refer to [`azure_generic_resource`](azure_generic_resource.md#properties). -For properties applicable to all resources, such as `type`, `name`, `id`, `properties`, refer to [`azure_generic_resource`](azure_generic_resource.md#properties). - -Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/migrate/projects/solutions/get-solution) for other properties available. -Any attribute in the response may be accessed with the key names separated by dots (`.`). +Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/migrate/projects/solutions/get-solution) for other properties available. Any attribute in the response is accessed with the key names separated by dots (`.`). ## Examples -### Test that the Migrate Project Solution is defined for Assessment purpose. +### Test that the migrate project solution is defined for assessment ```ruby -describe azure_migrate_project_solution(resource_group: 'migrate_vms', project_name: 'zoneA_migrate_project', name: 'zoneA_machines_migrate_solution') do - its('properties.purpose') { should eq 'Assessment' } +describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: 'ZONEA_ASSESSMENT_NAME') do + its('properties.purpose') { should eq 'ASSESSMENT' } end ``` @@ -89,17 +84,17 @@ This InSpec audit resource has the following special matchers. For a full list o ### exists ```ruby -# If a Migrate Project Solution is found it will exist -describe azure_migrate_project_solution(resource_group: 'migrate_vms', project_name: 'zoneA_migrate_project', name: 'zoneA_machines_migrate_solution') do +# If a Migrate Project Solution is found, it will exist +describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: 'ZONEA_ASSESSMENT_NAME') do it { should exist } end -# if Migrate Project Solution are not found it will not exist -describe azure_migrate_project_solution(resource_group: 'migrate_vms', project_name: 'zoneA_migrate_project', name: 'zoneA_machines_migrate_solution') do +# if Migrate Project Solution are not found, it will not exist +describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: 'ZONEA_ASSESSMENT_NAME') do it { should_not exist } end ``` ## Azure Permissions -Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be setup with a `contributor` role on the subscription you wish to test. \ No newline at end of file +Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `contributor` role on the subscription you wish to test. diff --git a/docs/resources/azure_migrate_project_solutions.md b/docs/resources/azure_migrate_project_solutions.md index f3828c5ac..044471a3b 100644 --- a/docs/resources/azure_migrate_project_solutions.md +++ b/docs/resources/azure_migrate_project_solutions.md @@ -5,54 +5,52 @@ platform: azure # azure_migrate_project_solutions -Use the `azure_migrate_project_solutions` InSpec audit resource to test properties related to all Azure Migrate Project Solutions within a project. +Use the `azure_migrate_project_solutions` InSpec audit resource to test the properties related to all Azure Migrate project solutions within a project. -## Azure REST API version, endpoint and http client parameters +## 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, the latest version will be used. -For more information, refer to [`azure_generic_resource`](azure_generic_resource.md). +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`](azure_generic_resource.md). -Unless defined, `azure_cloud` global endpoint, and default values for the http client will be used. -For more information, refer to the resource pack [README](../../README.md). +Unless defined, `azure_cloud` global endpoint and default values for the HTTP client is used. For more information, refer to the resource pack [README](../../README.md). ## Availability ### Installation -This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). -For an example `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal). +This resource is available in the [InSpec Azure resource pack](https://github.com/inspec/inspec-azure). For an example, `inspec.yml` file and how to set up your Azure credentials, refer to resource pack [README](../../README.md#Service-Principal). ## Syntax -An `azure_migrate_project_solutions` resource block returns all Azure Migrate Project Solutions within a project. +An `azure_migrate_project_solutions` resource block returns all Azure Migrate project solutions within a project. ```ruby -describe azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project') do +describe azure_migrate_project_solutions(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME') do #... end ``` ## Parameters + | Name | Description | |----------------|----------------------------------------------------------------------------------| -| resource_group | Azure resource group that the targeted resource resides in. `MyResourceGroup` | +| resource_group | Azure resource group that the targeted resource resides in. | | project_name | Azure Migrate Project. | The parameter set should be provided for a valid query: -- `resource_group` and `project_name` + +- `resource_group` and `project_name`. ## Properties |Property | Description | Filter Criteria* | |--------------------------------|------------------------------------------------------------------------|------------------| -| ids | Path reference to the Project Solutions. | `id` | -| names | Unique names for all Project Solutions. | `name` | +| ids | Path reference to the project solutions. | `id` | +| names | Unique names for all project solutions. | `name` | | types | Type of the objects. | `type` | | eTags | A list of eTags for all the Project Solutions. | `eTag` | | properties | A list of Properties for all the Project Solutions. | `properties` | -| tools | The tool being used in all the solutions. | `tool` | +| tools | The tool used in all the solutions. | `tool` | | purposes | The purpose of all the solutions. | `purpose` | | goals | The goals of all the solutions. | `goal` | | statuses | The current status of all the solutions. | `status` | @@ -67,25 +65,24 @@ The parameter set should be provided for a valid query: | assessmentCounts | The count of assessments reported by all the solutions. | `assessmentCount`| | extendedDetails | The extended details reported by all the solutions. | `extendedDetails`| +* For information on how to use filter criteria on plural resources refer to [FilterTable usage](https://github.com/inspec/inspec/blob/master/dev-docs/filtertable-usage.md). Also for further reference of the properties please refer [Azure Documentation](https://docs.microsoft.com/en-us/rest/api/migrate/projects/solutions/enumerate-solutions) - -* For information on how to use filter criteria on plural resources refer to [FilterTable usage](https://github.com/inspec/inspec/blob/master/dev-docs/filtertable-usage.md). -Also for further reference of the properties please refer [Azure Documentation](https://docs.microsoft.com/en-us/rest/api/migrate/projects/solutions/enumerate-solutions) ## Examples -### Loop through Migrate Project Solutions by their names. +### Loop through migrate project solutions by their names ```ruby -azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project').names.each do |name| - describe azure_migrate_project_solution(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project', name: name) do +azure_migrate_project_solutions(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME').names.each do |name| + describe azure_migrate_project_solution(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME', name: name) do it { should exist } end end ``` -### Test that there are Migrate Project Solutions for Assessment purpose. + +### Test to ensure the migrate project solutions for assessment ```ruby -describe azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project').where(purpose: 'Assessment') do +describe azure_migrate_project_solutions(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME').where(purpose: 'Assessment') do it { should exist } end ``` @@ -98,14 +95,15 @@ This InSpec audit resource has the following special matchers. For a full list o ```ruby # Should not exist if no Migrate Project Solutions are present in the project and in the resource group -describe azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project') do +describe azure_migrate_project_solutions(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME') do it { should_not exist } end # Should exist if the filter returns at least one Migrate Project Solutions in the project and in the resource group -describe azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project') do +describe azure_migrate_project_solutions(resource_group: 'RESOURCE_GROUP', project_name: 'PROJECT_NAME') do it { should exist } end ``` + ## Azure Permissions -Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be setup with a `contributor` role on the subscription you wish to test. \ No newline at end of file +Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with a `contributor` role on the subscription you wish to test.