diff --git a/docs/resources/azure_migrate_project_solution.md b/docs/resources/azure_migrate_project_solution.md index 45e762b4a..52d63066a 100644 --- a/docs/resources/azure_migrate_project_solution.md +++ b/docs/resources/azure_migrate_project_solution.md @@ -5,42 +5,38 @@ 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. ```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: 'MIGRATE_VMS', project_name: 'ZONEA_MIGRATE_PROJECT', name: 'zoneA_machines_migrate_solution') do it { should exist } - its('name') { should cmp 'zoneA_machines_migrate_solution' } + its('name') { should cmp 'ZONEA_MACHINES_MIGRATE_SOLUTION' } 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: 'MIGRATE_VMS', project_name: 'ZONEA_MIGRATE_PROJECT', name: 'zoneA_machines_migrate_solution') do it { should exist } end ``` + ## Parameters | Name | Description | @@ -50,6 +46,7 @@ end | project_name | Azure Migrate Project. | The parameter set should be provided for a valid query: + - `resource_group` and `project_name` and `name` ## Properties @@ -58,7 +55,7 @@ The parameter set should be provided for a valid query: |-------------------------------|------------------------------------------------------------------| | id | Path reference to the Project Solution. | | name | Unique name of the Project Solution. | -| type | Type of the object. `Microsoft.Migrate/MigrateProjects/Solutions`| +| 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 purpose ```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: 'MIGRATE_VMS', project_name: 'ZONEA_MIGRATE_PROJECT', name: 'ZONEA_MACHINES_MIGRATE_SOLUTION') 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: 'MIGRATE_VMS', project_name: 'ZONEA_MIGRATE_PROJECT', name: 'ZONEA_MACHINES_MIGRATE_SOLUTION') 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: 'MIGRATE_VMS', project_name: 'ZONEA_MIGRATE_PROJECT', name: 'zoneA_machines_migrate_solution') 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..2c1cdc358 100644 --- a/docs/resources/azure_migrate_project_solutions.md +++ b/docs/resources/azure_migrate_project_solutions.md @@ -5,31 +5,27 @@ 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. ```ruby -describe azure_migrate_project_solutions(resource_group: 'migrated_vms', project_name: 'zoneA_migrate_project') do +describe azure_migrate_project_solutions(resource_group: 'MIGRATED_VMS', project_name: 'ZONEA_MIGRATE_PROJECT') do #... end ``` @@ -41,6 +37,7 @@ end | project_name | Azure Migrate Project. | The parameter set should be provided for a valid query: + - `resource_group` and `project_name` ## Properties @@ -52,7 +49,7 @@ The parameter set should be provided for a valid query: | 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 +64,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: '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 it { should exist } end end ``` -### Test that there are Migrate Project Solutions for Assessment purpose. + +### Test to ensure the Migrate Project Solutions for Assessment purpose ```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: 'MIGRATED_VMS', project_name: 'ZONEA_MIGRATE_PROJECT').where(purpose: 'Assessment') do it { should exist } end ``` @@ -98,14 +94,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: 'MIGRATED_VMS', project_name: 'ZONEA_MIGRATE_PROJECT') 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: 'MIGRATED_VMS', project_name: 'ZONEA_MIGRATE_PROJECT') 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.