docs(compute-envs): make IAM policies downloadable and source from JSON files#1434
Conversation
…ON files Extract the inline "Full permissive policy" JSON blocks on the AWS Batch, EKS, and AWS Cloud compute environment pages (platform-cloud) into co-located .json files imported via Rspack's `?raw` query. Each <details> block now renders from the same file that users can download, eliminating drift between the rendered example and any copy-paste artifact. Also fixes a pre-existing copy-paste error in the Seqera Intelligent Compute policy where line 526-527 of aws-cloud.md had a duplicate `"Action": [` line, making the JSON invalid. Normalized tabs to spaces in the same policy. Drops the .md extension on internal links to the renamed pages from resource-labels/overview.md (the .md extension would now mis-resolve). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for seqera-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ocks Surface the download as a sibling of the collapsible rather than hiding it inside the expanded section, so users can grab the JSON without expanding. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bebosudo
left a comment
There was a problem hiding this comment.
I restarted the netlify deployment which ran out of memory on the first try.
The change looks good to me: https://deploy-preview-1434--seqera-docs.netlify.app/platform-cloud/compute-envs/aws-batch#required-platform-iam-permissions
|
Nice. Could we rename the section to something like 'Example IAM Policies' for clarity? Also as Intelligent Compute is not yet released, can we exclude it from the release or hide it? @justinegeffen |
|
@MichaelTansiniSeqera there was a discussion around Intelligent compute and the decision was to include it with an Alpha / Early Access preview admonition and to speak to an account manager around interest. Will see how "Default / Example Iam works" |
|
fix formatting |
|
@copilot resolve the merge conflicts in this pull request |
…ownloadable # Conflicts: # platform-cloud/docs/compute-envs/aws-cloud.mdx Co-authored-by: justinegeffen <4223530+justinegeffen@users.noreply.github.com>
Merge conflicts resolved in commit |
|
@gavinelder, I've merged this but wanted to check if we should replicate the changes in the enterprise docs? |
Summary
Refactors the inline IAM policy
<details>blocks on the AWS compute environment pages (platform-cloud) so they are:Download <name>.jsonlink next to the rendered code, served by Docusaurus as a fingerprinted asset.Pages migrated
compute-envs/aws-batch.mdx(was.md)compute-envs/eks.mdx(was.md)compute-envs/aws-cloud.mdx(was.md)New JSON sources live under
platform-cloud/docs/compute-envs/_policies/. The_prefix keeps Docusaurus from treating them as standalone pages.Drive-by fix
The Seqera Intelligent Compute policy in
aws-cloud.mdhad a duplicate"Action": [line (previously L526-527), making the JSON invalid. The downloadable version is now valid — and tabs are normalized to spaces.How it works
Rspack's built-in
?rawimport bypasses the JSON parser and gives us the file contents as a string:Note: The existing repo pattern (
!!raw-loader!./file.yamlinseqerakit/templates.mdx) doesn't work for.jsonbecause Rspack's built-in JSON parser intercepts first.?rawis the working pattern for JSON.Out of scope (intentional)
platform-enterprise_docs/compute-envs/(aws-batch.md,eks.md,aws-cloud.md) still use the old inline-JSON pattern. They have the same broken SIC JSON. Will follow up in a separate PR.gke.md's<details>block is shell commands + prose, not a JSON policy — left alone.platform-enterprise_versioned_docs/version-25.3/...) are frozen, untouched.Test plan
yarn buildsucceeds, no new warnings introduced.python3 -m json.tool./platform-cloud/compute-envs/aws-batch/,/eks/, and/aws-cloud/contains the expanded JSON content plus a fingerprinted asset URL (/assets/files/<name>-<hash>.json).<details>block, verify rendered JSON matches and the download link returns a valid.jsonfile.compute-envs/aws-batch.md/eks.md/aws-cloud.mdwith the.mdextension (resource-labels was the only known offender and is fixed here).🤖 Generated with Claude Code