diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..ec3e080919 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,91 @@ +# Add a Terraform label to changes under the related folders: +# +# Folder | Labels +# --------------------------- | ------------------------------------------------ +# terraform | Terraform CE +# terraform-cdk | None +# terraform-docs-agents | Terraform agents +# terraform-docs-common | HCP Terraform +# terraform-enterprise | Terraform Enterprise +# terraform-migrate | Terraform migrate +# terraform-plugin-framework | TF Plugin Framework +# terraform-plugin-log | None +# terraform-plugin-mux | None +# terraform-plugin-sdk | None +# terraform-plugin-testing | None + +Terraform CE: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform/**' + ] + +Terraform agents: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform/**' + ] + +HCP Terraform: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform/**' + ] + +Terraform Enterprise: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-enterprise/**' + ] + +Terraform migrate: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-docs-common/**' + ] + +TF Plugin Framework: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-plugin-framework/**' + ] + + +# Add 'Vault' label to changes under 'content/vault' +# +# Label | Rule +# --------------- | ------------------------------------------------------------ +# Vault | Default; applies to all doc updates +# Vault IC update | Updates on "Important changes" related docs + +Vault: +- any: + - changed-files: + - any-glob-to-any-file: ['content/vault/**'] + +Vault IC: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/vault/global/partials/important-changes/**', + 'content/vault/*/content/docs/updates/change-tracker.mdx', + 'content/vault/*/content/docs/updates/important-changes.mdx', + 'content/vault/*/content/docs/updates/lts-tracker.mdx' + ] + +# Add 'WAF' label to changes under 'content/well-architected-framework' +# +# Label | Rule +# --------------- | ------------------------------------------------------------ +# WAF | Default; applies to all doc updates + +WAF: +- any: + - changed-files: + - any-glob-to-any-file: ['content/well-architected-framework/**'] \ No newline at end of file diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml new file mode 100644 index 0000000000..062770b2d3 --- /dev/null +++ b/.github/workflows/create-release-pr.yml @@ -0,0 +1,44 @@ +name: Create publication PR +run-name: đŸĨŒ Create publication PR + +permissions: + pull-requests: write + +on: + workflow_dispatch: + inputs: + branchName: + required: true + description: >- + Release branch name + +env: + mergeTarget: "main" + prTitle: "[PUBLISH] ${{ github.event.inputs.branchName }}" + prBody: "Publication PR created by Github action" + +jobs: + create-pr: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Debugging data + run: | + echo "🚧 ${{ github.repository }} - Creating PR" + echo " - Release branch: ${{ github.event.inputs.branchName }}" + echo " - Merge target: ${{ github.base_ref }}" + - name: Check out repository code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Create pull request + run: | + gh pr create \ + --base ${{ env.mergeTarget }} \ + --head ${{ github.event.inputs.branchName }} \ + --title "${{ env.prTitle }}" \ + --body "${{ env.prBody }}" + - name: Wrap-up + run: | + echo "🍏 Final job status: ${{ job.status }}" diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 0000000000..563d272a5a --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,23 @@ +# Apply a product label based on the content files modified in the pull request +# and configuration details in .github/labeler.yml. +# +# For more information, see: https://github.com/actions/labeler + +name: đŸˇī¸ Label content PRs + +on: + pull_request: + types: [opened, synchronize, reopened] # Trigger on these events + +jobs: + + label-the-pr: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true \ No newline at end of file diff --git a/.github/workflows/release-branch-sync.yml b/.github/workflows/release-branch-sync.yml new file mode 100644 index 0000000000..69bb5059ba --- /dev/null +++ b/.github/workflows/release-branch-sync.yml @@ -0,0 +1,40 @@ +name: TESTING - Sync content release branches + +run-name: 🚀 ${{ github.actor }} is syncing ${{ github.event.inputs.product }} release branches + +on: + workflow_dispatch: + inputs: + product: + required: true + default: 'vault' + description: >- + Product slug (e.g., vault, hcp) + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + outputs: + mylist: ${{ steps.generate-matrix.outputs.mylist }} + steps: + - name: Check out repository code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Generate dynamic matrix + id: generate-matrix + run: | + echo "mylist=[$(git branch --list '${{ github.event.inputs.product }}/*')]" >> $GITHUB_OUTPUT + usematrix: + runs-on: ubuntu-latest + needs: [build] + strategy: + matrix: + branch-name: ${{ fromJson(needs.build.outputs.mylist) }} + steps: + - name: Dynamic matrix job + run: | + echo "Running job with input ${{ matrix.branch-name }}" \ No newline at end of file diff --git a/.github/workflows/vault-pr.yml b/.github/workflows/vault-pr.yml new file mode 100644 index 0000000000..e8cf08cd7d --- /dev/null +++ b/.github/workflows/vault-pr.yml @@ -0,0 +1,142 @@ +# Process Vault PRs: +# +# 1. Add a comment that explains when the changes will publish. +# 2. If the PR updates important changes, add a comment about updating the +# summary tables. + + +name: Process Vault PR +run-name: 🟡 Process Vault PR + +on: + pull_request_target: + types: [opened, synchronize, reopened] # Trigger on these events + paths: + - content/vault/** + +env: + yes: âœ”ī¸ + no: ❌ + idk: âšī¸ + monthlyPattern: 'vault/([0-9]{6})' + releasePattern: 'vault/1\.([0-9]{2})\.x' + +jobs: + + # Figure out the publication timeline based on the target branch + set-pub-timeline: + name: Set publication timeline + runs-on: ubuntu-latest + outputs: + mainSelect: ${{ steps.check-target.outputs.mainSelect }} + monthSelect: ${{ steps.check-target.outputs.monthSelect }} + releaseSelect: ${{ steps.check-target.outputs.releaseSelect }} + steps: + - name: Check target + id: check-target + run: | + if [[ "${{ github.base_ref }}" == "main" ]]; then + echo "mainSelect=${{ env.yes }}" >> "$GITHUB_OUTPUT" + echo "monthSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + echo "releaseSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + elif [[ "${{ github.base_ref }}" =~ ${{ env.monthlyPattern }} ]]; then + echo "mainSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + echo "monthSelect=${{ env.yes }}" >> "$GITHUB_OUTPUT" + echo "releaseSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + elif [[ "${{ github.base_ref }}" =~ ${{ env.releasePattern }} ]]; then + echo "mainSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + echo "monthSelect=${{ env.no }}" >> "$GITHUB_OUTPUT" + echo "releaseSelect=${{ env.yes }}" >> "$GITHUB_OUTPUT" + else + echo "mainSelect=${{ env.idk }}" >> "$GITHUB_OUTPUT" + echo "monthSelect=${{ env.idk }}" >> "$GITHUB_OUTPUT" + echo "releaseSelect=${{ env.idk }}" >> "$GITHUB_OUTPUT" + fi + + # Add a PR comment with the publication timeline + alert-pub-timeline: + name: Add publication comment + runs-on: ubuntu-latest + needs: set-pub-timeline + steps: + - name: Add publication notice + uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1 + with: + header: Publication notice + message: | + ## 🕛 Publication timeline + + Your content changes publish based on the merge target [`${{ github.base_ref }}`]. + If the timeline indicated below is inappropriate, please adjust the + merge target (base branch). + + Branch | Publication timeline | Selection + ----------------- | --------------------- | --------- + `main` | Immediately | ${{ needs.set-pub-timeline.outputs.mainSelect }} + `vault/YYYYMM` | End of the month | ${{ needs.set-pub-timeline.outputs.monthSelect }} + `vault/` | Next major release | ${{ needs.set-pub-timeline.outputs.releaseSelect }} + + # Check if the PR includes important changes updates + check-important-changes: + name: Check for 'Important changes' updates + runs-on: ubuntu-latest + outputs: + icComment: ${{ steps.check-ic.outputs.icComment }} + steps: + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + icUpdate: + - 'content/vault/*/content/docs/updates/important-changes.mdx' + icPartial: + - 'content/vault/global/partials/important-changes/breaking-changes/**' + - 'content/vault/global/partials/important-changes/new-behavior/**' + - 'content/vault/global/partials/important-changes/known-issue/**' + - 'content/vault/*/content/partials/know-issues/**' + summaries: + - 'content/vault/global/partials/important-changes/summary-tables/**' + - name: Check for IC update + id: check-ic + run: | + if [[ + "${{ steps.filter.outputs.icUpdate }}" == "true" && + "${{ steps.filter.outputs.summaries }}" == "false" + ]]; then + echo "icComment=add" >> "$GITHUB_OUTPUT" + else + echo "icComment=hide" >> "$GITHUB_OUTPUT" + fi + + # Add a PR comment about missing summary table updates + alert-important-changes-add: + name: Add IC change alert + runs-on: ubuntu-latest + needs: check-important-changes + if: needs.check-important-changes.outputs.icComment == 'add' + steps: + - name: Add comment + uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1 + with: + header: Important change alert + hide: true + hide_classify: "OUTDATED" + message: | + > [!IMPORTANT] + > + > PRs that update the "Important changes" page **must** update to relevant summary tables under: + > `content/vault/global/partials/important-changes/summary-tables/` + + # Hide the previous comment (if it exists) + alert-important-changes-remove: + name: Hide IC change alert + runs-on: ubuntu-latest + needs: check-important-changes + if: needs.check-important-changes.outputs.icComment == 'hide' + steps: + - name: Hide comment + uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1 + with: + header: Important change alert + hide: true + hide_classify: "RESOLVED" \ No newline at end of file diff --git a/content/vault/v1.20.x/content/docs/about-vault/how-vault-works.mdx b/content/vault/v1.20.x/content/docs/about-vault/how-vault-works.mdx index f94a5139dc..4d917667d9 100644 --- a/content/vault/v1.20.x/content/docs/about-vault/how-vault-works.mdx +++ b/content/vault/v1.20.x/content/docs/about-vault/how-vault-works.mdx @@ -7,6 +7,7 @@ description: >- # How Vault works +This is a change from vault/test Vault is an identity-based secrets and encryption management system that centralizes secret management, rotates old credentials, generates diff --git a/content/vault/v1.20.x/content/docs/updates/important-changes.mdx b/content/vault/v1.20.x/content/docs/updates/important-changes.mdx index 54bd0547c7..e1f676dfc0 100644 --- a/content/vault/v1.20.x/content/docs/updates/important-changes.mdx +++ b/content/vault/v1.20.x/content/docs/updates/important-changes.mdx @@ -19,6 +19,7 @@ valid_change_types: >- Always review important or breaking changes and remediation recommendations before upgrading Vault. +I updated this file --- ## Breaking changes