From 3a8a7dea5de6219c857b8e34021d3e63274d1887 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Fri, 28 Apr 2023 01:28:09 +0100 Subject: [PATCH] Contributor docs: fix the build and use a stable tag for `mkdocs-deploy-gh-pages` action (#21580) --- .github/workflows/{mkdocs.yml => mkdocs.yaml} | 3 ++- .github/workflows/{provider-test.yml => provider-test.yaml} | 2 +- .gitignore | 3 +++ contributing/topics/guide-new-data-source.md | 4 ++-- contributing/topics/guide-new-resource.md | 4 ++-- contributing/topics/high-level-overview.md | 4 ++-- contributing/topics/reference-acceptance-testing.md | 4 ++-- 7 files changed, 14 insertions(+), 10 deletions(-) rename .github/workflows/{mkdocs.yml => mkdocs.yaml} (83%) rename .github/workflows/{provider-test.yml => provider-test.yaml} (98%) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yaml similarity index 83% rename from .github/workflows/mkdocs.yml rename to .github/workflows/mkdocs.yaml index aadb50ee1c7e..677f2818f21c 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yaml @@ -4,6 +4,7 @@ on: branches: - main paths: + - '.github/workflows/mkdocs.yaml' - 'contributing/**' workflow_dispatch: @@ -21,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Publish - uses: mhausenblas/mkdocs-deploy-gh-pages@master + uses: mhausenblas/mkdocs-deploy-gh-pages@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CONFIG_FILE: mkdocs.yml diff --git a/.github/workflows/provider-test.yml b/.github/workflows/provider-test.yaml similarity index 98% rename from .github/workflows/provider-test.yml rename to .github/workflows/provider-test.yaml index 29e9f5a0b19c..14873ae9b3ec 100644 --- a/.github/workflows/provider-test.yml +++ b/.github/workflows/provider-test.yaml @@ -4,7 +4,7 @@ on: pull_request: types: ["opened", "synchronize"] paths: - - ".github/workflows/provider-test.yml" + - '.github/workflows/provider-test.yaml' - 'internal/**.go' - 'vendor/github.com/hashicorp/go-azure-sdk/sdk/auth/**' - 'vendor/github.com/hashicorp/go-azure-sdk/sdk/environments/**' diff --git a/.gitignore b/.gitignore index 78dcda932f31..d66003bb9a31 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ website/vendor .vscode/ +# mkdocs output +site/ + # Test exclusions !command/test-fixtures/**/*.tfstate !command/test-fixtures/**/.terraform/ diff --git a/contributing/topics/guide-new-data-source.md b/contributing/topics/guide-new-data-source.md index b77765e7b9fa..65fd95d90854 100755 --- a/contributing/topics/guide-new-data-source.md +++ b/contributing/topics/guide-new-data-source.md @@ -97,7 +97,7 @@ package resource In this case, you need to specify the `name` the Resource (in this case `ResourceGroupExample`) and the `id` which is an example of this Resource ID (in this case `/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1`). -> The segments of the Resource ID should be camelCased (e.g. `resourceGroups` rather than `resourcegroups`) per the Azure API Specification - see [the Azure Resource ID reference](reference-azure-resource-ids.md) for more information. +> The segments of the Resource ID should be camelCased (e.g. `resourceGroups` rather than `resourcegroups`) per the Azure API Specification - see [Azure Resource IDs in the Glossary](reference-glossary.md#azure-resource-ids) for more information. You can generate the Resource ID Struct, Parser and Validation functions by running `make generate` - which will output the following files: @@ -105,7 +105,7 @@ You can generate the Resource ID Struct, Parser and Validation functions by runn * `./internal/service/resource/parse/resource_group_example_test.go` - contains tests for those ^. * `./internal/service/resource/validate/resource_group_example_id.go` - contains Terraform validation functions for the Resource ID. -These types can then be used in the Data Source we're creating below, but [see this link for more information on how Azure Resource ID's are used in Terraform](reference-azure-resource-ids.md). +These types can then be used in the Data Source we're creating below. ### Step 4: Scaffold an empty/new Data Source diff --git a/contributing/topics/guide-new-resource.md b/contributing/topics/guide-new-resource.md index adbd8ad2db11..a6b7e313d28e 100755 --- a/contributing/topics/guide-new-resource.md +++ b/contributing/topics/guide-new-resource.md @@ -95,7 +95,7 @@ package resource In this case, you need to specify the `name` the Resource (in this case `ResourceGroupExample`) and the `id` which is an example of this Resource ID (in this case `/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1`). -> The segments of the Resource ID should be camelCased (e.g. `resourceGroups` rather than `resourcegroups`) per the Azure API Specification - see [the Azure Resource ID reference](reference-azure-resource-ids.md) for more information. +> The segments of the Resource ID should be camelCased (e.g. `resourceGroups` rather than `resourcegroups`) per the Azure API Specification - see [Azure Resource IDs in the Glossary](reference-glossary.md#azure-resource-ids) for more information. You can generate the Resource ID Struct, Parser and Validation functions by running `make generate` - which will output the following files: @@ -103,7 +103,7 @@ You can generate the Resource ID Struct, Parser and Validation functions by runn * `./internal/service/resource/parse/resource_group_example_test.go` - contains tests for those ^. * `./internal/service/resource/validate/resource_group_example_id.go` - contains Terraform validation functions for the Resource ID. -These types can then be used in the Resource we're creating below, but [see this link for more information on how Azure Resource ID's are used in Terraform](reference-azure-resource-ids.md). +These types can then be used in the Resource we're creating below. ### Step 4: Scaffold an empty/new Resource diff --git a/contributing/topics/high-level-overview.md b/contributing/topics/high-level-overview.md index 93affb57c417..f1a1be08b6c4 100755 --- a/contributing/topics/high-level-overview.md +++ b/contributing/topics/high-level-overview.md @@ -80,7 +80,7 @@ Some Service Packages may also contain: * `./migration` - any State Migrations used in Resources. * `./sdk` - any Embedded SDK’s used to access the Azure API’s (either Resource Manager or Data Plane). -* `./resourceids.go` - used to generate Resource ID Formatters, Parsers and Validators, see [Resource ID Generation](resource-id-generation.md) for more information. +* `./resourceids.go` - used to generate Resource ID Formatters, Parsers and Validators. —- @@ -123,4 +123,4 @@ At this point in time, each of the SDKs mentioned above (excluding Hamilton) mak Since the behaviour of the Azure API can change over time, the Provider leans on Acceptance Tests over Unit Tests for asserting that the Data Sources and Resources within the Provider work as expected. -More details and guidance on how to test Data Sources/Resources can be found in [the Acceptance Testing reference](reference-acceptance-testing.md). \ No newline at end of file +More details and guidance on how to test Data Sources/Resources can be found in [the Acceptance Testing reference](reference-acceptance-testing.md). diff --git a/contributing/topics/reference-acceptance-testing.md b/contributing/topics/reference-acceptance-testing.md index 5877f2285424..d36abf18fa76 100755 --- a/contributing/topics/reference-acceptance-testing.md +++ b/contributing/topics/reference-acceptance-testing.md @@ -111,7 +111,7 @@ At a minimum, a Resource requires: * A `basic` test ([Example](#Example---Basic---Resource)) - this tests the minimum fields (e.g. all Required fields) for this Resource. -* A `requiresImport` test ([Example](#Example---Resource---Requires-Import)) - this test exercises the logic in the `create` function of a resource that checks for the prior existence of the resource and being created and expects an error. See [requires-import](requires-import.md). The acceptance test package provides a helper function is provided to be used in the test, called `RequiresImportErrorStep` for this purpose. +* A `requiresImport` test ([Example](#Example---Resource---Requires-Import)) - this test exercises the logic in the `create` function of a resource that checks for the prior existence of the resource and being created and expects an error. The acceptance test package provides a helper function is provided to be used in the test, called `RequiresImportErrorStep` for this purpose. * A `complete` test ([Example](#Example---Resource---Complete)) - this tests all possible fields (e.g. all Required/Optional fields) for this Resource. @@ -351,4 +351,4 @@ resource "azurerm_example_resource" "example" { } `, data.Locations.Primary) } -``` \ No newline at end of file +```