From 0933b37d0086b334e9c380d380b94e41de2a62cd Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Thu, 10 Mar 2022 12:40:56 -0500 Subject: [PATCH 1/4] Add docs readme and config files Signed-off-by: Ian Maddaus --- docs-chef-io/Makefile | 39 +++++ docs-chef-io/README.md | 165 ++++++++++++++++++ docs-chef-io/archetypes/resource.md | 40 +++++ .../azure_data_factory_linked_services.md | 2 +- ...ure_data_factory_pipeline_run_resources.md | 2 +- .../resources/azure_generic_resources.md | 3 +- .../azure_graph_generic_resources.md | 3 +- .../azure_migrate_assessment_groups.md | 2 +- .../resources/azure_power_bi_dataflows.md | 33 +++- .../resources/azure_sql_managed_instances.md | 2 +- ...ure_virtual_network_gateway_connections.md | 2 +- docs-chef-io/netlify.toml | 18 ++ docs-chef-io/netlify_production/index.html | 12 ++ .../release-notes/publish-release-notes.sh | 48 +++++ 14 files changed, 355 insertions(+), 16 deletions(-) create mode 100644 docs-chef-io/Makefile create mode 100644 docs-chef-io/README.md create mode 100644 docs-chef-io/netlify.toml create mode 100644 docs-chef-io/netlify_production/index.html create mode 100644 docs-chef-io/tools/release-notes/publish-release-notes.sh diff --git a/docs-chef-io/Makefile b/docs-chef-io/Makefile new file mode 100644 index 000000000..03acb0b63 --- /dev/null +++ b/docs-chef-io/Makefile @@ -0,0 +1,39 @@ +# we use pushd/popd here, and /bin/sh of our chefes/buildkite image is not bash +# so we have to override the default shell here +SHELL=bash + +preview_netlify: chef_web_docs + cp -R content/inspec/resources/* chef-web-docs/_vendor/github.com/inspec/inspec-aws/docs-chef-io/content/inspec/resources/ + cp -R config.toml chef-web-docs/_vendor/github.com/inspec/inspec-aws/docs-chef-io/ + pushd chef-web-docs && make assets; hugo --gc --minify --buildFuture && popd + + +replace = "replacements = \'github.com/inspec/inspec-azure/docs-chef-io -\> ../../\'\\n\\n" + +serve: chef_web_docs + @echo -e "$(replace)" > temp.txt + @cat chef-web-docs/config/_default/module.toml >> temp.txt + @cat temp.txt > chef-web-docs/config/_default/module.toml + rm temp.txt + pushd chef-web-docs && make assets; hugo server --buildDrafts --buildFuture --noHTTPCache && popd + +chef_web_docs: + if [ -d "chef-web-docs/" ]; then \ + pushd chef-web-docs && git reset HEAD --hard; git clean -fd; git pull --ff-only origin main; rm -rf public && popd; \ + else \ + git clone https://github.com/chef/chef-web-docs.git; \ + fi + +clean_all: + rm -rf chef-web-docs + +clean: + pushd chef-web-docs && make clean_all && popd + +lint: + hugo -D + + +publish_release_notes: + $(shell . tools/release-notes/publish-release-notes.sh) + diff --git a/docs-chef-io/README.md b/docs-chef-io/README.md new file mode 100644 index 000000000..ead5e3cae --- /dev/null +++ b/docs-chef-io/README.md @@ -0,0 +1,165 @@ +# Chef InSpec Azure Resource Documentation + +This is the home of the InSpec Azure resource documentation found on +. + +We use [Hugo](https://gohugo.io/) to incorporate documentation from this repository into `chef/chef-web-docs` and deploy it on . + +## Documentation Content + +### Resource Pages + +All resource pages are located in `docs-chef-io/content/inspec/resources/`. + +Create a new page by duplicating an old page and then update the new page with content relevant to the new resource. + +You can also run `hugo new -k resource inspec/resources/RESOURCE_NAME.md` to generate a new resource page from scratch. + +See our [style guide](https://docs.chef.io/style_index/) for suggestions on writing documentation. + +#### Front Matter + +At the top of each resource is a block of front matter, which Hugo uses to add a title to each page and locate each page in the left navigation menu in . Below is an example of a page's front matter: + +```toml ++++ +title = "RESOURCE NAME resource" +platform = "azure" +gh_repo = "inspec-azure" + +[menu.inspec] +title = "RESOURCE NAME" +identifier = "inspec/resources/azure/RESOURCE NAME" +parent = "inspec/resources/azure" ++++ +``` + +`title` is the page title. + +`platform = azure` sorts each page into the correct category in the [Chef InSpec resources list page](https://docs.chef.io/inspec/resources/). + +`gh_repo = "inspec-azure"` adds an "[edit on GitHub]" link to the top of each page that links to the Markdown page in the inspec/inspec-azure repository. + +`[menu.inspec]` places the page in the Chef InSpec section of the left navigation menu in . All the parameters following this configure the link in the left navigation menu to the page. + +`title` is the title of page in the Chef InSpec menu. + +`identifier` is the identifier for a page in the menu. It should formatted like this: `inspec/resources/azure/resource name`. + +`parent = "inspec/resources/azure"` is the identifier for the section of the menu that the page will be found in. This value is set in the [chef-web-docs menu config](https://github.com/chef/chef-web-docs/blob/main/config/_default/menu.toml). + +### Shortcodes + +A shortcode is a file with a block of text that can be added in multiple places in our documentation by referencing the shortcode file name. + +This documentation set has three shortcodes located in the `docs-chef-io/layouts/shortcodes` directory: + +- azure_permissions_service_principal.md +- inspec_azure_common_parameters.md +- inspec_azure_install.md +- inspec_filter_table.md + +Add a shortcode to a resource page by wrapping the filename, without the `.md` file suffix, in double curly braces and percent symbols. For example: `{{% inspec_filter_table %}}`. + +The `azure_permissions_service_principal.md` shortcode requires a `role` parameter, which is the role that the service principal must have for the subscription that will be tested. For example, the azure_redis_cache Resource page has: + +```md +{{% azure_permissions_service_principal role="contributor" %}} +``` + +which will render the following text: + +> Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with at least a `contributor` role on the subscription you wish to test. + +### Release Dates + +The chef/chef-web-docs repository uses the `release-dates.json` file in `docs-chef-io/assets/release-notes/inspec-azure` to generate release notes on . See below for more information on release notes for inspec-azure. + +## Update the InSpec Repository Module In `chef/chef-web-docs` + +We use [Hugo modules](https://gohugo.io/hugo-modules/) to build Chef's documentation +from multiple repositories. + +When release notes are announced for inspec-azure, the documentation for inspec-azure is updated at the same time. See the section below on release notes. + +A member of the Docs Team can also update the inspec-azure resource documentation at any time when new resources are ready to be added to . + +## Local Development Environment + +We use [Hugo](https://gohugo.io/), [Go](https://golang.org/), and[NPM](https://www.npmjs.com/) +to build the Chef Documentation website. You will need Hugo 0.93.1 or higher +installed and running to build and view our documentation. + +To install Hugo, NPM, and Go on Windows and macOS: + +- On macOS run: `brew install hugo node go` +- On Windows run: `choco install hugo nodejs golang -y` + +To install Hugo on Linux, run: + +- `apt install -y build-essential` +- `snap install node --classic --channel=12` +- `snap install hugo --channel=extended` + +## Preview InSpec Azure Resource Documentation + +### make serve + +Run `make serve` to build a local preview of the InSpec Azure resource documentation. +This will clone a copy of `chef/chef-web-docs` into the `docs-chef-io` directory. +That copy will be configured to build the InSpec Azure resource documentation from the `docs-chef-io` directory +and live reload if any changes are made while the Hugo server is running. + +- Run `make serve` +- go to + +### Clean Your Local Environment + +Run `make clean_all` to delete the cloned copy of chef/chef-web-docs. + +## Publish Release Notes + +The process for publishing and announcing release notes for inspec-azure is mostly manual. + +### Edit Pending Release Notes + +Edit the Pending Release Notes file in the [inspec-azure wiki](https://github.com/inspec/inspec-azure/wiki/Pending-Release-Notes). + +We recommend editing this page as new resources are added or changes are made to the inspec-azure resources. + +Have a member of the documentation team review the Pending Release Notes file before they're released. + +### Release the Release Notes + +1. Log in to the chef-cd S3 account using saml2aws. + +2. Run the `publish-release-notes.sh` script in `tools/release-notes`. You can run this from the Makefile with `make publish_release_notes` + + This will push the pending release notes to the S3 chef-cd bucket, reset the Pending Release Notes file, and update the `release-dates.json` file in `assets/release-notes/inspec-azure`. + +3. Push up and merge a branch to `inspec/inspec-azure` with the changes made to the `release-dates.json` file. + +### chef-web-docs + +chef-web-docs is configured to open a PR that will update the inspec-azure content on when a change is committed to the `release-dates.json` file in the inspec-azure repository. This will update the InSpec Azure resource documentation and update release notes for InSpec Azure resources. + +A member fo the documentation team can merge that PR for you as soon as it's made. + +### Chef Discourse + +Copy the release notes to a new announcement in [Chef Release Announcements](https://discourse.chef.io/c/chef-release/9) on Discourse. + +You can find the proper release notes in the Pending Release Notes file history or on + +## Documentation Feedback + +If you need support, contact [Chef Support](https://www.chef.io/support/). + +**GitHub issues** + +Submit an issue to the [inspec-azure repo](https://github.com/inspec/inspec-azure/issues) +for "important" documentation bugs that may need visibility among a larger group, +especially in situations where a documentation bug may also surface a product bug. + +Submit an issue to [chef-web-docs](https://github.com/chef/chef-web-docs/issues) for +documentation feature requests and minor documentation issues. diff --git a/docs-chef-io/archetypes/resource.md b/docs-chef-io/archetypes/resource.md index 3b95d64b0..1f3a784bd 100644 --- a/docs-chef-io/archetypes/resource.md +++ b/docs-chef-io/archetypes/resource.md @@ -14,14 +14,54 @@ platform = "azure" {{% Run `hugo new -k resource resources/RESOURCE_NAME.md` to generate a new resource page. %}} +## Azure REST API Version, Endpoint, and HTTP Client Parameters + +{{% inspec_azure_common_parameters %}} + +## Installation + +{{% inspec_azure_install %}} + ## Syntax +```ruby + +``` + ## Parameters +`PARAMETER` +: PARAMETER DESCRIPTION + +`PARAMETER` +: PARAMETER DESCRIPTION + ## Properties +`PROPERTY` +: PROPERTY DESCRIPTION + +`PROPERTY` +: PROPERTY DESCRIPTION + ## Examples +**EXAMPLE DESCRIPTION** + +```ruby + +``` + +**EXAMPLE DESCRIPTION** + +```ruby + +``` + ## Matchers For a full list of available matchers, please visit our [Universal Matchers page](https://docs.chef.io/inspec/matchers/). + +## Azure Permissions + +{{% azure_permissions_service_principal role="ROLE" %}} diff --git a/docs-chef-io/content/inspec/resources/azure_data_factory_linked_services.md b/docs-chef-io/content/inspec/resources/azure_data_factory_linked_services.md index d75251099..cdb09c478 100644 --- a/docs-chef-io/content/inspec/resources/azure_data_factory_linked_services.md +++ b/docs-chef-io/content/inspec/resources/azure_data_factory_linked_services.md @@ -72,7 +72,7 @@ end : **Field**: `type_properties` -* 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). +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/content/inspec/resources/azure_data_factory_pipeline_run_resources.md b/docs-chef-io/content/inspec/resources/azure_data_factory_pipeline_run_resources.md index 5e7948244..46eec65e0 100644 --- a/docs-chef-io/content/inspec/resources/azure_data_factory_pipeline_run_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_data_factory_pipeline_run_resources.md @@ -75,7 +75,7 @@ end : **Field**: `runEnd` -* 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). +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/content/inspec/resources/azure_generic_resources.md b/docs-chef-io/content/inspec/resources/azure_generic_resources.md index f284d8d81..2a16987df 100644 --- a/docs-chef-io/content/inspec/resources/azure_generic_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_generic_resources.md @@ -204,7 +204,8 @@ describe azure_generic_resources(add_subscription_id: true, resource_uri: "provi it { should exist } end ``` -Please see [here](https://github.com/inspec/inspec/blob/master/docs/dev/filtertable-usage.md) for more information on how to leverage FilterTable capabilities on plural resources. + +{{% inspec_filter_table %}} For more examples, please see the [integration tests](/test/integration/verify/controls/azure_generic_resources.rb). diff --git a/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md b/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md index 5850100c0..2019e6ca7 100644 --- a/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md @@ -104,7 +104,8 @@ end it { should exist } end ``` -*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). Please note that instead of client side filtering with `where`, it is much more efficient to use server side filtering at Azure Graph API with `filter` or `filter_free_text` at resource creation as described in previous examples. + +{{% inspec_filter_table %}} **Test `given_names` Parameter.** diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md index 25167bf3b..dca867732 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md @@ -103,7 +103,7 @@ The parameter set should be provided for a valid query: : **Field**: `updatedTimestamp` -* 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, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/migrate/assessment/groups/list-by-project) for the complete list of properties available. +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md b/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md index b5f1d1fbe..723318c95 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md @@ -35,19 +35,34 @@ end `group_id` : The Workspace ID. - ## Properties -|Property | Description | Filter Criteria* | -|---------------------------|------------------------------------------------------------------------|------------------| -| objectIds | List of all Power BI dataflow IDs. | `objectId` | -| names | List of all the Power BI dataflow names. | `name` | -| descriptions | List of all the Power BI dataflow descriptions. | `description` | -| modelUrls | List of all URLs to the dataflow definition file | `modelUrl` | | `modelUrl` | +`objectIds` + +: List of all Power BI dataflow IDs. + +: **Field**: `objectId` + +`names` + +: List of all the Power BI dataflow names. + +: **Field**: `name` + +`descriptions` + +: List of all the Power BI dataflow descriptions. + +: **Field**: `descriptio + +`modelUrls` + +: List of all URLs to the dataflow definition file + +: **Field**: `modelUrl` -* 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, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows/get-dataflows) for other properties available. +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md b/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md index 7f0a0ffd6..648b29f9e 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md @@ -83,7 +83,7 @@ end : **Field**: `sku_tier` -* 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). +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md index 4beb8af90..2bf8e47a3 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md @@ -96,7 +96,7 @@ The parameter set should be provided for a valid query: : **Field**: `ipsecPolicies` -* 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, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/network-gateway/virtual-network-gateway-connections/list) for other properties available. +{{% inspec_filter_table %}} ## Examples diff --git a/docs-chef-io/netlify.toml b/docs-chef-io/netlify.toml new file mode 100644 index 000000000..0c96e1c4c --- /dev/null +++ b/docs-chef-io/netlify.toml @@ -0,0 +1,18 @@ +[build] + +[build.environment] + HUGO_VERSION = "0.93.1" + HUGO_ENABLEGITINFO = "true" + GO_VERSION = "1.15" + NODE_ENV = "development" + +[build.processing] + skip_processing = true + +[context.deploy-preview] + publish = "chef-web-docs/public" + command = "make preview_netlify" + +[context.production] + publish = "netlify_production" + command = "" diff --git a/docs-chef-io/netlify_production/index.html b/docs-chef-io/netlify_production/index.html new file mode 100644 index 000000000..d646470a6 --- /dev/null +++ b/docs-chef-io/netlify_production/index.html @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/docs-chef-io/tools/release-notes/publish-release-notes.sh b/docs-chef-io/tools/release-notes/publish-release-notes.sh new file mode 100644 index 000000000..b044059c2 --- /dev/null +++ b/docs-chef-io/tools/release-notes/publish-release-notes.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -eou pipefail + +PRODUCT=inspec-aws +CURRENTDATE=$(date +"%Y-%m-%d") +DOCS_ASSETS_DIR="assets/release-notes/inspec-aws" + + +git clone "https://github.com/inspec/inspec-aws.wiki.git" + +# Append the date to the array of dates in assets/release-notes/inspec-aws/release-dates.json +DATES_FILE="${DOCS_ASSETS_DIR}/release-dates.json" +DATES=$( cat "$DATES_FILE" | jq --arg DATE "$CURRENTDATE" '. |= .+ [$DATE]' ) +echo $DATES | jq . > "$DATES_FILE" + +pushd ./inspec-aws.wiki + # Publish release notes to S3 + aws s3 cp Pending-Release-Notes.md "s3://chef-automate-artifacts/release-notes/${PRODUCT}/${CURRENTDATE}.md" --acl public-read --content-type "text/plain" --profile chef-cd + + # Reset "Release Notes" wiki page + cat >./Pending-Release-Notes.md < Date: Thu, 10 Mar 2022 12:44:45 -0500 Subject: [PATCH 2/4] Update expeditor things Signed-off-by: Ian Maddaus --- .expeditor/announce-release.sh | 28 --------- .expeditor/config.yml | 9 --- .expeditor/publish-release-notes.sh | 57 ------------------- docs-chef-io/Makefile | 4 +- .../release-notes/publish-release-notes.sh | 16 +++--- 5 files changed, 10 insertions(+), 104 deletions(-) delete mode 100644 .expeditor/announce-release.sh delete mode 100644 .expeditor/publish-release-notes.sh diff --git a/.expeditor/announce-release.sh b/.expeditor/announce-release.sh deleted file mode 100644 index 93b98e35b..000000000 --- a/.expeditor/announce-release.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -exou pipefail - -PRODUCT=inspec-azure -CURRENTDATE=$(date +"%Y-%m-%d") - - -# Download the release-notes for our specific build -curl -o release-notes.md "https://packages.chef.io/release-notes/${PRODUCT}/${CURRENTDATE}.md" - -topic_title="Chef InSpec Azure Cloud Resources $CURRENTDATE Released!" -topic_body=$(cat < "$DATES_FILE" - -pushd ./inspec-azure.wiki - # Publish release notes to S3 - aws s3 cp Pending-Release-Notes.md "s3://chef-automate-artifacts/release-notes/${PRODUCT}/${CURRENTDATE}.md" --acl public-read --content-type "text/plain" --profile chef-cd - - # Reset "Release Notes" wiki page - cat >./Pending-Release-Notes.md < "$DATES_FILE" -pushd ./inspec-aws.wiki +pushd ./inspec-azure.wiki # Publish release notes to S3 aws s3 cp Pending-Release-Notes.md "s3://chef-automate-artifacts/release-notes/${PRODUCT}/${CURRENTDATE}.md" --acl public-read --content-type "text/plain" --profile chef-cd # Reset "Release Notes" wiki page cat >./Pending-Release-Notes.md < Date: Thu, 10 Mar 2022 14:53:58 -0500 Subject: [PATCH 3/4] Additional docs cleanup Signed-off-by: Ian Maddaus --- docs-chef-io/README.md | 5 +- docs-chef-io/archetypes/resource.md | 8 +- .../azure_active_directory_domain_service.md | 2 +- .../azure_active_directory_domain_services.md | 2 +- .../azure_active_directory_object.md | 2 +- .../azure_active_directory_objects.md | 2 +- .../inspec/resources/azure_aks_cluster.md | 3 + .../inspec/resources/azure_aks_clusters.md | 6 +- .../inspec/resources/azure_api_managements.md | 3 +- .../resources/azure_application_gateways.md | 3 +- .../resources/azure_bastion_hosts_resource.md | 1 + .../azure_bastion_hosts_resources.md | 2 +- .../resources/azure_container_groups.md | 2 +- .../resources/azure_container_registries.md | 2 +- .../inspec/resources/azure_data_factories.md | 1 + ...zure_data_lake_storage_gen2_filesystems.md | 2 +- .../azure_data_lake_storage_gen2_paths.md | 2 +- .../resources/azure_db_migration_service.md | 1 + .../resources/azure_db_migration_services.md | 2 +- .../azure_ddos_protection_resources.md | 2 +- .../resources/azure_dns_zones_resources.md | 2 +- .../resources/azure_express_route_circuits.md | 2 +- .../azure_express_route_providers.md | 2 +- .../resources/azure_generic_resource.md | 7 +- .../resources/azure_generic_resources.md | 6 +- .../resources/azure_graph_generic_resource.md | 2 +- .../azure_graph_generic_resources.md | 2 +- .../inspec/resources/azure_graph_user.md | 3 +- .../inspec/resources/azure_graph_users.md | 3 +- .../resources/azure_hdinsight_cluster.md | 1 + .../inspec/resources/azure_key_vault.md | 2 + .../inspec/resources/azure_key_vault_key.md | 1 + .../inspec/resources/azure_key_vault_keys.md | 3 +- .../resources/azure_key_vault_secret.md | 1 + .../resources/azure_key_vault_secrets.md | 3 +- .../inspec/resources/azure_key_vaults.md | 2 +- .../inspec/resources/azure_load_balancers.md | 4 +- .../content/inspec/resources/azure_lock.md | 3 +- .../content/inspec/resources/azure_locks.md | 4 +- .../resources/azure_management_groups.md | 2 +- .../inspec/resources/azure_mariadb_server.md | 1 + .../inspec/resources/azure_mariadb_servers.md | 4 +- .../azure_migrate_assessment_groups.md | 2 +- .../azure_migrate_assessment_machines.md | 2 +- .../azure_migrate_assessment_projects.md | 2 +- .../resources/azure_migrate_assessments.md | 2 +- ...zure_migrate_project_database_instances.md | 2 +- .../azure_migrate_project_databases.md | 2 +- .../resources/azure_migrate_project_events.md | 2 +- .../azure_migrate_project_machines.md | 2 +- .../azure_migrate_project_solutions.md | 2 +- .../azure_monitor_activity_log_alert.md | 1 + .../azure_monitor_activity_log_alerts.md | 2 +- .../resources/azure_monitor_log_profile.md | 3 +- .../resources/azure_monitor_log_profiles.md | 3 +- .../inspec/resources/azure_mysql_databases.md | 3 +- .../inspec/resources/azure_mysql_server.md | 1 + .../inspec/resources/azure_mysql_servers.md | 4 +- .../resources/azure_network_interface.md | 1 + .../resources/azure_network_interfaces.md | 3 +- .../resources/azure_network_security_group.md | 7 +- .../azure_network_security_groups.md | 2 +- .../inspec/resources/azure_network_watcher.md | 2 + .../resources/azure_network_watchers.md | 2 +- .../resources/azure_policy_definition.md | 3 +- .../resources/azure_policy_definitions.md | 4 +- .../resources/azure_policy_exemptions.md | 2 +- .../azure_policy_insights_query_result.md | 2 +- .../azure_policy_insights_query_results.md | 2 +- .../resources/azure_postgresql_databases.md | 3 +- .../resources/azure_postgresql_server.md | 3 +- .../resources/azure_postgresql_servers.md | 4 +- .../azure_power_bi_app_dashboard_tiles.md | 2 +- .../inspec/resources/azure_power_bi_apps.md | 2 +- .../resources/azure_power_bi_capacities.md | 2 +- .../azure_power_bi_capacity_refreshables.md | 2 +- .../azure_power_bi_dashboard_tiles.md | 2 +- .../resources/azure_power_bi_dashboards.md | 2 +- .../resources/azure_power_bi_dataflows.md | 2 +- .../resources/azure_power_bi_datasets.md | 2 +- .../resources/azure_power_bi_gateways.md | 2 +- .../inspec/resources/azure_redis_caches.md | 2 +- .../inspec/resources/azure_resource_group.md | 3 +- .../inspec/resources/azure_resource_groups.md | 2 +- ...e_resource_health_availability_statuses.md | 2 +- .../azure_resource_health_emerging_issues.md | 2 +- .../resources/azure_resource_health_events.md | 2 +- .../inspec/resources/azure_role_definition.md | 2 +- .../resources/azure_role_definitions.md | 4 +- .../azure_security_center_policies.md | 4 +- .../resources/azure_security_center_policy.md | 3 +- .../inspec/resources/azure_sql_database.md | 3 +- .../inspec/resources/azure_sql_databases.md | 4 +- .../resources/azure_sql_managed_instances.md | 2 +- .../inspec/resources/azure_sql_server.md | 4 +- .../inspec/resources/azure_sql_servers.md | 4 +- ...al_machine_group_availability_listeners.md | 2 +- .../azure_sql_virtual_machine_groups.md | 2 +- .../resources/azure_sql_virtual_machines.md | 2 +- .../inspec/resources/azure_storage_account.md | 6 + .../azure_storage_account_blob_container.md | 2 + .../resources/azure_storage_accounts.md | 2 +- .../azure_streaming_analytics_function.md | 2 +- .../azure_streaming_analytics_functions.md | 2 +- .../content/inspec/resources/azure_subnet.md | 235 ++---------------- .../content/inspec/resources/azure_subnets.md | 3 +- .../inspec/resources/azure_subscription.md | 4 +- .../inspec/resources/azure_subscriptions.md | 2 +- .../resources/azure_synapse_notebooks.md | 2 +- .../inspec/resources/azure_virtual_machine.md | 1 + .../resources/azure_virtual_machine_disk.md | 3 +- .../resources/azure_virtual_machine_disks.md | 2 +- .../resources/azure_virtual_machines.md | 3 +- .../inspec/resources/azure_virtual_network.md | 4 +- ...ure_virtual_network_gateway_connections.md | 2 +- .../azure_virtual_network_gateways.md | 2 +- .../azure_virtual_network_peering.md | 2 +- .../azure_virtual_network_peerings.md | 3 +- .../resources/azure_virtual_networks.md | 4 +- .../inspec/resources/azure_virtual_wans.md | 2 +- .../resources/azure_web_app_function.md | 1 + .../resources/azure_web_app_functions.md | 2 +- .../content/inspec/resources/azure_webapp.md | 2 +- .../content/inspec/resources/azure_webapps.md | 2 +- .../layouts/shortcodes/inspec_filter_table.md | 8 - 125 files changed, 220 insertions(+), 338 deletions(-) delete mode 100644 docs-chef-io/layouts/shortcodes/inspec_filter_table.md diff --git a/docs-chef-io/README.md b/docs-chef-io/README.md index ead5e3cae..255c90b88 100644 --- a/docs-chef-io/README.md +++ b/docs-chef-io/README.md @@ -57,9 +57,8 @@ This documentation set has three shortcodes located in the `docs-chef-io/layouts - azure_permissions_service_principal.md - inspec_azure_common_parameters.md - inspec_azure_install.md -- inspec_filter_table.md -Add a shortcode to a resource page by wrapping the filename, without the `.md` file suffix, in double curly braces and percent symbols. For example: `{{% inspec_filter_table %}}`. +Add a shortcode to a resource page by wrapping the filename, without the `.md` file suffix, in double curly braces and percent symbols. For example: `{{% inspec_azure_install %}}`. The `azure_permissions_service_principal.md` shortcode requires a `role` parameter, which is the role that the service principal must have for the subscription that will be tested. For example, the azure_redis_cache Resource page has: @@ -71,6 +70,8 @@ which will render the following text: > Your [Service Principal](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal) must be set up with at least a `contributor` role on the subscription you wish to test. +**Note:** You can add shortcodes from other repositories. For example, the `inspec_filter_table.md` and the `inspec_matchers_link.md` shortcodes are both located in the chef/chef-web-docs repository, but they can be added to this documentation set using the same method described above. + ### Release Dates The chef/chef-web-docs repository uses the `release-dates.json` file in `docs-chef-io/assets/release-notes/inspec-azure` to generate release notes on . See below for more information on release notes for inspec-azure. diff --git a/docs-chef-io/archetypes/resource.md b/docs-chef-io/archetypes/resource.md index 1f3a784bd..98ecd8fde 100644 --- a/docs-chef-io/archetypes/resource.md +++ b/docs-chef-io/archetypes/resource.md @@ -14,6 +14,8 @@ platform = "azure" {{% Run `hugo new -k resource resources/RESOURCE_NAME.md` to generate a new resource page. %}} +Use the `{{ .Name | humanize | title }}` Chef InSpec audit resource to test properties of... + ## Azure REST API Version, Endpoint, and HTTP Client Parameters {{% inspec_azure_common_parameters %}} @@ -30,10 +32,10 @@ platform = "azure" ## Parameters -`PARAMETER` +`PARAMETER` _(required)_ : PARAMETER DESCRIPTION -`PARAMETER` +`PARAMETER` _(optional)_ : PARAMETER DESCRIPTION ## Properties @@ -60,7 +62,7 @@ platform = "azure" ## Matchers -For a full list of available matchers, please visit our [Universal Matchers page](https://docs.chef.io/inspec/matchers/). +{{% inspec_matchers_link %}} ## Azure Permissions diff --git a/docs-chef-io/content/inspec/resources/azure_active_directory_domain_service.md b/docs-chef-io/content/inspec/resources/azure_active_directory_domain_service.md index 67cd2a171..c7100123a 100644 --- a/docs-chef-io/content/inspec/resources/azure_active_directory_domain_service.md +++ b/docs-chef-io/content/inspec/resources/azure_active_directory_domain_service.md @@ -95,7 +95,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_active_directory_domain_services.md b/docs-chef-io/content/inspec/resources/azure_active_directory_domain_services.md index 7c3e3cc29..9e209f1f5 100644 --- a/docs-chef-io/content/inspec/resources/azure_active_directory_domain_services.md +++ b/docs-chef-io/content/inspec/resources/azure_active_directory_domain_services.md @@ -140,7 +140,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_active_directory_object.md b/docs-chef-io/content/inspec/resources/azure_active_directory_object.md index 139df9ceb..d1fdc58be 100644 --- a/docs-chef-io/content/inspec/resources/azure_active_directory_object.md +++ b/docs-chef-io/content/inspec/resources/azure_active_directory_object.md @@ -155,7 +155,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_active_directory_objects.md b/docs-chef-io/content/inspec/resources/azure_active_directory_objects.md index 303c19de0..69859cbfa 100644 --- a/docs-chef-io/content/inspec/resources/azure_active_directory_objects.md +++ b/docs-chef-io/content/inspec/resources/azure_active_directory_objects.md @@ -58,7 +58,7 @@ This resource does not require any parameters. ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_aks_cluster.md b/docs-chef-io/content/inspec/resources/azure_aks_cluster.md index 2bd521324..346d87f6a 100644 --- a/docs-chef-io/content/inspec/resources/azure_aks_cluster.md +++ b/docs-chef-io/content/inspec/resources/azure_aks_cluster.md @@ -90,6 +90,7 @@ azure_aks_clusters.ids.each do |resource_id| end end ``` + **Test that a Specified AKS Cluster has the Correct Number of Nodes in Pool.** ```ruby @@ -97,6 +98,7 @@ describe azure_aks_cluster(resource_group: 'example', name: 'ClusterName') do its('properties.agentPoolProfiles.first.count') { should cmp 5 } end ``` + **Test that a Specified AKS Cluster has kube-audit logging enabled.** ```ruby @@ -104,6 +106,7 @@ describe azure_aks_cluster(resource_group: 'example', name: 'ClusterName') do its('enabled_logging_types') { should include "kube-audit" } end ``` + **Test that a Specified AKS Cluster has logging enabled on it and no forms of logging disabled.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_aks_clusters.md b/docs-chef-io/content/inspec/resources/azure_aks_clusters.md index ef64ec982..18e7f5f00 100644 --- a/docs-chef-io/content/inspec/resources/azure_aks_clusters.md +++ b/docs-chef-io/content/inspec/resources/azure_aks_clusters.md @@ -23,12 +23,15 @@ Use the `azure_aks_clusters` InSpec audit resource to test properties and config ## Syntax An `azure_aks_clusters` resource block returns all AKS Clusters, either within a Resource Group (if provided), or within an entire Subscription. + ```ruby describe azure_aks_clusters do #... end ``` + or + ```ruby describe azure_aks_clusters(resource_group: 'my-rg') do #... @@ -82,11 +85,12 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists The control will pass if the filter returns at least one result. Use `should_not` if you expect zero matches. + ```ruby # If we expect 'ExampleGroup' Resource Group to have AKS Clusters describe azure_aks_clusters(resource_group: 'ExampleGroup') do diff --git a/docs-chef-io/content/inspec/resources/azure_api_managements.md b/docs-chef-io/content/inspec/resources/azure_api_managements.md index 1bbf6f461..49702deff 100644 --- a/docs-chef-io/content/inspec/resources/azure_api_managements.md +++ b/docs-chef-io/content/inspec/resources/azure_api_managements.md @@ -85,6 +85,7 @@ describe azure_api_managements do its('names') { should include 'my-apim' } end ``` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -95,7 +96,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_application_gateways.md b/docs-chef-io/content/inspec/resources/azure_application_gateways.md index 6798ab8ed..b09a9ee3d 100644 --- a/docs-chef-io/content/inspec/resources/azure_application_gateways.md +++ b/docs-chef-io/content/inspec/resources/azure_application_gateways.md @@ -85,6 +85,7 @@ describe azure_application_gateways do its('names') { should include 'my-appgw' } end ``` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -95,7 +96,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resource.md b/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resource.md index ba2e29efa..ddf216dbd 100644 --- a/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resource.md +++ b/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resource.md @@ -67,6 +67,7 @@ describe azure_bastion_hosts_resource(resource_group: 'MyResourceGroup', name: ' its('type') { should eq 'Microsoft.Network/bastionHosts' } end ``` + **Ensure that the bastion hosts resource is in successful state.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resources.md b/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resources.md index f8a7ae952..be0e870d8 100644 --- a/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_bastion_hosts_resources.md @@ -106,7 +106,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_container_groups.md b/docs-chef-io/content/inspec/resources/azure_container_groups.md index 13a4150ca..4d442c859 100644 --- a/docs-chef-io/content/inspec/resources/azure_container_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_container_groups.md @@ -135,7 +135,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_container_registries.md b/docs-chef-io/content/inspec/resources/azure_container_registries.md index 32de2ade0..4e112e786 100644 --- a/docs-chef-io/content/inspec/resources/azure_container_registries.md +++ b/docs-chef-io/content/inspec/resources/azure_container_registries.md @@ -99,7 +99,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_data_factories.md b/docs-chef-io/content/inspec/resources/azure_data_factories.md index cf7e9182e..b4b0625df 100644 --- a/docs-chef-io/content/inspec/resources/azure_data_factories.md +++ b/docs-chef-io/content/inspec/resources/azure_data_factories.md @@ -117,6 +117,7 @@ describe azure_data_factories(resource_group: 'RESOURCE_GROUP') do its('names') { should include "factory_name" } end ``` + **Test that there aren't any Data Factories in a resource group.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_filesystems.md b/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_filesystems.md index 6f8158f99..421ab05c8 100644 --- a/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_filesystems.md +++ b/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_filesystems.md @@ -92,7 +92,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_paths.md b/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_paths.md index 1c0815ba1..3ffd47b20 100644 --- a/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_paths.md +++ b/docs-chef-io/content/inspec/resources/azure_data_lake_storage_gen2_paths.md @@ -89,7 +89,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_db_migration_service.md b/docs-chef-io/content/inspec/resources/azure_db_migration_service.md index 9d7cb8929..d69f54ea1 100644 --- a/docs-chef-io/content/inspec/resources/azure_db_migration_service.md +++ b/docs-chef-io/content/inspec/resources/azure_db_migration_service.md @@ -105,6 +105,7 @@ describe azure_db_migration_service(resource_group: 'MyResourceGroup', service_n its('properties.provisioningState') { should eq 'Succeeded' } end ``` + **Test <>.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_db_migration_services.md b/docs-chef-io/content/inspec/resources/azure_db_migration_services.md index 100b45366..987683000 100644 --- a/docs-chef-io/content/inspec/resources/azure_db_migration_services.md +++ b/docs-chef-io/content/inspec/resources/azure_db_migration_services.md @@ -135,7 +135,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_ddos_protection_resources.md b/docs-chef-io/content/inspec/resources/azure_ddos_protection_resources.md index f11788c1f..e4690cb13 100644 --- a/docs-chef-io/content/inspec/resources/azure_ddos_protection_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_ddos_protection_resources.md @@ -101,7 +101,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_dns_zones_resources.md b/docs-chef-io/content/inspec/resources/azure_dns_zones_resources.md index 8742850e4..5e536cc15 100644 --- a/docs-chef-io/content/inspec/resources/azure_dns_zones_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_dns_zones_resources.md @@ -114,7 +114,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_express_route_circuits.md b/docs-chef-io/content/inspec/resources/azure_express_route_circuits.md index 4d6e83396..3435076f1 100644 --- a/docs-chef-io/content/inspec/resources/azure_express_route_circuits.md +++ b/docs-chef-io/content/inspec/resources/azure_express_route_circuits.md @@ -155,7 +155,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_express_route_providers.md b/docs-chef-io/content/inspec/resources/azure_express_route_providers.md index 0c4697793..8023dcee6 100644 --- a/docs-chef-io/content/inspec/resources/azure_express_route_providers.md +++ b/docs-chef-io/content/inspec/resources/azure_express_route_providers.md @@ -102,7 +102,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_generic_resource.md b/docs-chef-io/content/inspec/resources/azure_generic_resource.md index edc552b21..c15c09862 100644 --- a/docs-chef-io/content/inspec/resources/azure_generic_resource.md +++ b/docs-chef-io/content/inspec/resources/azure_generic_resource.md @@ -120,6 +120,7 @@ describe azure_generic_resource(resource_group: 'my_vms', name: 'my_linux_vm') d its('api_version_used_for_query_state') { should eq 'latest' } end ``` + **Test the API Version Used for the Query.** ```ruby @@ -128,6 +129,7 @@ describe azure_generic_resource(resource_id: '/subscriptions/{subscriptionId}/re its('api_version_used_for_query') { should eq '2017-01-01' } end ``` + **Test the Tags if Include Specific Values.** ```ruby @@ -139,6 +141,7 @@ describe azure_generic_resource(resource_group: 'my_vms', name: 'my_linux_vm') d end ``` + **Test Properties of a Virtual Machine Resides in an Azure Dev Test Lab .** ```ruby @@ -147,6 +150,7 @@ describe azure_generic_resource(resource_provider: 'Microsoft.DevTestLab/labs', its('properties.allowClaim') { should cmp false } end ``` + **Test a Resource Group .** ```ruby @@ -156,6 +160,7 @@ describe azure_generic_resource(add_subscription_id: true, resource_uri: '/resou its('tags') { should include(owner: 'John Doe') } end ``` + **Test a Policy Definition.** ```ruby @@ -169,7 +174,7 @@ For more examples, please see the [integration tests](/test/integration/verify/c ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exist diff --git a/docs-chef-io/content/inspec/resources/azure_generic_resources.md b/docs-chef-io/content/inspec/resources/azure_generic_resources.md index 2a16987df..46ff7c525 100644 --- a/docs-chef-io/content/inspec/resources/azure_generic_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_generic_resources.md @@ -156,6 +156,7 @@ describe azure_generic_resources(resource_provider: 'Microsoft.Compute/virtualMa its('count') { should eq 43 } end ``` + **Test All Resources Regardless of Their Type and Resource Group with a Common String in Their Names (Server Side Filtering).** ```ruby @@ -183,6 +184,7 @@ describe azure_generic_resources.where(location: 'eastus') do it { should exist } end ``` + **Filters the Results to Only Include Those that Created within Last 24 Hours (Client Side Filtering).** ```ruby @@ -190,6 +192,7 @@ describe azure_generic_resources.where{ created_time > Time.now - 86400 } do it { should exist } end ``` + **Test Policy Definitions.** ```ruby @@ -197,6 +200,7 @@ describe azure_generic_resources(add_subscription_id: true, resource_uri: 'provi it { should exist } end ``` + **Filter Role Assignments via `filter_free_text`.** ```ruby @@ -211,7 +215,7 @@ For more examples, please see the [integration tests](/test/integration/verify/c ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exist diff --git a/docs-chef-io/content/inspec/resources/azure_graph_generic_resource.md b/docs-chef-io/content/inspec/resources/azure_graph_generic_resource.md index e3bb2d7bc..4385d806b 100644 --- a/docs-chef-io/content/inspec/resources/azure_graph_generic_resource.md +++ b/docs-chef-io/content/inspec/resources/azure_graph_generic_resource.md @@ -68,7 +68,7 @@ For more examples, please see the [integration tests](../../test/integration/ver ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exist diff --git a/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md b/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md index 2019e6ca7..fddd18012 100644 --- a/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md +++ b/docs-chef-io/content/inspec/resources/azure_graph_generic_resources.md @@ -119,7 +119,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exist diff --git a/docs-chef-io/content/inspec/resources/azure_graph_user.md b/docs-chef-io/content/inspec/resources/azure_graph_user.md index b5099f771..de430f75e 100644 --- a/docs-chef-io/content/inspec/resources/azure_graph_user.md +++ b/docs-chef-io/content/inspec/resources/azure_graph_user.md @@ -123,6 +123,7 @@ describe azure_graph_user(id: 'someValidId') it { should exist } end ``` + **Test If an Active Directory User Account is Referenced with an Invalid ID.** ```ruby @@ -133,7 +134,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_graph_users.md b/docs-chef-io/content/inspec/resources/azure_graph_users.md index f126d9a02..84ddc505d 100644 --- a/docs-chef-io/content/inspec/resources/azure_graph_users.md +++ b/docs-chef-io/content/inspec/resources/azure_graph_users.md @@ -107,6 +107,7 @@ describe azure_graph_users(filter_free_text: "startswith(givenName,'J') and star it { should exist } end ``` + **Ensure There are No Guest Accounts Active (Client Side Filtering).** ```ruby @@ -117,7 +118,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_hdinsight_cluster.md b/docs-chef-io/content/inspec/resources/azure_hdinsight_cluster.md index 7d5f1b22b..ed21319c9 100644 --- a/docs-chef-io/content/inspec/resources/azure_hdinsight_cluster.md +++ b/docs-chef-io/content/inspec/resources/azure_hdinsight_cluster.md @@ -73,6 +73,7 @@ describe azure_hdinsight_cluster(resource_id: '/subscriptions/{subscriptionId}/r its('properties.provisioningState') { should cmp 'Succeeded' } end ``` + **Test the Version of a HDInsight Cluster.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_key_vault.md b/docs-chef-io/content/inspec/resources/azure_key_vault.md index 95972e184..b2cba3633 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vault.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vault.md @@ -79,6 +79,7 @@ describe azure_key_vault(resource_group: 'MyResourceGroup', name: 'MyVaultName') its('properties.sku.family') { should eq 'A' } end ``` + **Test If Key Vault is Enabled for Disk Encryption.** ```ruby @@ -86,6 +87,7 @@ describe azure_key_vault(resource_group: 'MyResourceGroup', name: 'MyVaultName') its('properties.enabledForDiskEncryption') { should be_true } end ``` + **Test If Azure Key Vault audit logging is enabled.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_key_vault_key.md b/docs-chef-io/content/inspec/resources/azure_key_vault_key.md index e84645e62..b39376a94 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vault_key.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vault_key.md @@ -88,6 +88,7 @@ describe azure_key_vault_key(vault_name: 'example_vault', key_name: 'example_key its('key.kid') { should cmp 'https://example_vault.vault.azure.net/keys/key/7df9bf2c3b4347bab213ebe233f0e350' } end ``` + **Test if the Key is Enabled.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_key_vault_keys.md b/docs-chef-io/content/inspec/resources/azure_key_vault_keys.md index c40728fa1..c53c488a9 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vault_keys.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vault_keys.md @@ -70,6 +70,7 @@ describe azure_key_vault_keys(vault_name: 'example_vault').where { kid.include?( its('count') { should be 1 } end ``` + **Loop through Keys by the Key ID.** ```ruby @@ -82,7 +83,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_key_vault_secret.md b/docs-chef-io/content/inspec/resources/azure_key_vault_secret.md index 3bc2680a8..98ecf505b 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vault_secret.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vault_secret.md @@ -100,6 +100,7 @@ describe azure_key_vault_secret(vault_name: 'example_vault', secret_name: 'examp its('id') { should cmp 'https://example_vault.vault.azure.net/secrets/example_secret' } end ``` + **Test if the Secret is Enabled.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_key_vault_secrets.md b/docs-chef-io/content/inspec/resources/azure_key_vault_secrets.md index b95b99100..8bccb25ca 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vault_secrets.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vault_secrets.md @@ -75,6 +75,7 @@ describe azure_key_vault_secrets(vault_name: 'example_vault').where { id.include its('count') { should be 1 } end ``` + **Loop through Secrets by their IDs.** ```ruby @@ -87,7 +88,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_key_vaults.md b/docs-chef-io/content/inspec/resources/azure_key_vaults.md index 9199b41b7..af8010f42 100644 --- a/docs-chef-io/content/inspec/resources/azure_key_vaults.md +++ b/docs-chef-io/content/inspec/resources/azure_key_vaults.md @@ -103,7 +103,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_load_balancers.md b/docs-chef-io/content/inspec/resources/azure_load_balancers.md index 060386e92..3c7def8c3 100644 --- a/docs-chef-io/content/inspec/resources/azure_load_balancers.md +++ b/docs-chef-io/content/inspec/resources/azure_load_balancers.md @@ -90,6 +90,7 @@ describe azure_load_balancers do its('names') { should include 'my-lb' } end ```` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -97,6 +98,7 @@ describe azure_load_balancers.where{ name.eql?('production-lb') } do it { should exist } end ``` + **Filter the Results to Include Only those with Location Match the Given String Value.** ```ruby @@ -107,7 +109,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_lock.md b/docs-chef-io/content/inspec/resources/azure_lock.md index 6e3cfca89..2675a1f94 100644 --- a/docs-chef-io/content/inspec/resources/azure_lock.md +++ b/docs-chef-io/content/inspec/resources/azure_lock.md @@ -65,6 +65,7 @@ azure_locks(resource_group: 'example-group').ids.each do |id| end end ``` + **Test If Management Locks on a Specific Resource Contain a Certain String.** ```ruby @@ -77,7 +78,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_locks.md b/docs-chef-io/content/inspec/resources/azure_locks.md index 768660255..e4d4e97a7 100644 --- a/docs-chef-io/content/inspec/resources/azure_locks.md +++ b/docs-chef-io/content/inspec/resources/azure_locks.md @@ -95,6 +95,7 @@ describe azure_locks(resource_group: 'rg-1', resource_name: 'my-VM', resource_ty its('names') { should include 'production_agents' } end ``` + **Filters the Results to Include Only Those Management Locks which Include the Given Name.** ```ruby @@ -102,6 +103,7 @@ describe azure_locks.where{ name.include?('production') } do it { should exist } end ``` + **Loop through All Virtual Machines to Test If They have Management Locks Defined on.** ```ruby @@ -114,7 +116,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_management_groups.md b/docs-chef-io/content/inspec/resources/azure_management_groups.md index b28397348..c735a2289 100644 --- a/docs-chef-io/content/inspec/resources/azure_management_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_management_groups.md @@ -69,7 +69,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_mariadb_server.md b/docs-chef-io/content/inspec/resources/azure_mariadb_server.md index 288fe4b13..30e3fbc4d 100644 --- a/docs-chef-io/content/inspec/resources/azure_mariadb_server.md +++ b/docs-chef-io/content/inspec/resources/azure_mariadb_server.md @@ -78,6 +78,7 @@ describe azure_mariadb_server(resource_group: 'my-rg', name: 'sql-server-1') do it { should exist } end ``` + **Test If a MariaDB Server is Referenced with an Invalid Name.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_mariadb_servers.md b/docs-chef-io/content/inspec/resources/azure_mariadb_servers.md index c44959b3c..22553a4b4 100644 --- a/docs-chef-io/content/inspec/resources/azure_mariadb_servers.md +++ b/docs-chef-io/content/inspec/resources/azure_mariadb_servers.md @@ -90,6 +90,7 @@ describe azure_mariadb_servers do its('names') { should include 'my-server-name' } end ``` + **Filters the Results to Include Only Those Servers which Include the Given Name (Client Side Filtering).** ```ruby @@ -97,6 +98,7 @@ describe azure_mariadb_servers.where{ name.include?('production') } do it { should exist } end ``` + **Filters the Results to Include Only Those Servers which Reside in a Given Location (Client Side Filtering).** ```ruby @@ -114,7 +116,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md index dca867732..cedc645ac 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_groups.md @@ -127,7 +127,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_machines.md b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_machines.md index e080ad66f..168bf2797 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_machines.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_machines.md @@ -171,7 +171,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_projects.md b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_projects.md index 01acaf935..351dd29d1 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_assessment_projects.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_assessment_projects.md @@ -170,7 +170,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_assessments.md b/docs-chef-io/content/inspec/resources/azure_migrate_assessments.md index bf5d02ca6..41cda70e6 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_assessments.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_assessments.md @@ -243,7 +243,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_project_database_instances.md b/docs-chef-io/content/inspec/resources/azure_migrate_project_database_instances.md index 170eb6aa2..64759741e 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_project_database_instances.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_project_database_instances.md @@ -151,7 +151,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_project_databases.md b/docs-chef-io/content/inspec/resources/azure_migrate_project_databases.md index a61297e3b..b7718e0d6 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_project_databases.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_project_databases.md @@ -163,7 +163,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_project_events.md b/docs-chef-io/content/inspec/resources/azure_migrate_project_events.md index d6932829c..065da381c 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_project_events.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_project_events.md @@ -130,7 +130,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_project_machines.md b/docs-chef-io/content/inspec/resources/azure_migrate_project_machines.md index a8399f04b..d9fdc996b 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_project_machines.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_project_machines.md @@ -115,7 +115,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_migrate_project_solutions.md b/docs-chef-io/content/inspec/resources/azure_migrate_project_solutions.md index 55d389543..5d10528ed 100644 --- a/docs-chef-io/content/inspec/resources/azure_migrate_project_solutions.md +++ b/docs-chef-io/content/inspec/resources/azure_migrate_project_solutions.md @@ -163,7 +163,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alert.md b/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alert.md index 1f293834e..dd124b373 100644 --- a/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alert.md +++ b/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alert.md @@ -77,6 +77,7 @@ describe azure_monitor_activity_log_alert(resource_group: 'example', name: 'Aler its('operations') { should include 'Microsoft.Authorization/policyAssignments/write' } end ``` + **Test the Scope of an Activity Log Alert.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alerts.md b/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alerts.md index c5d4dc9b4..db6a8496a 100644 --- a/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alerts.md +++ b/docs-chef-io/content/inspec/resources/azure_monitor_activity_log_alerts.md @@ -100,7 +100,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_monitor_log_profile.md b/docs-chef-io/content/inspec/resources/azure_monitor_log_profile.md index 32e37656d..2de210f4b 100644 --- a/docs-chef-io/content/inspec/resources/azure_monitor_log_profile.md +++ b/docs-chef-io/content/inspec/resources/azure_monitor_log_profile.md @@ -67,6 +67,7 @@ describe azure_monitor_log_profile(name: 'my_log_profile') do it { should exist } end ``` + **Test If a Log Profile is Referenced with an Invalid Name.** ```ruby @@ -91,7 +92,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### have_log_retention_enabled diff --git a/docs-chef-io/content/inspec/resources/azure_monitor_log_profiles.md b/docs-chef-io/content/inspec/resources/azure_monitor_log_profiles.md index a780ea118..03a9a9fe6 100644 --- a/docs-chef-io/content/inspec/resources/azure_monitor_log_profiles.md +++ b/docs-chef-io/content/inspec/resources/azure_monitor_log_profiles.md @@ -61,6 +61,7 @@ describe azure_monitor_log_profiles do its('names') { should include 'my_log_profile' } end ``` + **Filter the Results by the `name` Property if it Includes a Certain String.** ```ruby @@ -79,7 +80,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_mysql_databases.md b/docs-chef-io/content/inspec/resources/azure_mysql_databases.md index b6860119f..0eac63e86 100644 --- a/docs-chef-io/content/inspec/resources/azure_mysql_databases.md +++ b/docs-chef-io/content/inspec/resources/azure_mysql_databases.md @@ -76,6 +76,7 @@ describe azure_mysql_databases(resource_group: 'my-rg', server_name: 'my-server' its('names') { should include 'my-db' } end ```` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -86,7 +87,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_mysql_server.md b/docs-chef-io/content/inspec/resources/azure_mysql_server.md index 6342d1ae7..e2e500561 100644 --- a/docs-chef-io/content/inspec/resources/azure_mysql_server.md +++ b/docs-chef-io/content/inspec/resources/azure_mysql_server.md @@ -78,6 +78,7 @@ describe azure_mysql_server(resource_group: 'my-rg', name: 'sql-server-1') do it { should exist } end ``` + **Test If a MySQL Server is Referenced with an Invalid Name.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_mysql_servers.md b/docs-chef-io/content/inspec/resources/azure_mysql_servers.md index fad0a1a9b..379f5a396 100644 --- a/docs-chef-io/content/inspec/resources/azure_mysql_servers.md +++ b/docs-chef-io/content/inspec/resources/azure_mysql_servers.md @@ -85,6 +85,7 @@ describe azure_mysql_servers do its('names') { should include 'my-server-name' } end ``` + **Filters the Results to Include Only Those Servers which Include the Given Name (Client Side Filtering).** ```ruby @@ -92,6 +93,7 @@ describe azure_mysql_servers.where{ name.include?('production') } do it { should exist } end ``` + **Filters the Results to Include Only Those Servers which Reside in a Given Location (Client Side Filtering).** ```ruby @@ -109,7 +111,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_network_interface.md b/docs-chef-io/content/inspec/resources/azure_network_interface.md index 465799a81..3d0add730 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_interface.md +++ b/docs-chef-io/content/inspec/resources/azure_network_interface.md @@ -89,6 +89,7 @@ describe azure_network_interface(resource_group: 'my-rg', name: 'networkInterfac its('properties.enableIPForwarding') { should be_true } end ``` + **Test if the Primary IP Configuration is Set to Correct Private IP Address.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_network_interfaces.md b/docs-chef-io/content/inspec/resources/azure_network_interfaces.md index d7f2e4cee..dba1fd9dc 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_interfaces.md +++ b/docs-chef-io/content/inspec/resources/azure_network_interfaces.md @@ -85,6 +85,7 @@ describe azure_network_interfaces do its('names') { should include 'my-network-interface' } end ``` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -95,7 +96,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_network_security_group.md b/docs-chef-io/content/inspec/resources/azure_network_security_group.md index cba664b0b..3513606a4 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_security_group.md +++ b/docs-chef-io/content/inspec/resources/azure_network_security_group.md @@ -116,6 +116,7 @@ describe azure_network_security_group(resource_group: 'example', name: 'GroupNam it { should exist } end ``` + **Test that a Network Security Group Allows SSH from the Internet.** ```ruby @@ -123,6 +124,7 @@ describe azure_network_security_group(resource_group: 'example', name: 'GroupNam it { should allow_ssh_from_internet } end ``` + **Test that a Network Security Group Allows Inbound Traffics from a Certain Ip Range in Any Port and Any Protocol.** ```ruby @@ -132,6 +134,7 @@ describe azure_network_security_group(resource_group: 'example', name: 'GroupNam end ``` + **Test that a Network Security Group Allows Inbound Traffics from Internet Service Tag in Port `80` and `TCP` Protocol.** ```ruby @@ -141,6 +144,7 @@ describe azure_network_security_group(resource_group: 'example', name: 'GroupNam end ``` + **Test that a Network Security Group Allows Inbound Traffics from Virtual Network Service Tag in a Range of Ports and Any Protocol.** ```ruby @@ -150,6 +154,7 @@ describe azure_network_security_group(resource_group: 'example', name: 'GroupNam end ``` + **Test that a Network Security Group Allows Outbound Traffics to a Certain Ip Range in any Port and Any Protocol.** ```ruby @@ -177,7 +182,7 @@ and you must prefix the `ip_range`, `service_tag`, and `port` with either `sourc ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_network_security_groups.md b/docs-chef-io/content/inspec/resources/azure_network_security_groups.md index a05395208..d5f988fa7 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_security_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_network_security_groups.md @@ -102,7 +102,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_network_watcher.md b/docs-chef-io/content/inspec/resources/azure_network_watcher.md index 522dcc65b..f02be136a 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_watcher.md +++ b/docs-chef-io/content/inspec/resources/azure_network_watcher.md @@ -84,6 +84,7 @@ describe azure_network_watcher(resource_group: 'resourceGroupName', name: 'netwo its('location') { should cmp 'eastus' } end ``` + **Test the Flow Log Status of a Network Security Group.** ```ruby @@ -92,6 +93,7 @@ describe azure_network_watcher(resource_group: 'resourceGroupName', name: 'netwo its('flow_logs.properties.retentionPolicy.days') { should be >= 90 } end ``` + **Loop through Network Security Groups with the Resource ID.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_network_watchers.md b/docs-chef-io/content/inspec/resources/azure_network_watchers.md index c048a2e47..8dc749d90 100644 --- a/docs-chef-io/content/inspec/resources/azure_network_watchers.md +++ b/docs-chef-io/content/inspec/resources/azure_network_watchers.md @@ -80,7 +80,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_policy_definition.md b/docs-chef-io/content/inspec/resources/azure_policy_definition.md index 6554620f1..6067df127 100644 --- a/docs-chef-io/content/inspec/resources/azure_policy_definition.md +++ b/docs-chef-io/content/inspec/resources/azure_policy_definition.md @@ -79,6 +79,7 @@ describe azure_policy_definition(name: 'my_policy') do its('properties.displayName') { should cmp "Enforce 'owner' tag on resource groups" } end ``` + **Test a Policy Definition Rule.** ```ruby @@ -89,7 +90,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### custom diff --git a/docs-chef-io/content/inspec/resources/azure_policy_definitions.md b/docs-chef-io/content/inspec/resources/azure_policy_definitions.md index c1ae642c7..9842d3284 100644 --- a/docs-chef-io/content/inspec/resources/azure_policy_definitions.md +++ b/docs-chef-io/content/inspec/resources/azure_policy_definitions.md @@ -101,6 +101,7 @@ describe azure_policy_definitions do its('names') { should include 'my-policy' } end ``` + **Filters the Results to Include Only Those Policy Definitions which Include the Given Name.** ```ruby @@ -108,6 +109,7 @@ describe azure_policy_definitions.where{ name.include?('my-policy') } do it { should exist } end ``` + **Filters the Results to Include Only The Custom Policy Definitions.** ```ruby @@ -119,7 +121,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_policy_exemptions.md b/docs-chef-io/content/inspec/resources/azure_policy_exemptions.md index ffbf30264..0c954e788 100644 --- a/docs-chef-io/content/inspec/resources/azure_policy_exemptions.md +++ b/docs-chef-io/content/inspec/resources/azure_policy_exemptions.md @@ -142,7 +142,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_policy_insights_query_result.md b/docs-chef-io/content/inspec/resources/azure_policy_insights_query_result.md index c5b687b60..a6210e9a3 100644 --- a/docs-chef-io/content/inspec/resources/azure_policy_insights_query_result.md +++ b/docs-chef-io/content/inspec/resources/azure_policy_insights_query_result.md @@ -133,7 +133,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### compliant diff --git a/docs-chef-io/content/inspec/resources/azure_policy_insights_query_results.md b/docs-chef-io/content/inspec/resources/azure_policy_insights_query_results.md index d885dc959..3739c90be 100644 --- a/docs-chef-io/content/inspec/resources/azure_policy_insights_query_results.md +++ b/docs-chef-io/content/inspec/resources/azure_policy_insights_query_results.md @@ -165,7 +165,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_postgresql_databases.md b/docs-chef-io/content/inspec/resources/azure_postgresql_databases.md index 9cd9be1e7..4dd7f54f9 100644 --- a/docs-chef-io/content/inspec/resources/azure_postgresql_databases.md +++ b/docs-chef-io/content/inspec/resources/azure_postgresql_databases.md @@ -76,6 +76,7 @@ describe azure_postgresql_databases(resource_group: 'my-rg', server_name: 'my-se its('names') { should include 'my-db' } end ```` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -86,7 +87,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_postgresql_server.md b/docs-chef-io/content/inspec/resources/azure_postgresql_server.md index 0c958995d..a45b2f86d 100644 --- a/docs-chef-io/content/inspec/resources/azure_postgresql_server.md +++ b/docs-chef-io/content/inspec/resources/azure_postgresql_server.md @@ -78,6 +78,7 @@ describe azure_postgresql_server(resource_group: 'my-rg', name: 'sql-server-1') its('properties.administratorLogin') { should cmp 'admin' } end ``` + **Test the Fully Qualified Domain Name of a PostgreSql Server.** ```ruby @@ -110,7 +111,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_postgresql_servers.md b/docs-chef-io/content/inspec/resources/azure_postgresql_servers.md index 20c530ec0..b610c16b5 100644 --- a/docs-chef-io/content/inspec/resources/azure_postgresql_servers.md +++ b/docs-chef-io/content/inspec/resources/azure_postgresql_servers.md @@ -89,6 +89,7 @@ describe azure_postgresql_servers do its('names') { should include 'my-server-name' } end ``` + **Filters the Results to Include Only Those Servers which Include the Given Name (Client Side Filtering).** ```ruby @@ -96,6 +97,7 @@ describe azure_postgresql_servers.where{ name.include?('production') } do it { should exist } end ``` + **Filters the Results to Include Only Those Servers which Reside in a Given Location (Client Side Filtering).** ```ruby @@ -113,7 +115,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_app_dashboard_tiles.md b/docs-chef-io/content/inspec/resources/azure_power_bi_app_dashboard_tiles.md index d04e996e6..4718938e5 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_app_dashboard_tiles.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_app_dashboard_tiles.md @@ -102,7 +102,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_apps.md b/docs-chef-io/content/inspec/resources/azure_power_bi_apps.md index b76e847a9..86d670f61 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_apps.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_apps.md @@ -82,7 +82,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_capacities.md b/docs-chef-io/content/inspec/resources/azure_power_bi_capacities.md index 0e31e4b6d..e6c700bbb 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_capacities.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_capacities.md @@ -86,7 +86,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_capacity_refreshables.md b/docs-chef-io/content/inspec/resources/azure_power_bi_capacity_refreshables.md index 830b30f3f..b54cd82b9 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_capacity_refreshables.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_capacity_refreshables.md @@ -95,7 +95,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_dashboard_tiles.md b/docs-chef-io/content/inspec/resources/azure_power_bi_dashboard_tiles.md index 6eb7b6b3e..3ea6cbc02 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_dashboard_tiles.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_dashboard_tiles.md @@ -107,7 +107,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_dashboards.md b/docs-chef-io/content/inspec/resources/azure_power_bi_dashboards.md index 17f286396..840edf740 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_dashboards.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_dashboards.md @@ -90,7 +90,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md b/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md index 723318c95..c4b09d9db 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_dataflows.md @@ -76,7 +76,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_datasets.md b/docs-chef-io/content/inspec/resources/azure_power_bi_datasets.md index ae214601c..3ea01bc9f 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_datasets.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_datasets.md @@ -89,7 +89,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_power_bi_gateways.md b/docs-chef-io/content/inspec/resources/azure_power_bi_gateways.md index d0451fcc8..64d73e95e 100644 --- a/docs-chef-io/content/inspec/resources/azure_power_bi_gateways.md +++ b/docs-chef-io/content/inspec/resources/azure_power_bi_gateways.md @@ -85,7 +85,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_redis_caches.md b/docs-chef-io/content/inspec/resources/azure_redis_caches.md index 90c123dae..dcf02b2e6 100644 --- a/docs-chef-io/content/inspec/resources/azure_redis_caches.md +++ b/docs-chef-io/content/inspec/resources/azure_redis_caches.md @@ -198,7 +198,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_resource_group.md b/docs-chef-io/content/inspec/resources/azure_resource_group.md index 3a84c2f23..12510cb33 100644 --- a/docs-chef-io/content/inspec/resources/azure_resource_group.md +++ b/docs-chef-io/content/inspec/resources/azure_resource_group.md @@ -65,6 +65,7 @@ describe azure_resource_group(name: 'my_resource_group') do its('location') { should cmp 'eastus' } end ``` + **Test a Resource Group Provisioning State.** ```ruby @@ -83,7 +84,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_resource_groups.md b/docs-chef-io/content/inspec/resources/azure_resource_groups.md index 1fd6fc4fd..b65cbc09c 100644 --- a/docs-chef-io/content/inspec/resources/azure_resource_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_resource_groups.md @@ -87,7 +87,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_resource_health_availability_statuses.md b/docs-chef-io/content/inspec/resources/azure_resource_health_availability_statuses.md index baf51ebeb..3719f35ab 100644 --- a/docs-chef-io/content/inspec/resources/azure_resource_health_availability_statuses.md +++ b/docs-chef-io/content/inspec/resources/azure_resource_health_availability_statuses.md @@ -84,7 +84,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_resource_health_emerging_issues.md b/docs-chef-io/content/inspec/resources/azure_resource_health_emerging_issues.md index aca14d6bc..285fdb1f5 100644 --- a/docs-chef-io/content/inspec/resources/azure_resource_health_emerging_issues.md +++ b/docs-chef-io/content/inspec/resources/azure_resource_health_emerging_issues.md @@ -73,7 +73,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_resource_health_events.md b/docs-chef-io/content/inspec/resources/azure_resource_health_events.md index 8e5f1e9f1..512bc690d 100644 --- a/docs-chef-io/content/inspec/resources/azure_resource_health_events.md +++ b/docs-chef-io/content/inspec/resources/azure_resource_health_events.md @@ -102,7 +102,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_role_definition.md b/docs-chef-io/content/inspec/resources/azure_role_definition.md index 46c48601b..0d690a690 100644 --- a/docs-chef-io/content/inspec/resources/azure_role_definition.md +++ b/docs-chef-io/content/inspec/resources/azure_role_definition.md @@ -84,7 +84,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_role_definitions.md b/docs-chef-io/content/inspec/resources/azure_role_definitions.md index 06aa05804..254f0f363 100644 --- a/docs-chef-io/content/inspec/resources/azure_role_definitions.md +++ b/docs-chef-io/content/inspec/resources/azure_role_definitions.md @@ -71,6 +71,7 @@ describe azure_role_definitions do its('names') { should include 'my-role' } end ``` + **Filter the Results to Include Only Those Role Definitions which Include the Given Name.** ```ruby @@ -78,6 +79,7 @@ describe azure_role_definitions.where{ name.include?('my-role') } do it { should exist } end ``` + **Filter the Results to Include Only The Built-in Role Definitions.** ```ruby @@ -97,7 +99,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_security_center_policies.md b/docs-chef-io/content/inspec/resources/azure_security_center_policies.md index d83fcedbd..1b2d360ae 100644 --- a/docs-chef-io/content/inspec/resources/azure_security_center_policies.md +++ b/docs-chef-io/content/inspec/resources/azure_security_center_policies.md @@ -61,6 +61,7 @@ describe azure_security_center_policies do its('names') { should include 'my-policy' } end ``` + **Filter the Results to Include Only Those Policies which Include a Given String in Their Names.** ```ruby @@ -68,6 +69,7 @@ describe azure_security_center_policies.where{ name.include?('production') } do it { should exist } end ``` + **Filter the Results to Include Only Those Policies that the Log Collection is Enabled.** ```ruby @@ -79,7 +81,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_security_center_policy.md b/docs-chef-io/content/inspec/resources/azure_security_center_policy.md index 726b00a60..eee324551 100644 --- a/docs-chef-io/content/inspec/resources/azure_security_center_policy.md +++ b/docs-chef-io/content/inspec/resources/azure_security_center_policy.md @@ -139,6 +139,7 @@ describe azure_security_center_policy(resource_group: 'my-rg', name: 'my_policy' its('log_collection') { should cmp 'On' } end ``` + **Test If Notifications are Enabled.** ```ruby @@ -150,7 +151,7 @@ See [integration tests](../../test/integration/verify/controls/azurerm_security_ ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### have_auto_provisioning_enabled diff --git a/docs-chef-io/content/inspec/resources/azure_sql_database.md b/docs-chef-io/content/inspec/resources/azure_sql_database.md index 6fc0e7789..d73fd720d 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_database.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_database.md @@ -90,6 +90,7 @@ describe azure_sql_database(resource_group: 'inspec-rg', server_name: 'customer_ it { should exist } end ``` + **Test If a SQL Database is Referenced with an Invalid Name.** ```ruby @@ -121,7 +122,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_databases.md b/docs-chef-io/content/inspec/resources/azure_sql_databases.md index 8db222760..834466aa4 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_databases.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_databases.md @@ -86,6 +86,7 @@ describe azure_sql_databases(resource_group: 'my-rg', server_name: 'my-server') its('names') { should include 'my-db' } end ```` + **Filter the Results to Include Only those with Names Match the Given String Value.** ```ruby @@ -93,6 +94,7 @@ describe azure_sql_databases.(resource_group: 'my-rg', server_name: 'my-server') it { should exist } end ``` + **Filter the Results to Include Only those with `GRS` Storage Account Type.** ```ruby @@ -103,7 +105,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md b/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md index 648b29f9e..5523cadc7 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_managed_instances.md @@ -107,7 +107,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_server.md b/docs-chef-io/content/inspec/resources/azure_sql_server.md index 949768647..32edc2495 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_server.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_server.md @@ -102,6 +102,7 @@ describe azure_sql_server(resource_group: 'my-rg', name: 'sql-server-1') do it { should exist } end ``` + **Test If a SQL Server is Referenced with an Invalid Name.** ```ruby @@ -124,6 +125,7 @@ describe azure_sql_server(resource_id: '/subscriptions/.../my-server') do its('location') { should cmp 'westeurope' } end ``` + **Test a SQL Server's Auditing Settings.** ```ruby @@ -137,7 +139,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_servers.md b/docs-chef-io/content/inspec/resources/azure_sql_servers.md index b23c3a745..9068140ad 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_servers.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_servers.md @@ -94,6 +94,7 @@ describe azure_sql_servers do its('names') { should include 'my-server-name' } end ``` + **Filters the Results to Include Only Those Servers which Include the Given Name (Client Side Filtering).** ```ruby @@ -101,6 +102,7 @@ describe azure_sql_servers.where{ name.include?('production') } do it { should exist } end ``` + **Filters the Results to Include Only Those Servers which Reside in a Given Location (Client Side Filtering).** ```ruby @@ -118,7 +120,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_group_availability_listeners.md b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_group_availability_listeners.md index 255e190cf..135621b8e 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_group_availability_listeners.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_group_availability_listeners.md @@ -91,7 +91,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_groups.md b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_groups.md index dd3653d1a..11a67f0be 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_groups.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machine_groups.md @@ -92,7 +92,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machines.md b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machines.md index cdc0ea3db..91ca0966f 100644 --- a/docs-chef-io/content/inspec/resources/azure_sql_virtual_machines.md +++ b/docs-chef-io/content/inspec/resources/azure_sql_virtual_machines.md @@ -92,7 +92,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_storage_account.md b/docs-chef-io/content/inspec/resources/azure_storage_account.md index 507f5ac05..a9d0dd97a 100644 --- a/docs-chef-io/content/inspec/resources/azure_storage_account.md +++ b/docs-chef-io/content/inspec/resources/azure_storage_account.md @@ -100,6 +100,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('properties.primaryEndpoints.file') { should cmp 'https://mysa.file.core.windows.net/' } end ``` + **Verify that Only HTTPs is Supported.** ```ruby @@ -107,6 +108,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('properties.supportsHttpsTrafficOnly') { should be true } end ``` + **Test Queues Service Endpoint.** ```ruby @@ -114,6 +116,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('queues.enumeration_results.service_endpoint') { should cmp 'https://mysa.queue.core.windows.net/' } end ``` + **Test Blobs Service Endpoint.** ```ruby @@ -121,6 +124,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('blobs.enumeration_results.service_endpoint') { should cmp 'https://mysa.blob.core.windows.net/' } end ``` + **Test Queue Properties Logging Version.** ```ruby @@ -128,6 +132,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('queue_properties.logging.version') { should cmp '1.0' } end ``` + **Test Blob Properties Logging Version.** ```ruby @@ -135,6 +140,7 @@ describe azure_storage_account(resource_group: 'rg', name: 'mysa') do its('blob_properties.logging.version') { should cmp '1.0' } end ``` + **Test Table Properties Logging Version.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_storage_account_blob_container.md b/docs-chef-io/content/inspec/resources/azure_storage_account_blob_container.md index 7bf4d5b07..9f3cadc3e 100644 --- a/docs-chef-io/content/inspec/resources/azure_storage_account_blob_container.md +++ b/docs-chef-io/content/inspec/resources/azure_storage_account_blob_container.md @@ -84,6 +84,7 @@ describe azure_storage_account_blob_container(resource_group: 'rg', storage_acco its('properties.deleted') { should be true } end ``` + **Ensure that the Blob Container is private.** ```ruby @@ -91,6 +92,7 @@ describe azure_storage_account_blob_container(resource_group: 'rg', storage_acco its('properties') { should have_attributes(publicAccess: 'None') } end ``` + **Loop through Resources via `resource_id`.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_storage_accounts.md b/docs-chef-io/content/inspec/resources/azure_storage_accounts.md index ed4df839c..d2380a5de 100644 --- a/docs-chef-io/content/inspec/resources/azure_storage_accounts.md +++ b/docs-chef-io/content/inspec/resources/azure_storage_accounts.md @@ -86,7 +86,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_streaming_analytics_function.md b/docs-chef-io/content/inspec/resources/azure_streaming_analytics_function.md index a4fab0f79..e182022f5 100644 --- a/docs-chef-io/content/inspec/resources/azure_streaming_analytics_function.md +++ b/docs-chef-io/content/inspec/resources/azure_streaming_analytics_function.md @@ -78,7 +78,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### Test Streaming function to ensure it's using Javascript UDF diff --git a/docs-chef-io/content/inspec/resources/azure_streaming_analytics_functions.md b/docs-chef-io/content/inspec/resources/azure_streaming_analytics_functions.md index 8bcea69b7..f78c61d2a 100644 --- a/docs-chef-io/content/inspec/resources/azure_streaming_analytics_functions.md +++ b/docs-chef-io/content/inspec/resources/azure_streaming_analytics_functions.md @@ -80,7 +80,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_subnet.md b/docs-chef-io/content/inspec/resources/azure_subnet.md index c709c845f..8e398bdb5 100644 --- a/docs-chef-io/content/inspec/resources/azure_subnet.md +++ b/docs-chef-io/content/inspec/resources/azure_subnet.md @@ -23,117 +23,13 @@ Use the `azure_subnet` InSpec audit resource to test properties related to a sub ## Syntax `resource_group`, `vnet` and `name` or the `resource_id` must be given as a parameter. -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - it { should exist } -end -``` -```ruby -describe azure_subnet(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}') do - it { should exist } -end -``` - -## Parameters - -`resource_group` -: Azure resource group that the targeted resource resides in. `MyResourceGroup`. - -`vnet` -: Name of the Azure virtual network that the subnet is created in. `MyVNetName`. - -`name` -: Name of the Azure subnet to test. `MySubnetName`. - -`resource_id` -: The unique resource ID. `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}`. - -Either one of the parameter sets can be provided for a valid query: -- `resource_id` -- `resource_group`, `vnet` and `name` - -## Parameters - -| Property | Description | -|----------|-------------| -| address_prefix | The address prefix for the subnet. `its('address_prefix') { should eq "x.x.x.x/x" }` | -| nsg | The network security group attached to the subnet. `its('nsg') { should eq 'MyNetworkSecurityGroupName' }` | - -For properties applicable to all resources, such as `type`, `name`, `id`, `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}). - -Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/subnets/get#subnet) for other properties available. -Any property in the response may be accessed with the key names separated by dots (`.`). - -## Examples - -**Ensure that the Subnets Address Prefix is Configured As Expected.** - -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - its('address_prefix') { should eq '192.168.0.0/24' } -end -``` -**Ensure that the Subnet is Attached to the Right Network Security Group.** - -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - its('nsg') { should eq 'NetworkSecurityGroupName'} -end -``` - -## Matchers - -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). - -### exists ```ruby -# If a subnet is found it will exist - describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do it { should exist } end - -# subnets that aren't found will not exist -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'DoesNotExist') do - it { should_not exist } -end ``` -## Azure Permissions - -{{% azure_permissions_service_principal role="contributor" %}} - -+++ -title = "azure_subnet Resource" -platform = "azure" -draft = false -gh_repo = "inspec-azure" - -[menu.inspec] -title = "azure_subnet" -identifier = "inspec/resources/azure/azure_subnet Resource" -parent = "inspec/resources/azure" -+++ - -Use the `azure_subnet` InSpec audit resource to test properties related to a subnet for a given virtual network. - -## Azure REST API Version, Endpoint, and HTTP Client Parameters - -{{% inspec_azure_common_parameters %}} - -## Installation - -{{% inspec_azure_install %}} - -## Syntax - -`resource_group`, `vnet` and `name` or the `resource_id` must be given as a parameter. -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - it { should exist } -end -``` ```ruby describe azure_subnet(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}') do it { should exist } @@ -143,138 +39,35 @@ end ## Parameters `resource_group` -: Azure resource group that the targeted resource resides in. `MyResourceGroup`. +: Azure resource group that the targeted resource resides in. `vnet` -: Name of the Azure virtual network that the subnet is created in. `MyVNetName`. +: Name of the Azure virtual network that the subnet is created in. `name` -: Name of the Azure subnet to test. `MySubnetName`. +: Name of the Azure subnet to test. `resource_id` : The unique resource ID. `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}`. -Either one of the parameter sets can be provided for a valid query: +Provide one of the following parameter sets for a valid query: + - `resource_id` -- `resource_group`, `vnet` and `name` +- `resource_group`, `vnet`, and `name` -## Parameters +## Properties `address_prefix` -: The address prefix for the subnet. `its('address_prefix') { should eq "x.x.x.x/x" }`. - -`nsg` -: The network security group attached to the subnet. `its('nsg') { should eq 'MyNetworkSecurityGroupName' }`. - -For properties applicable to all resources, such as `type`, `name`, `id`, `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}). - -Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/subnets/get#subnet) for other properties available. -Any property in the response may be accessed with the key names separated by dots (`.`). - -## Examples - -**Ensure that the Subnets Address Prefix is Configured As Expected.** - -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - its('address_prefix') { should eq '192.168.0.0/24' } -end -``` -**Ensure that the Subnet is Attached to the Right Network Security Group.** - -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - its('nsg') { should eq 'NetworkSecurityGroupName'} -end -``` - -## Matchers - -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). - -### exists - -```ruby -# If a subnet is found it will exist - -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - it { should exist } -end - -# subnets that aren't found will not exist -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'DoesNotExist') 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. - -+++ -title = "azure_subnet Resource" -platform = "azure" -draft = false -gh_repo = "inspec-azure" - -[menu.inspec] -title = "azure_subnet" -identifier = "inspec/resources/azure/azure_subnet Resource" -parent = "inspec/resources/azure" -+++ - -Use the `azure_subnet` InSpec audit resource to test properties related to a subnet for a given virtual network. - -## Azure REST API Version, Endpoint, and HTTP Client Parameters - -{{% inspec_azure_common_parameters %}} - -## Installation - -{{% inspec_azure_install %}} - -## Syntax - -`resource_group`, `vnet` and `name` or the `resource_id` must be given as a parameter. -```ruby -describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', name: 'MySubnetName') do - it { should exist } -end -``` -```ruby -describe azure_subnet(resource_id: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}') do - it { should exist } -end -``` - -## Parameters - -`resource_group` -: Azure resource group that the targeted resource resides in. `MyResourceGroup`. - -`vnet` -: Name of the Azure virtual network that the subnet is created in. `MyVNetName`. - -`name` -: Name of the Azure subnet to test. `MySubnetName`. - -`resource_id` -: The unique resource ID. `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnName}/subnets/{subnetName}`. -Either one of the parameter sets can be provided for a valid query: -- `resource_id` -- `resource_group`, `vnet` and `name` +: The address prefix for the subnet. -## Parameters +`nsg` -| Property | Description | -|----------|-------------| -| address_prefix | The address prefix for the subnet. `its('address_prefix') { should eq "x.x.x.x/x" }` | -| nsg | The network security group attached to the subnet. `its('nsg') { should eq 'MyNetworkSecurityGroupName' }` | +: The network security group attached to the subnet. For properties applicable to all resources, such as `type`, `name`, `id`, `properties`, refer to [`azure_generic_resource`]({{< relref "azure_generic_resource.md#properties" >}}). -Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/subnets/get#subnet) for other properties available. +Also, refer to [Azure documentation](https://docs.microsoft.com/en-us/rest/api/virtualnetwork/subnets/get#subnet) for other properties available. Any property in the response may be accessed with the key names separated by dots (`.`). ## Examples @@ -286,6 +79,7 @@ describe azure_subnet(resource_group: 'MyResourceGroup', vnet: 'MyVnetName', nam its('address_prefix') { should eq '192.168.0.0/24' } end ``` + **Ensure that the Subnet is Attached to the Right Network Security Group.** ```ruby @@ -296,7 +90,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists @@ -315,5 +109,4 @@ 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. - +{{% azure_permissions_service_principal role="contributor" %}} diff --git a/docs-chef-io/content/inspec/resources/azure_subnets.md b/docs-chef-io/content/inspec/resources/azure_subnets.md index bd2af152f..94de9f75b 100644 --- a/docs-chef-io/content/inspec/resources/azure_subnets.md +++ b/docs-chef-io/content/inspec/resources/azure_subnets.md @@ -65,6 +65,7 @@ describe azure_subnets(resource_group: 'MyResourceGroup', vnet: 'MyVnetName') do it { should exist } end ``` + **Filters the Results to Only Those that Match the Given Name.** ```ruby @@ -76,7 +77,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_subscription.md b/docs-chef-io/content/inspec/resources/azure_subscription.md index 36f6fcef7..5e0dcf716 100644 --- a/docs-chef-io/content/inspec/resources/azure_subscription.md +++ b/docs-chef-io/content/inspec/resources/azure_subscription.md @@ -104,6 +104,7 @@ describe azure_subscription do its('name') { should cmp 'Demo Resources' } end ``` + **Test Your Subscription`s Authorization Source.** ```ruby @@ -111,6 +112,7 @@ describe azure_subscription do its('authorizationSource') { should cmp 'RoleBased' } end ``` + **Test Your Subscription`s Locations.** ```ruby @@ -135,7 +137,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_subscriptions.md b/docs-chef-io/content/inspec/resources/azure_subscriptions.md index f5b9a5193..4f27be08b 100644 --- a/docs-chef-io/content/inspec/resources/azure_subscriptions.md +++ b/docs-chef-io/content/inspec/resources/azure_subscriptions.md @@ -69,7 +69,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_synapse_notebooks.md b/docs-chef-io/content/inspec/resources/azure_synapse_notebooks.md index 03b7ffe9e..a102c28c9 100644 --- a/docs-chef-io/content/inspec/resources/azure_synapse_notebooks.md +++ b/docs-chef-io/content/inspec/resources/azure_synapse_notebooks.md @@ -89,7 +89,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_machine.md b/docs-chef-io/content/inspec/resources/azure_virtual_machine.md index 2c5ba33bf..f25ca74a4 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_machine.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_machine.md @@ -95,6 +95,7 @@ describe azure_virtual_machine(resource_group: 'MyResourceGroup', name: 'MyVmNam its('data_disk_names') { should include('DataDisk1') } end ``` + **Ensure that the Virtual Machine has the Expected Monitoring Agent Installed.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_machine_disk.md b/docs-chef-io/content/inspec/resources/azure_virtual_machine_disk.md index 36b36aa72..7a771bcf2 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_machine_disk.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_machine_disk.md @@ -79,6 +79,7 @@ describe azure_virtual_machine_disk(resource_group: 'my-rg', name: 'os_disk') do it { should exist } end ``` + **Test If a Disk is Referenced with an Invalid Name.** ```ruby @@ -110,7 +111,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### attached diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_machine_disks.md b/docs-chef-io/content/inspec/resources/azure_virtual_machine_disks.md index af1488b37..9f1da92de 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_machine_disks.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_machine_disks.md @@ -116,7 +116,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_machines.md b/docs-chef-io/content/inspec/resources/azure_virtual_machines.md index 40059e8f0..e19c6904a 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_machines.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_machines.md @@ -84,6 +84,7 @@ describe azure_virtual_machines(resource_group: 'MyResourceGroup') do it { should exist } end ``` + **Filters Based on Platform.** ```ruby @@ -124,7 +125,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network.md b/docs-chef-io/content/inspec/resources/azure_virtual_network.md index 634400d1c..fc1ba82ff 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network.md @@ -84,6 +84,7 @@ describe azure_virtual_network(resource_group: 'resource_group', name: 'MyVnetNa its('location') { should eq 'eastus' } end ``` + **Ensure that the Virtual Network's DNS Servers are Configured as Expected.** ```ruby @@ -91,6 +92,7 @@ describe azure_virtual_network(resource_group: 'resource_group', name: 'MyVnetNa its('dns_servers') { should eq ["192.168.0.6"] } end ``` + **Ensure that the Virtual Network's Address Space is Configured as Expected.** ```ruby @@ -101,7 +103,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md index 2bf8e47a3..2353c745e 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateway_connections.md @@ -120,7 +120,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateways.md b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateways.md index 353526dcd..856a7f754 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network_gateways.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network_gateways.md @@ -82,7 +82,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network_peering.md b/docs-chef-io/content/inspec/resources/azure_virtual_network_peering.md index ca6154e4a..c01fa34ba 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network_peering.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network_peering.md @@ -74,7 +74,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_network_peerings.md b/docs-chef-io/content/inspec/resources/azure_virtual_network_peerings.md index 8b76203cf..54347ded5 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_network_peerings.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_network_peerings.md @@ -65,6 +65,7 @@ describe azure_virtual_network_peerings(resource_group: 'MyResourceGroup', vnet: it { should exist } end ``` + **Filters the Results to Only Those that Match the Given Name.** ```ruby @@ -76,7 +77,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_networks.md b/docs-chef-io/content/inspec/resources/azure_virtual_networks.md index 72dc36cb7..d185d5d06 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_networks.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_networks.md @@ -79,6 +79,7 @@ describe azure_virtual_networks(resource_group: 'MyResourceGroup') do it { should exist } end ``` + **Filters the Results to Only Those that Match the Given Name (Client Side).** ```ruby @@ -95,6 +96,7 @@ describe azure_virtual_networks(resource_group: 'MyResourceGroup').where { name. it { should exist } end ``` + **Filters the Networks at Azure API to Only Those that Match the Given Name via Generic Resource (Recommended).** ```ruby @@ -114,7 +116,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_virtual_wans.md b/docs-chef-io/content/inspec/resources/azure_virtual_wans.md index 0354fa366..ab9a9b267 100644 --- a/docs-chef-io/content/inspec/resources/azure_virtual_wans.md +++ b/docs-chef-io/content/inspec/resources/azure_virtual_wans.md @@ -80,7 +80,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_web_app_function.md b/docs-chef-io/content/inspec/resources/azure_web_app_function.md index 13e8b2925..86f49c9fc 100644 --- a/docs-chef-io/content/inspec/resources/azure_web_app_function.md +++ b/docs-chef-io/content/inspec/resources/azure_web_app_function.md @@ -88,6 +88,7 @@ describe azure_web_app_function(resource_group: 'MyResourceGroup', site_name: 'f its('properties.language') { should eq 'Javascript' } end ``` + **Test <>.** ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_web_app_functions.md b/docs-chef-io/content/inspec/resources/azure_web_app_functions.md index aa4c46c78..34b2f0bb6 100644 --- a/docs-chef-io/content/inspec/resources/azure_web_app_functions.md +++ b/docs-chef-io/content/inspec/resources/azure_web_app_functions.md @@ -99,7 +99,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/content/inspec/resources/azure_webapp.md b/docs-chef-io/content/inspec/resources/azure_webapp.md index cadef6ebc..14b39f815 100644 --- a/docs-chef-io/content/inspec/resources/azure_webapp.md +++ b/docs-chef-io/content/inspec/resources/azure_webapp.md @@ -88,7 +88,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### Test Webapp to Ensure it's Using the Latest Supported Version of .NET ```ruby diff --git a/docs-chef-io/content/inspec/resources/azure_webapps.md b/docs-chef-io/content/inspec/resources/azure_webapps.md index 29e98af3b..66f99c1d7 100644 --- a/docs-chef-io/content/inspec/resources/azure_webapps.md +++ b/docs-chef-io/content/inspec/resources/azure_webapps.md @@ -77,7 +77,7 @@ end ## Matchers -This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [Universal Matchers page](https://www.inspec.io/docs/reference/matchers/). +{{% inspec_matchers_link %}} ### exists diff --git a/docs-chef-io/layouts/shortcodes/inspec_filter_table.md b/docs-chef-io/layouts/shortcodes/inspec_filter_table.md deleted file mode 100644 index 92b235679..000000000 --- a/docs-chef-io/layouts/shortcodes/inspec_filter_table.md +++ /dev/null @@ -1,8 +0,0 @@ - -
-

Note

-
-

See the documentation on FilterTable for information on using filter criteria on plural resources. -

-
-
From 362e2704e4c022dbaa8760fc54147ffe2c359acb Mon Sep 17 00:00:00 2001 From: Ian Maddaus Date: Thu, 10 Mar 2022 15:12:13 -0500 Subject: [PATCH 4/4] A few more changes: update resource template and add gitignore Signed-off-by: Ian Maddaus --- docs-chef-io/.gitignore | 5 +++++ docs-chef-io/archetypes/resource.md | 18 +++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 docs-chef-io/.gitignore diff --git a/docs-chef-io/.gitignore b/docs-chef-io/.gitignore new file mode 100644 index 000000000..52e5ef494 --- /dev/null +++ b/docs-chef-io/.gitignore @@ -0,0 +1,5 @@ +*.*~ +*~ + +chef-web-docs/ +.hugo_build.lock diff --git a/docs-chef-io/archetypes/resource.md b/docs-chef-io/archetypes/resource.md index 98ecd8fde..df6153118 100644 --- a/docs-chef-io/archetypes/resource.md +++ b/docs-chef-io/archetypes/resource.md @@ -1,20 +1,18 @@ +++ -title = "{{ .Name | humanize | title }} resource" +title = "{{ .Name }} resource" draft = false gh_repo = "inspec" platform = "azure" [menu] [menu.inspec] - title = "{{ .Name | humanize | title }}" - identifier = "inspec/resources/azure/{{ .Name | humanize | title }}" + title = "{{ .Name }}" + identifier = "inspec/resources/azure/{{ .Name }}" parent = "inspec/resources/azure" +++ +{{/* Run `hugo new -k resource inspec/resources/RESOURCE_NAME.md` to generate a new resource page. */}} - -{{% Run `hugo new -k resource resources/RESOURCE_NAME.md` to generate a new resource page. %}} - -Use the `{{ .Name | humanize | title }}` Chef InSpec audit resource to test properties of... +Use the `{{ .Name }}` Chef InSpec audit resource to test properties of... ## Azure REST API Version, Endpoint, and HTTP Client Parameters @@ -27,7 +25,9 @@ Use the `{{ .Name | humanize | title }}` Chef InSpec audit resource to test prop ## Syntax ```ruby +describe {{ .Name }} do +end ``` ## Parameters @@ -51,13 +51,17 @@ Use the `{{ .Name | humanize | title }}` Chef InSpec audit resource to test prop **EXAMPLE DESCRIPTION** ```ruby +describe {{ .Name }} do +end ``` **EXAMPLE DESCRIPTION** ```ruby +describe {{ .Name }} do +end ``` ## Matchers