Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Non-SDK Specific Best Practices Documentation #1151

Closed
bflad opened this issue Feb 15, 2023 · 4 comments · Fixed by #1170
Closed

Migrate Non-SDK Specific Best Practices Documentation #1151

bflad opened this issue Feb 15, 2023 · 4 comments · Fixed by #1170
Assignees
Labels
documentation Improvements or additions to documentation tf-devex-triage Terraform DevEx project tracking
Milestone

Comments

@bflad
Copy link
Member

bflad commented Feb 15, 2023

Description

Now that terraform-plugin-framework is generally available and terraform-plugin-testing is released, we can expect that over time the traffic to the terraform-plugin-sdk website documentation (Terraform > Plugin Development > SDKv2) will begin to lessen. Inside the SDK website documentation is a "Best Practices" section which captures helpful information and consistency tips from the ecosystem over time. These pages are briefly described below.

Page Description
Overview Index page for others.
Naming Generic Resource, Data Source, and Attribute naming recommendations.
Depending on Providers Interfacing to Terraform Providers is expected to be Terraform CLI or gRPC, not Go code itself.
Deprecations, Removals, and Renames Semi-SDK specific information for how to handle breaking change situations in providers.
Detecting Drift Capture all state during refresh, update state after modification (unfortunately risky half-pattern), and SDK-specific error checking/helpers.
Handling Sensitive Data Use Sensitive attribute behavior, don't encrypt attribute values manually.
Testing Patterns Generic information about the provider testing framework, examples of common use case tests.
Versioning and Changelog Generic provider versioning and consistent changelog formatting.
Writing Non-Go Providers Policy and reasoning around HashiCorp only supporting the Go language at this time.

There is quite a bit of this information which is not specific to terraform-plugin-sdk, so it might make sense to migrate some of the content to other repositories, which hold other sections of the website content.

Proposal

In general, the steps for each page will be:

  • In the target repository, copy/migrate the new mdx content and ensure its deployed in production (either by product release or special release/website Git tag updates)
  • In terraform-website, introduce a redirect for the old URL path to the new URL page.
  • In terraform-plugin-sdk, update the side navigation to href the new page.
  • In terraform-plugin-sdk, remove the old mdx content

The proposed migration strategy for each page is:

Page Target Repository Target Navigation
Overview Each repository as necessary e.g. Plugin Development > Best Practices > Overview
Naming terraform-docs-common Plugin Development > Best Practices > Naming
Depending on Providers terraform-docs-common Plugin Development > Best Practices > Interacting with Providers
(SPLIT) Deprecations, Removals, and Renames terraform-plugin-sdk SDKv2 > Deprecations, Removals, and Renames
(SPLIT) Deprecations, Removals, and Renames terraform-plugin-framework Framework > Deprecations, Removals, and Renames
Detecting Drift TBD (terraform-plugin-framework?) TBD (may already be covered by Framework > Resources > Read?)
Handling Sensitive Data terraform-docs-common Plugin Development > Best Practices > Handling Sensitive Data
Testing Patterns terraform-plugin-testing Testing > Acceptance Testing > Patterns
Versioning and Changelog terraform-docs-common Plugin Development > Best Practices > Versioning and Changelog
Writing Non-Go Providers terraform-docs-common Plugin Development > Best Practices > Provider Code Language

References

@austinvalle
Copy link
Member

All PRs are open and ready for review, order of releases should be:

  1. terraform-docs-common should merge/deploy first (only adds new pages/navigation)
  2. terraform-website should merge/deploy next (redirect dependent on new pages added in step 1)
  3. terraform-plugin-framework should be next (new pages, relies on links from pages added in step 1)
  4. terraform-plugin-sdk last (deletes duplicate pages + removes pages in sidebar)

@bflad bflad added this to the v2.26.0 milestone Mar 15, 2023
@austinvalle
Copy link
Member

austinvalle commented Mar 17, 2023

@austinvalle austinvalle reopened this Mar 17, 2023
@austinvalle
Copy link
Member

All done 🚀

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation tf-devex-triage Terraform DevEx project tracking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants