From 08a1d1a5ca57385b9dce10478119edc4202f77e3 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:10:49 -0700 Subject: [PATCH 1/3] feat: add redirects.js from terraform-website --- website/redirects.js | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 website/redirects.js diff --git a/website/redirects.js b/website/redirects.js new file mode 100644 index 000000000..54e8babcc --- /dev/null +++ b/website/redirects.js @@ -0,0 +1,86 @@ +/** + * Redirects in this file are intended to be for documentation content only. The redirects will be applied to developer.hashicorp.com. + */ +module.exports = [ + // Redirects for restructured Terraform Plugin Framework docs for GA release of the Framework + // - https://github.com/hashicorp/terraform-plugin-framework/pull/554 + // - https://github.com/hashicorp/terraform-docs-common/pull/252 + { + source: "/terraform/plugin/which-sdk", + destination: "/terraform/plugin/framework-benefits", + permanent: true, + }, + { + source: "/terraform/plugin/framework/schemas", + destination: "/terraform/plugin/framework/handling-data/schemas", + permanent: true, + }, + { + source: "/terraform/plugin/framework/types", + destination: "/terraform/plugin/framework/handling-data/attributes", + permanent: true, + }, + { + source: "/terraform/plugin/framework/paths", + destination: "/terraform/plugin/framework/handling-data/paths", + permanent: true, + }, + { + source: "/terraform/plugin/framework/path-expressions", + destination: "/terraform/plugin/framework/handling-data/path-expressions", + permanent: true, + }, + { + source: "/terraform/plugin/framework/accessing-values", + destination: "/terraform/plugin/framework/handling-data/accessing-values", + permanent: true, + }, + { + source: "/terraform/plugin/framework/writing-state", + destination: "/terraform/plugin/framework/handling-data/writing-state", + permanent: true, + }, + { + source: "/terraform/cloud-docs/workspaces/naming", + destination: "/terraform/cloud-docs/workspaces/creating", + permanent: true, + }, + // Moving TF Plugin Development best practice info + // - https://github.com/hashicorp/terraform-plugin-sdk/issues/1151 + { + source: "/terraform/plugin/sdkv2/best-practices/other-languages", + destination: "/terraform/plugin/best-practices/provider-code", + permanent: true, + }, + { + source: "/terraform/plugin/sdkv2/best-practices/testing", + destination: "/terraform/plugin/testing/testing-patterns", + permanent: true, + }, + { + source: "/terraform/plugin/sdkv2/best-practices/versioning", + destination: "/terraform/plugin/best-practices/versioning", + permanent: true, + }, + { + source: "/terraform/plugin/sdkv2/best-practices/sensitive-state", + destination: "/terraform/plugin/best-practices/sensitive-state", + permanent: true, + }, + { + source: "/terraform/plugin/sdkv2/best-practices/depending-on-providers", + destination: "/terraform/plugin/best-practices/interacting-with-providers", + permanent: true, + }, + { + source: "/terraform/plugin/sdkv2/best-practices/naming", + destination: "/terraform/plugin/best-practices/naming", + permanent: true, + }, + { + source: "/terraform/plugin/hashicorp-provider-design-principles", + destination: + "/terraform/plugin/best-practices/hashicorp-provider-design-principles", + permanent: true, + }, +]; From 6db42c102a2f8fd5629b18cccb65ea3a214485d4 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:14:07 -0700 Subject: [PATCH 2/3] fix: update PR template instructions for redirects --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 10e2f575f..cebbf2d07 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,7 +17,7 @@ _If items do not apply to your changes, add (N/A) and mark them as complete._ - [ ] Description links to related pull requests or issues, if any. #### Content -- [ ] Redirects have been added for moved, renamed, or deleted pages. This requires a separate PR in the [`terraform-website` repository](https://github.com/hashicorp/terraform-website) `redirects.next.js` file. +- [ ] Redirects have been added to `website/redirects.js` for moved, renamed, or deleted pages. - [ ] API documentation and the API Changelog have been updated. - [ ] Links to related content where appropriate (e.g., API endpoints, permissions, etc.). - [ ] Pages with related content are updated and link to this content when appropriate. From 728a578ed252a30c3b8c0f35dab24a7c21958e22 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Thu, 29 Jun 2023 11:40:44 -0700 Subject: [PATCH 3/3] docs: update readme on new redirects location --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 728adc135..65b2799bf 100644 --- a/README.md +++ b/README.md @@ -327,4 +327,4 @@ In markdown, images should be referenced by their absolute path, starting with ` ## Redirects -Handle all redirects in this file in the `terraform-website` repository: [redirects.js](https://github.com/hashicorp/terraform-website/blob/master/redirects.js) +Handle all redirects in this file: [redirects.js](/website/redirects.js).