@jjrawlins/cdk-diff-pr-github-action 0.0.72 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.jsii CHANGED
@@ -3549,7 +3549,7 @@
3549
3549
  },
3550
3550
  "name": "@jjrawlins/cdk-diff-pr-github-action",
3551
3551
  "readme": {
3552
- "markdown": "# cdk-diff-pr-github-action\n\nA small Projen-based helper library that wires GitHub workflows for:\n- Creating CloudFormation Change Sets for your CDK stacks on pull requests and commenting a formatted diff back on the PR.\n- Detecting CloudFormation drift on a schedule or manual trigger and producing a consolidated summary (optionally creating an issue).\n\nIt also provides ready‑to‑deploy IAM templates with the minimal permissions required for each workflow.\n\nThis package exposes four constructs:\n\n- `CdkDiffStackWorkflow` — Generates one GitHub Actions workflow per stack to create a change set and render the diff back to the PR and Step Summary.\n- `CdkDiffIamTemplate` — Emits a CloudFormation template file with minimal permissions for the Change Set workflow.\n- `CdkDriftDetectionWorkflow` — Generates a GitHub Actions workflow to detect CloudFormation drift per stack, upload machine‑readable results, and aggregate a summary.\n- `CdkDriftIamTemplate` — Emits a CloudFormation template file with minimal permissions for the Drift Detection workflow.\n\n## Quick start\n\n1) Add the constructs to your Projen project (in `.projenrc.ts`).\n2) Synthesize with `npx projen`.\n3) Commit the generated files.\n4) Open a pull request or run the drift detection workflow.\n\n## Usage: CdkDiffStackWorkflow\n\n`CdkDiffStackWorkflow` renders a workflow per stack named `diff-<StackName>.yml` under `.github/workflows/`. It also generates a helper script at `.github/workflows/scripts/describe-cfn-changeset.ts` that formats the change set output and takes care of posting the PR comment and Step Summary.\n\nExample `.projenrc.ts`:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDiffStackWorkflow } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ... your usual settings ...\n workflowName: 'my-lib',\n defaultReleaseBranch: 'main',\n cdkVersion: '2.85.0',\n github: true,\n});\n\nnew CdkDiffStackWorkflow({\n project,\n stacks: [\n {\n stackName: 'MyAppStack',\n changesetRoleToAssumeArn: 'arn:aws:iam::123456789012:role/cdk-diff-role',\n changesetRoleToAssumeRegion: 'us-east-1',\n // Optional per‑stack OIDC override (if not using the defaults below)\n // oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n // oidcRegion: 'us-east-1',\n },\n ],\n // Default OIDC role/region used by all stacks unless overridden per‑stack\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: Node version used in the workflow (default: '24.x')\n // nodeVersion: '24.x',\n // Optional: Yarn command to run CDK (default: 'cdk')\n // cdkYarnCommand: 'cdk',\n // Optional: Where to place the helper script (default: '.github/workflows/scripts/describe-cfn-changeset.ts')\n // scriptOutputPath: '.github/workflows/scripts/describe-cfn-changeset.ts',\n});\n\nproject.synth();\n```\n\n### CdkDiffStackWorkflow props\n- `project` (required) — Your Projen project instance.\n- `stacks` (required) — Array of stack entries.\n- `oidcRoleArn` (required unless provided per‑stack) — Default OIDC role ARN.\n- `oidcRegion` (required unless provided per‑stack) — Default OIDC region.\n- `nodeVersion` (optional, default `'24.x'`) — Node.js version for the workflow runner.\n- `cdkYarnCommand` (optional, default `'cdk'`) — Yarn script/command to invoke CDK.\n- `scriptOutputPath` (optional, default `'.github/workflows/scripts/describe-cfn-changeset.ts'`) — Where to write the helper script.\n\nIf neither top‑level OIDC defaults nor all per‑stack values are supplied, the construct throws a helpful error.\n\n### Stack item fields\n- `stackName` (required) — The CDK stack name to create the change set for.\n- `changesetRoleToAssumeArn` (required) — The ARN of the role used to create the change set (role chaining after OIDC).\n- `changesetRoleToAssumeRegion` (required) — The region for that role.\n- `oidcRoleArn` (optional) — Per‑stack override for the OIDC role.\n- `oidcRegion` (optional) — Per‑stack override for the OIDC region.\n\n### What gets generated\n- `.github/workflows/diff-<StackName>.yml` — One workflow per stack, triggered on PR open/sync/reopen.\n- `.github/workflows/scripts/describe-cfn-changeset.ts` — A helper script that:\n - Polls `DescribeChangeSet` until terminal\n - Filters out ignorable logical IDs or resource types using environment variables `IGNORE_LOGICAL_IDS` and `IGNORE_RESOURCE_TYPES`\n - Renders an HTML table with actions, logical IDs, types, replacements, and changed properties\n - Prints the HTML, appends to the GitHub Step Summary, and (if `GITHUB_TOKEN` and `GITHUB_COMMENT_URL` are present) posts a PR comment\n\n### Environment variables used by the change set script\n- `STACK_NAME` (required) — Stack name to describe.\n- `CHANGE_SET_NAME` (default: same as `STACK_NAME`).\n- `AWS_REGION` — Region for CloudFormation API calls. The workflow sets this via the credentials action(s).\n- `GITHUB_TOKEN` (optional) — If set with `GITHUB_COMMENT_URL`, posts a PR comment.\n- `GITHUB_COMMENT_URL` (optional) — PR comments URL.\n- `GITHUB_STEP_SUMMARY` (optional) — When present, appends the HTML to the step summary file.\n- `IGNORE_LOGICAL_IDS` (optional) — Comma‑separated logical IDs to ignore (default includes `CDKMetadata`).\n- `IGNORE_RESOURCE_TYPES` (optional) — Comma‑separated resource types to ignore (e.g., `AWS::CDK::Metadata`).\n\n## Usage: CdkDiffIamTemplate\n\nEmit an example IAM template you can deploy in your account for the Change Set workflow:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDiffIamTemplate } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ...\n});\n\nnew CdkDiffIamTemplate({\n project,\n roleName: 'cdk-diff-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: custom output path (default: 'cdk-diff-workflow-iam-template.yaml')\n // outputPath: 'infra/cdk-diff-iam.yaml',\n});\n\nproject.synth();\n```\n\nThis writes `cdk-diff-workflow-iam-template.yaml` at the project root (or your chosen `outputPath`). The template defines:\n- Parameter `GitHubOIDCRoleArn` with a default from `oidcRoleArn` — the ARN of your existing GitHub OIDC role allowed to assume the change set role.\n- IAM role `CdkChangesetRole` with minimal permissions for:\n - CloudFormation Change Set operations\n - Access to common CDK bootstrap S3 buckets and SSM parameters\n - `iam:PassRole` to `cloudformation.amazonaws.com`\n- Outputs exporting the role name and ARN.\n\nA Projen task is also added:\n\n```bash\nnpx projen deploy-cdkdiff-iam-template -- --parameter-overrides GitHubOIDCRoleArn=... # plus any extra AWS CLI args\n```\n\nUse the created role ARN as `changesetRoleToAssumeArn` in `CdkDiffStackWorkflow`.\n\n---\n\n## Usage: CdkDriftDetectionWorkflow\n\n`CdkDriftDetectionWorkflow` creates a single workflow file (default `drift-detection.yml`) that can run on a schedule and via manual dispatch. It generates a helper script at `.github/workflows/scripts/detect-drift.ts` (by default) that uses AWS SDK v3 to run drift detection, write optional machine‑readable JSON, and print an HTML report for the Step Summary.\n\nExample `.projenrc.ts`:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDriftDetectionWorkflow } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({ github: true, /* ... */ });\n\nnew CdkDriftDetectionWorkflow({\n project,\n workflowName: 'Drift Detection', // optional; file name derived as 'drift-detection.yml'\n schedule: '0 1 * * *', // optional cron\n createIssues: true, // default true; create/update issue when drift detected on schedule\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: Node version (default '24.x')\n // nodeVersion: '24.x',\n // Optional: Where to place the helper script (default '.github/workflows/scripts/detect-drift.ts')\n // scriptOutputPath: '.github/workflows/scripts/detect-drift.ts',\n stacks: [\n {\n stackName: 'MyAppStack-Prod',\n driftDetectionRoleToAssumeArn: 'arn:aws:iam::123456789012:role/cdk-drift-role',\n driftDetectionRoleToAssumeRegion: 'us-east-1',\n // failOnDrift: true, // optional (default true)\n },\n ],\n});\n\nproject.synth();\n```\n\n### CdkDriftDetectionWorkflow props\n- `project` (required) — Your Projen project instance.\n- `stacks` (required) — Array of stacks to check.\n- `oidcRoleArn` (required) — Default OIDC role ARN used before chaining into per‑stack drift roles.\n- `oidcRegion` (required) — Default OIDC region.\n- `workflowName` (optional, default `'drift-detection'`) — Human‑friendly workflow name; the file name is derived in kebab‑case.\n- `schedule` (optional) — Cron expression for automatic runs.\n- `createIssues` (optional, default `true`) — When true, scheduled runs will create/update a GitHub issue if drift is detected.\n- `nodeVersion` (optional, default `'24.x'`) — Node.js version for the runner.\n- `scriptOutputPath` (optional, default `'.github/workflows/scripts/detect-drift.ts'`) — Where to write the helper script.\n\n### Per‑stack fields\n- `stackName` (required) — The full CloudFormation stack name.\n- `driftDetectionRoleToAssumeArn` (required) — Role to assume (after OIDC) for making drift API calls.\n- `driftDetectionRoleToAssumeRegion` (required) — Region for that role and API calls.\n- `failOnDrift` (optional, default `true`) — Intended to fail the detection step on drift. The provided script exits with non‑zero when drift is found; the job continues to allow artifact upload and issue creation.\n\n### What gets generated\n- `.github/workflows/<kebab(workflowName)>.yml` — A workflow with one job per stack plus a final summary job.\n- `.github/workflows/scripts/detect-drift.ts` — Helper script that:\n - Starts drift detection and polls until completion\n - Lists non‑`IN_SYNC` resources and builds an HTML report\n - Writes optional JSON to `DRIFT_DETECTION_OUTPUT` when set\n - Prints to stdout and appends to the GitHub Step Summary when available\n\n### Artifacts and summary\n- Each stack job uploads `drift-results-<stack>.json` (if produced).\n- A final `Drift Detection Summary` job downloads all artifacts and prints a consolidated summary.\n\n### Manual dispatch\n- The workflow exposes an input named `stack` with choices including each configured stack and an `all` option.\n- Choose a specific stack to run drift detection for that stack only, or select `all` (or leave the input empty) to run all stacks.\n\nNote: The default workflow does not post PR comments for drift. It can create/update an Issue on scheduled runs when `createIssues` is `true`.\n\n### Post-notification steps (e.g., Slack)\n\nYou can add your own GitHub Action steps to run after the drift detection step for each stack using `postGitHubSteps`.\nProvide your own Slack payload/markdown (this library no longer generates a payload step for you).\n\nOption A: slackapi/slack-github-action (Incoming Webhook, official syntax)\n\n```ts\nnew CdkDriftDetectionWorkflow({\n project,\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n stacks: [/* ... */],\n postGitHubSteps: ({ stack }) => {\n // Build a descriptive name per stack\n const name = `Notify Slack (${stack} post-drift)`;\n const step = {\n name,\n uses: 'slackapi/slack-github-action@v2.1.1',\n // by default, post steps run only when drift is detected; you can override `if`\n if: \"always() && steps.drift.outcome == 'failure'\",\n // Use official inputs: webhook + webhook-type, and a YAML payload with blocks\n with: {\n webhook: '${{ secrets.CDK_NOTIFICATIONS_SLACK_WEBHOOK }}',\n 'webhook-type': 'incoming-webhook',\n payload: [\n 'text: \"** ${{ env.STACK_NAME }} ** has drifted!\"',\n 'blocks:',\n ' - type: \"section\"',\n ' text:',\n ' type: \"mrkdwn\"',\n ' text: \"*Stack:* ${{ env.STACK_NAME }} (region ${{ env.AWS_REGION }}) has drifted:exclamation:\"',\n ' - type: \"section\"',\n ' fields:',\n ' - type: \"mrkdwn\"',\n ' text: \"*Stack ARN*\\\\n${{ steps.drift.outputs.stack-arn }}\"',\n ' - type: \"mrkdwn\"',\n ' text: \"*Issue*\\\\n<${{ github.server_url }}/${{ github.repository }}/issues/${{ steps.issue.outputs.result }}|#${{ steps.issue.outputs.result }}>\"',\n ].join('\\n'),\n },\n };\n return [step];\n },\n});\n```\n\nNote: The Issue link requires `createIssues: true` (default) so that the `Create Issue on Drift` step runs before this Slack step and exposes `steps.issue.outputs.result`. This library orders the steps accordingly.\n\nDetails:\n- `postGitHubSteps` can be:\n - an array of step objects, or\n - a factory function `({ stack }) => step | step[]`.\n- Each step you provide is inserted after the results are uploaded.\n- Default condition: if you do not set `if` on your step, it will default to `always() && steps.drift.outcome == 'failure'`.\n- Available context/env you can use:\n - `${{ env.STACK_NAME }}`, `${{ env.DRIFT_DETECTION_OUTPUT }}`\n - `${{ steps.drift.outcome }}` — success/failure of the detect step\n - `${{ steps.drift.outputs.stack-arn }}` — Stack ARN resolved at runtime\n - `${{ steps.issue.outputs.result }}` — Issue number if the workflow created/found one (empty when not applicable)\n```\n\n## Usage: CdkDriftIamTemplate\n\nEmit an example IAM template you can deploy in your account for the Drift Detection workflow:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDriftIamTemplate } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ...\n});\n\nnew CdkDriftIamTemplate({\n project,\n roleName: 'cdk-drift-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: custom output path (default: 'cdk-drift-workflow-iam-template.yaml')\n // outputPath: 'infra/cdk-drift-iam.yaml',\n});\n\nproject.synth();\n```\n\nThis writes `cdk-drift-workflow-iam-template.yaml` at the project root (or your chosen `outputPath`). The template defines:\n- Parameter `GitHubOIDCRoleArn` with a default from `oidcRoleArn` — the ARN of your existing GitHub OIDC role allowed to assume this drift role.\n- IAM role `CdkDriftRole` with minimal permissions for CloudFormation drift detection operations.\n- Outputs exporting the role name and ARN.\n\nA Projen task is also added:\n\n```bash\nnpx projen deploy-cdkdrift-iam-template -- --parameter-overrides GitHubOIDCRoleArn=... # plus any extra AWS CLI args\n```\n\n## Testing\n\nThis repository includes Jest tests that snapshot the synthesized outputs from Projen and assert that:\n- Diff workflows are created per stack and contain all expected steps.\n- Drift detection workflow produces one job per stack and a summary job.\n- Only one helper script file is generated per workflow type.\n- Per‑stack OIDC overrides (where supported) are respected.\n- Helpful validation errors are thrown for missing OIDC settings.\n- The IAM template files contain the expected resources and outputs.\n\nRun tests with:\n\n```bash\nyarn test\n```\n\n## Notes\n- This package assumes your repository is configured with GitHub Actions and that you have a GitHub OIDC role configured in AWS.\n- The generated scripts use the AWS SDK v3 for CloudFormation and, where applicable, the GitHub REST API.\n"
3552
+ "markdown": "# cdk-diff-pr-github-action\n\nA library that provides GitHub workflows and IAM templates for:\n- Creating CloudFormation Change Sets for your CDK stacks on pull requests and commenting a formatted diff back on the PR.\n- Detecting CloudFormation drift on a schedule or manual trigger and producing a consolidated summary (optionally creating an issue).\n- Deploying IAM roles across AWS Organizations using StackSets.\n\nIt also provides ready‑to‑deploy IAM templates with the minimal permissions required for each workflow.\n\n**Works with or without Projen** — The StackSet generator can be used standalone in any Node.js project.\n\nThis package exposes five constructs:\n\n- `CdkDiffStackWorkflow` — Generates one GitHub Actions workflow per stack to create a change set and render the diff back to the PR and Step Summary.\n- `CdkDiffIamTemplate` — Emits a CloudFormation template file with minimal permissions for the Change Set workflow.\n- `CdkDriftDetectionWorkflow` — Generates a GitHub Actions workflow to detect CloudFormation drift per stack, upload machine‑readable results, and aggregate a summary.\n- `CdkDriftIamTemplate` — Emits a CloudFormation template file with minimal permissions for the Drift Detection workflow.\n- `CdkDiffIamTemplateStackSet` — Creates a CloudFormation StackSet template for org-wide deployment of GitHub OIDC and IAM roles (Projen integration).\n- `CdkDiffIamTemplateStackSetGenerator` — Pure generator class for StackSet templates (no Projen dependency).\n\n## Quick start\n\n1) Add the constructs to your Projen project (in `.projenrc.ts`).\n2) Synthesize with `npx projen`.\n3) Commit the generated files.\n4) Open a pull request or run the drift detection workflow.\n\n## Usage: CdkDiffStackWorkflow\n\n`CdkDiffStackWorkflow` renders a workflow per stack named `diff-<StackName>.yml` under `.github/workflows/`. It also generates a helper script at `.github/workflows/scripts/describe-cfn-changeset.ts` that formats the change set output and takes care of posting the PR comment and Step Summary.\n\nExample `.projenrc.ts`:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDiffStackWorkflow } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ... your usual settings ...\n workflowName: 'my-lib',\n defaultReleaseBranch: 'main',\n cdkVersion: '2.85.0',\n github: true,\n});\n\nnew CdkDiffStackWorkflow({\n project,\n stacks: [\n {\n stackName: 'MyAppStack',\n changesetRoleToAssumeArn: 'arn:aws:iam::123456789012:role/cdk-diff-role',\n changesetRoleToAssumeRegion: 'us-east-1',\n // Optional per‑stack OIDC override (if not using the defaults below)\n // oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n // oidcRegion: 'us-east-1',\n },\n ],\n // Default OIDC role/region used by all stacks unless overridden per‑stack\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: Node version used in the workflow (default: '24.x')\n // nodeVersion: '24.x',\n // Optional: Yarn command to run CDK (default: 'cdk')\n // cdkYarnCommand: 'cdk',\n // Optional: Where to place the helper script (default: '.github/workflows/scripts/describe-cfn-changeset.ts')\n // scriptOutputPath: '.github/workflows/scripts/describe-cfn-changeset.ts',\n});\n\nproject.synth();\n```\n\n### CdkDiffStackWorkflow props\n- `project` (required) — Your Projen project instance.\n- `stacks` (required) — Array of stack entries.\n- `oidcRoleArn` (required unless provided per‑stack) — Default OIDC role ARN.\n- `oidcRegion` (required unless provided per‑stack) — Default OIDC region.\n- `nodeVersion` (optional, default `'24.x'`) — Node.js version for the workflow runner.\n- `cdkYarnCommand` (optional, default `'cdk'`) — Yarn script/command to invoke CDK.\n- `scriptOutputPath` (optional, default `'.github/workflows/scripts/describe-cfn-changeset.ts'`) — Where to write the helper script.\n\nIf neither top‑level OIDC defaults nor all per‑stack values are supplied, the construct throws a helpful error.\n\n### Stack item fields\n- `stackName` (required) — The CDK stack name to create the change set for.\n- `changesetRoleToAssumeArn` (required) — The ARN of the role used to create the change set (role chaining after OIDC).\n- `changesetRoleToAssumeRegion` (required) — The region for that role.\n- `oidcRoleArn` (optional) — Per‑stack override for the OIDC role.\n- `oidcRegion` (optional) — Per‑stack override for the OIDC region.\n\n### What gets generated\n- `.github/workflows/diff-<StackName>.yml` — One workflow per stack, triggered on PR open/sync/reopen.\n- `.github/workflows/scripts/describe-cfn-changeset.ts` — A helper script that:\n - Polls `DescribeChangeSet` until terminal\n - Filters out ignorable logical IDs or resource types using environment variables `IGNORE_LOGICAL_IDS` and `IGNORE_RESOURCE_TYPES`\n - Renders an HTML table with actions, logical IDs, types, replacements, and changed properties\n - Prints the HTML, appends to the GitHub Step Summary, and (if `GITHUB_TOKEN` and `GITHUB_COMMENT_URL` are present) posts a PR comment\n\n### Environment variables used by the change set script\n- `STACK_NAME` (required) — Stack name to describe.\n- `CHANGE_SET_NAME` (default: same as `STACK_NAME`).\n- `AWS_REGION` — Region for CloudFormation API calls. The workflow sets this via the credentials action(s).\n- `GITHUB_TOKEN` (optional) — If set with `GITHUB_COMMENT_URL`, posts a PR comment.\n- `GITHUB_COMMENT_URL` (optional) — PR comments URL.\n- `GITHUB_STEP_SUMMARY` (optional) — When present, appends the HTML to the step summary file.\n- `IGNORE_LOGICAL_IDS` (optional) — Comma‑separated logical IDs to ignore (default includes `CDKMetadata`).\n- `IGNORE_RESOURCE_TYPES` (optional) — Comma‑separated resource types to ignore (e.g., `AWS::CDK::Metadata`).\n\n## Usage: CdkDiffIamTemplate\n\nEmit an example IAM template you can deploy in your account for the Change Set workflow.\n\n### With Projen\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDiffIamTemplate } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ...\n});\n\nnew CdkDiffIamTemplate({\n project,\n roleName: 'cdk-diff-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: custom output path (default: 'cdk-diff-workflow-iam-template.yaml')\n // outputPath: 'infra/cdk-diff-iam.yaml',\n});\n\nproject.synth();\n```\n\nA Projen task is also added:\n\n```bash\nnpx projen deploy-cdkdiff-iam-template -- --parameter-overrides GitHubOIDCRoleArn=... # plus any extra AWS CLI args\n```\n\n### Without Projen (Standalone Generator)\n\n```ts\nimport { CdkDiffIamTemplateGenerator } from '@jjrawlins/cdk-diff-pr-github-action';\nimport * as fs from 'fs';\n\nconst template = CdkDiffIamTemplateGenerator.generateTemplate({\n roleName: 'cdk-diff-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n});\n\nfs.writeFileSync('cdk-diff-iam-template.yaml', template);\n\n// Get the deploy command\nconst deployCmd = CdkDiffIamTemplateGenerator.generateDeployCommand('cdk-diff-iam-template.yaml');\nconsole.log('Deploy with:', deployCmd);\n```\n\n### What the template defines\n\n- Parameter `GitHubOIDCRoleArn` with a default from `oidcRoleArn` — the ARN of your existing GitHub OIDC role allowed to assume the change set role.\n- IAM role `CdkChangesetRole` with minimal permissions for:\n - CloudFormation Change Set operations\n - Access to common CDK bootstrap S3 buckets and SSM parameters\n - `iam:PassRole` to `cloudformation.amazonaws.com`\n- Outputs exporting the role name and ARN.\n\nUse the created role ARN as `changesetRoleToAssumeArn` in `CdkDiffStackWorkflow`.\n\n---\n\n## Usage: CdkDriftDetectionWorkflow\n\n`CdkDriftDetectionWorkflow` creates a single workflow file (default `drift-detection.yml`) that can run on a schedule and via manual dispatch. It generates a helper script at `.github/workflows/scripts/detect-drift.ts` (by default) that uses AWS SDK v3 to run drift detection, write optional machine‑readable JSON, and print an HTML report for the Step Summary.\n\nExample `.projenrc.ts`:\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDriftDetectionWorkflow } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({ github: true, /* ... */ });\n\nnew CdkDriftDetectionWorkflow({\n project,\n workflowName: 'Drift Detection', // optional; file name derived as 'drift-detection.yml'\n schedule: '0 1 * * *', // optional cron\n createIssues: true, // default true; create/update issue when drift detected on schedule\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: Node version (default '24.x')\n // nodeVersion: '24.x',\n // Optional: Where to place the helper script (default '.github/workflows/scripts/detect-drift.ts')\n // scriptOutputPath: '.github/workflows/scripts/detect-drift.ts',\n stacks: [\n {\n stackName: 'MyAppStack-Prod',\n driftDetectionRoleToAssumeArn: 'arn:aws:iam::123456789012:role/cdk-drift-role',\n driftDetectionRoleToAssumeRegion: 'us-east-1',\n // failOnDrift: true, // optional (default true)\n },\n ],\n});\n\nproject.synth();\n```\n\n### CdkDriftDetectionWorkflow props\n- `project` (required) — Your Projen project instance.\n- `stacks` (required) — Array of stacks to check.\n- `oidcRoleArn` (required) — Default OIDC role ARN used before chaining into per‑stack drift roles.\n- `oidcRegion` (required) — Default OIDC region.\n- `workflowName` (optional, default `'drift-detection'`) — Human‑friendly workflow name; the file name is derived in kebab‑case.\n- `schedule` (optional) — Cron expression for automatic runs.\n- `createIssues` (optional, default `true`) — When true, scheduled runs will create/update a GitHub issue if drift is detected.\n- `nodeVersion` (optional, default `'24.x'`) — Node.js version for the runner.\n- `scriptOutputPath` (optional, default `'.github/workflows/scripts/detect-drift.ts'`) — Where to write the helper script.\n\n### Per‑stack fields\n- `stackName` (required) — The full CloudFormation stack name.\n- `driftDetectionRoleToAssumeArn` (required) — Role to assume (after OIDC) for making drift API calls.\n- `driftDetectionRoleToAssumeRegion` (required) — Region for that role and API calls.\n- `failOnDrift` (optional, default `true`) — Intended to fail the detection step on drift. The provided script exits with non‑zero when drift is found; the job continues to allow artifact upload and issue creation.\n\n### What gets generated\n- `.github/workflows/<kebab(workflowName)>.yml` — A workflow with one job per stack plus a final summary job.\n- `.github/workflows/scripts/detect-drift.ts` — Helper script that:\n - Starts drift detection and polls until completion\n - Lists non‑`IN_SYNC` resources and builds an HTML report\n - Writes optional JSON to `DRIFT_DETECTION_OUTPUT` when set\n - Prints to stdout and appends to the GitHub Step Summary when available\n\n### Artifacts and summary\n- Each stack job uploads `drift-results-<stack>.json` (if produced).\n- A final `Drift Detection Summary` job downloads all artifacts and prints a consolidated summary.\n\n### Manual dispatch\n- The workflow exposes an input named `stack` with choices including each configured stack and an `all` option.\n- Choose a specific stack to run drift detection for that stack only, or select `all` (or leave the input empty) to run all stacks.\n\nNote: The default workflow does not post PR comments for drift. It can create/update an Issue on scheduled runs when `createIssues` is `true`.\n\n### Post-notification steps (e.g., Slack)\n\nYou can add your own GitHub Action steps to run after the drift detection step for each stack using `postGitHubSteps`.\nProvide your own Slack payload/markdown (this library no longer generates a payload step for you).\n\nOption A: slackapi/slack-github-action (Incoming Webhook, official syntax)\n\n```ts\nnew CdkDriftDetectionWorkflow({\n project,\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n stacks: [/* ... */],\n postGitHubSteps: ({ stack }) => {\n // Build a descriptive name per stack\n const name = `Notify Slack (${stack} post-drift)`;\n const step = {\n name,\n uses: 'slackapi/slack-github-action@v2.1.1',\n // by default, post steps run only when drift is detected; you can override `if`\n if: \"always() && steps.drift.outcome == 'failure'\",\n // Use official inputs: webhook + webhook-type, and a YAML payload with blocks\n with: {\n webhook: '${{ secrets.CDK_NOTIFICATIONS_SLACK_WEBHOOK }}',\n 'webhook-type': 'incoming-webhook',\n payload: [\n 'text: \"** ${{ env.STACK_NAME }} ** has drifted!\"',\n 'blocks:',\n ' - type: \"section\"',\n ' text:',\n ' type: \"mrkdwn\"',\n ' text: \"*Stack:* ${{ env.STACK_NAME }} (region ${{ env.AWS_REGION }}) has drifted:exclamation:\"',\n ' - type: \"section\"',\n ' fields:',\n ' - type: \"mrkdwn\"',\n ' text: \"*Stack ARN*\\\\n${{ steps.drift.outputs.stack-arn }}\"',\n ' - type: \"mrkdwn\"',\n ' text: \"*Issue*\\\\n<${{ github.server_url }}/${{ github.repository }}/issues/${{ steps.issue.outputs.result }}|#${{ steps.issue.outputs.result }}>\"',\n ].join('\\n'),\n },\n };\n return [step];\n },\n});\n```\n\nNote: The Issue link requires `createIssues: true` (default) so that the `Create Issue on Drift` step runs before this Slack step and exposes `steps.issue.outputs.result`. This library orders the steps accordingly.\n\nDetails:\n- `postGitHubSteps` can be:\n - an array of step objects, or\n - a factory function `({ stack }) => step | step[]`.\n- Each step you provide is inserted after the results are uploaded.\n- Default condition: if you do not set `if` on your step, it will default to `always() && steps.drift.outcome == 'failure'`.\n- Available context/env you can use:\n - `${{ env.STACK_NAME }}`, `${{ env.DRIFT_DETECTION_OUTPUT }}`\n - `${{ steps.drift.outcome }}` — success/failure of the detect step\n - `${{ steps.drift.outputs.stack-arn }}` — Stack ARN resolved at runtime\n - `${{ steps.issue.outputs.result }}` — Issue number if the workflow created/found one (empty when not applicable)\n```\n\n## Usage: CdkDriftIamTemplate\n\nEmit an example IAM template you can deploy in your account for the Drift Detection workflow.\n\n### With Projen\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDriftIamTemplate } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({\n // ...\n});\n\nnew CdkDriftIamTemplate({\n project,\n roleName: 'cdk-drift-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n // Optional: custom output path (default: 'cdk-drift-workflow-iam-template.yaml')\n // outputPath: 'infra/cdk-drift-iam.yaml',\n});\n\nproject.synth();\n```\n\nA Projen task is also added:\n\n```bash\nnpx projen deploy-cdkdrift-iam-template -- --parameter-overrides GitHubOIDCRoleArn=... # plus any extra AWS CLI args\n```\n\n### Without Projen (Standalone Generator)\n\n```ts\nimport { CdkDriftIamTemplateGenerator } from '@jjrawlins/cdk-diff-pr-github-action';\nimport * as fs from 'fs';\n\nconst template = CdkDriftIamTemplateGenerator.generateTemplate({\n roleName: 'cdk-drift-role',\n oidcRoleArn: 'arn:aws:iam::123456789012:role/github-oidc-role',\n oidcRegion: 'us-east-1',\n});\n\nfs.writeFileSync('cdk-drift-iam-template.yaml', template);\n\n// Get the deploy command\nconst deployCmd = CdkDriftIamTemplateGenerator.generateDeployCommand('cdk-drift-iam-template.yaml');\nconsole.log('Deploy with:', deployCmd);\n```\n\n### What the template defines\n\n- Parameter `GitHubOIDCRoleArn` with a default from `oidcRoleArn` — the ARN of your existing GitHub OIDC role allowed to assume this drift role.\n- IAM role `CdkDriftRole` with minimal permissions for CloudFormation drift detection operations.\n- Outputs exporting the role name and ARN.\n\n---\n\n## Usage: CdkDiffIamTemplateStackSet (Org-Wide Deployment)\n\n`CdkDiffIamTemplateStackSet` creates a CloudFormation StackSet template for deploying GitHub OIDC provider, OIDC role, and CDK diff/drift IAM roles across an entire AWS Organization. This is the recommended approach for organizations that want to enable CDK diff/drift workflows across multiple accounts.\n\n### Architecture\n\nEach account in your organization gets:\n- **GitHub OIDC Provider** — Authenticates GitHub Actions workflows\n- **GitHubOIDCRole** — Trusts the OIDC provider with repo/branch restrictions\n- **CdkChangesetRole** — For PR change set previews (trusts GitHubOIDCRole)\n- **CdkDriftRole** — For drift detection (trusts GitHubOIDCRole)\n\nThis is a self-contained deployment with **no role chaining required**.\n\n### With Projen\n\n```ts\nimport { awscdk } from 'projen';\nimport { CdkDiffIamTemplateStackSet } from '@jjrawlins/cdk-diff-pr-github-action';\n\nconst project = new awscdk.AwsCdkConstructLibrary({ /* ... */ });\n\nnew CdkDiffIamTemplateStackSet({\n project,\n githubOidc: {\n owner: 'my-org', // GitHub org or username\n repositories: ['infra-repo', 'app-repo'], // Repos allowed to assume roles\n branches: ['main', 'release/*'], // Branch patterns (default: ['*'])\n },\n targetOrganizationalUnitIds: ['ou-xxxx-xxxxxxxx'], // Target OUs\n regions: ['us-east-1', 'eu-west-1'], // Target regions\n // Optional settings:\n // oidcRoleName: 'GitHubOIDCRole', // default\n // changesetRoleName: 'CdkChangesetRole', // default\n // driftRoleName: 'CdkDriftRole', // default\n // roleSelection: StackSetRoleSelection.BOTH, // BOTH, CHANGESET_ONLY, or DRIFT_ONLY\n // delegatedAdmin: true, // Use --call-as DELEGATED_ADMIN (default: true)\n});\n\nproject.synth();\n```\n\nThis creates:\n- `cdk-diff-workflow-stackset-template.yaml` — CloudFormation template\n- Projen tasks for StackSet management\n\n**Projen tasks:**\n```bash\nnpx projen stackset-create # Create the StackSet\nnpx projen stackset-update # Update the StackSet template\nnpx projen stackset-deploy-instances # Deploy to target OUs/regions\nnpx projen stackset-delete-instances # Remove stack instances\nnpx projen stackset-delete # Delete the StackSet\nnpx projen stackset-describe # Show StackSet status\nnpx projen stackset-list-instances # List all instances\n```\n\n### Without Projen (Standalone Generator)\n\nFor non-Projen projects, use `CdkDiffIamTemplateStackSetGenerator` directly:\n\n```ts\nimport {\n CdkDiffIamTemplateStackSetGenerator\n} from '@jjrawlins/cdk-diff-pr-github-action';\nimport * as fs from 'fs';\n\n// Generate the CloudFormation template\nconst template = CdkDiffIamTemplateStackSetGenerator.generateTemplate({\n githubOidc: {\n owner: 'my-org',\n repositories: ['infra-repo'],\n branches: ['main'],\n },\n});\n\n// Write to file\nfs.writeFileSync('stackset-template.yaml', template);\n\n// Get AWS CLI commands for StackSet operations\nconst commands = CdkDiffIamTemplateStackSetGenerator.generateCommands({\n stackSetName: 'cdk-diff-workflow-iam-stackset',\n templatePath: 'stackset-template.yaml',\n targetOrganizationalUnitIds: ['ou-xxxx-xxxxxxxx'],\n regions: ['us-east-1'],\n});\n\nconsole.log('Create StackSet:', commands['stackset-create']);\nconsole.log('Deploy instances:', commands['stackset-deploy-instances']);\n```\n\n### GitHub Actions Workflow (Simplified)\n\nWith per-account OIDC, your workflow is simplified — no role chaining needed:\n\n```yaml\njobs:\n diff:\n runs-on: ubuntu-latest\n permissions:\n id-token: write\n contents: read\n steps:\n - uses: actions/checkout@v4\n\n - uses: aws-actions/configure-aws-credentials@v4\n with:\n role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/GitHubOIDCRole\n aws-region: us-east-1\n\n - name: Assume Changeset Role\n run: |\n CREDS=$(aws sts assume-role \\\n --role-arn arn:aws:iam::${{ env.ACCOUNT_ID }}:role/CdkChangesetRole \\\n --role-session-name changeset-session)\n # Export credentials...\n```\n\n### GitHubOidcConfig options\n\n| Property | Description |\n|----------|-------------|\n| `owner` | GitHub organization or username (required) |\n| `repositories` | Array of repo names, or `['*']` for all repos (required) |\n| `branches` | Array of branch patterns (default: `['*']`) |\n| `additionalClaims` | Extra OIDC claims like `['pull_request', 'environment:production']` |\n\n---\n\n## Testing\n\nThis repository includes Jest tests that snapshot the synthesized outputs from Projen and assert that:\n- Diff workflows are created per stack and contain all expected steps.\n- Drift detection workflow produces one job per stack and a summary job.\n- Only one helper script file is generated per workflow type.\n- Per‑stack OIDC overrides (where supported) are respected.\n- Helpful validation errors are thrown for missing OIDC settings.\n- The IAM template files contain the expected resources and outputs.\n\nRun tests with:\n\n```bash\nyarn test\n```\n\n## Notes\n- This package assumes your repository is configured with GitHub Actions and that you have a GitHub OIDC role configured in AWS.\n- The generated scripts use the AWS SDK v3 for CloudFormation and, where applicable, the GitHub REST API.\n"
3553
3553
  },
3554
3554
  "repository": {
3555
3555
  "type": "git",
@@ -3565,7 +3565,9 @@
3565
3565
  "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplate": {
3566
3566
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3567
3567
  "docs": {
3568
- "stability": "experimental"
3568
+ "remarks": "For non-Projen projects, use `CdkDiffIamTemplateGenerator` directly.",
3569
+ "stability": "experimental",
3570
+ "summary": "Projen construct that emits a CloudFormation template with minimal IAM permissions for the CDK Diff Stack Workflow."
3569
3571
  },
3570
3572
  "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplate",
3571
3573
  "initializer": {
@@ -3574,7 +3576,7 @@
3574
3576
  },
3575
3577
  "locationInModule": {
3576
3578
  "filename": "src/CdkDiffIamTemplate.ts",
3577
- "line": 12
3579
+ "line": 132
3578
3580
  },
3579
3581
  "parameters": [
3580
3582
  {
@@ -3588,51 +3590,668 @@
3588
3590
  "kind": "class",
3589
3591
  "locationInModule": {
3590
3592
  "filename": "src/CdkDiffIamTemplate.ts",
3591
- "line": 11
3593
+ "line": 131
3592
3594
  },
3593
3595
  "name": "CdkDiffIamTemplate",
3594
3596
  "symbolId": "src/CdkDiffIamTemplate:CdkDiffIamTemplate"
3595
3597
  },
3598
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGenerator": {
3599
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3600
+ "docs": {
3601
+ "remarks": "No Projen dependency - can be used in any project.",
3602
+ "stability": "experimental",
3603
+ "summary": "Pure generator class for CDK Diff IAM templates."
3604
+ },
3605
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGenerator",
3606
+ "initializer": {
3607
+ "docs": {
3608
+ "stability": "experimental"
3609
+ }
3610
+ },
3611
+ "kind": "class",
3612
+ "locationInModule": {
3613
+ "filename": "src/CdkDiffIamTemplate.ts",
3614
+ "line": 19
3615
+ },
3616
+ "methods": [
3617
+ {
3618
+ "docs": {
3619
+ "stability": "experimental",
3620
+ "summary": "Generate the AWS CLI deploy command for the IAM template."
3621
+ },
3622
+ "locationInModule": {
3623
+ "filename": "src/CdkDiffIamTemplate.ts",
3624
+ "line": 110
3625
+ },
3626
+ "name": "generateDeployCommand",
3627
+ "parameters": [
3628
+ {
3629
+ "name": "templatePath",
3630
+ "optional": true,
3631
+ "type": {
3632
+ "primitive": "string"
3633
+ }
3634
+ }
3635
+ ],
3636
+ "returns": {
3637
+ "type": {
3638
+ "primitive": "string"
3639
+ }
3640
+ },
3641
+ "static": true
3642
+ },
3643
+ {
3644
+ "docs": {
3645
+ "stability": "experimental",
3646
+ "summary": "Generate the CloudFormation IAM template as a YAML string."
3647
+ },
3648
+ "locationInModule": {
3649
+ "filename": "src/CdkDiffIamTemplate.ts",
3650
+ "line": 23
3651
+ },
3652
+ "name": "generateTemplate",
3653
+ "parameters": [
3654
+ {
3655
+ "name": "props",
3656
+ "type": {
3657
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGeneratorProps"
3658
+ }
3659
+ }
3660
+ ],
3661
+ "returns": {
3662
+ "type": {
3663
+ "primitive": "string"
3664
+ }
3665
+ },
3666
+ "static": true
3667
+ }
3668
+ ],
3669
+ "name": "CdkDiffIamTemplateGenerator",
3670
+ "symbolId": "src/CdkDiffIamTemplate:CdkDiffIamTemplateGenerator"
3671
+ },
3672
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGeneratorProps": {
3673
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3674
+ "datatype": true,
3675
+ "docs": {
3676
+ "stability": "experimental",
3677
+ "summary": "Props for generating CDK Diff IAM templates (no Projen dependency)."
3678
+ },
3679
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGeneratorProps",
3680
+ "kind": "interface",
3681
+ "locationInModule": {
3682
+ "filename": "src/CdkDiffIamTemplate.ts",
3683
+ "line": 6
3684
+ },
3685
+ "name": "CdkDiffIamTemplateGeneratorProps",
3686
+ "properties": [
3687
+ {
3688
+ "abstract": true,
3689
+ "docs": {
3690
+ "stability": "experimental",
3691
+ "summary": "Region for the OIDC trust condition."
3692
+ },
3693
+ "immutable": true,
3694
+ "locationInModule": {
3695
+ "filename": "src/CdkDiffIamTemplate.ts",
3696
+ "line": 12
3697
+ },
3698
+ "name": "oidcRegion",
3699
+ "type": {
3700
+ "primitive": "string"
3701
+ }
3702
+ },
3703
+ {
3704
+ "abstract": true,
3705
+ "docs": {
3706
+ "stability": "experimental",
3707
+ "summary": "ARN of the existing GitHub OIDC role that can assume this changeset role."
3708
+ },
3709
+ "immutable": true,
3710
+ "locationInModule": {
3711
+ "filename": "src/CdkDiffIamTemplate.ts",
3712
+ "line": 10
3713
+ },
3714
+ "name": "oidcRoleArn",
3715
+ "type": {
3716
+ "primitive": "string"
3717
+ }
3718
+ },
3719
+ {
3720
+ "abstract": true,
3721
+ "docs": {
3722
+ "stability": "experimental",
3723
+ "summary": "Name for the IAM role."
3724
+ },
3725
+ "immutable": true,
3726
+ "locationInModule": {
3727
+ "filename": "src/CdkDiffIamTemplate.ts",
3728
+ "line": 8
3729
+ },
3730
+ "name": "roleName",
3731
+ "type": {
3732
+ "primitive": "string"
3733
+ }
3734
+ }
3735
+ ],
3736
+ "symbolId": "src/CdkDiffIamTemplate:CdkDiffIamTemplateGeneratorProps"
3737
+ },
3596
3738
  "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateProps": {
3597
3739
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3598
3740
  "datatype": true,
3599
3741
  "docs": {
3600
- "stability": "experimental"
3742
+ "stability": "experimental",
3743
+ "summary": "Props for the Projen-integrated CDK Diff IAM template construct."
3601
3744
  },
3602
3745
  "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateProps",
3746
+ "interfaces": [
3747
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateGeneratorProps"
3748
+ ],
3603
3749
  "kind": "interface",
3604
3750
  "locationInModule": {
3605
3751
  "filename": "src/CdkDiffIamTemplate.ts",
3606
- "line": 3
3752
+ "line": 118
3607
3753
  },
3608
3754
  "name": "CdkDiffIamTemplateProps",
3609
3755
  "properties": [
3610
3756
  {
3611
3757
  "abstract": true,
3612
3758
  "docs": {
3613
- "stability": "experimental"
3759
+ "stability": "experimental",
3760
+ "summary": "Projen project instance."
3761
+ },
3762
+ "immutable": true,
3763
+ "locationInModule": {
3764
+ "filename": "src/CdkDiffIamTemplate.ts",
3765
+ "line": 120
3766
+ },
3767
+ "name": "project",
3768
+ "type": {
3769
+ "primitive": "any"
3770
+ }
3771
+ },
3772
+ {
3773
+ "abstract": true,
3774
+ "docs": {
3775
+ "stability": "experimental",
3776
+ "summary": "Output path for the template file (default: 'cdk-diff-workflow-iam-template.yaml')."
3777
+ },
3778
+ "immutable": true,
3779
+ "locationInModule": {
3780
+ "filename": "src/CdkDiffIamTemplate.ts",
3781
+ "line": 122
3782
+ },
3783
+ "name": "outputPath",
3784
+ "optional": true,
3785
+ "type": {
3786
+ "primitive": "string"
3787
+ }
3788
+ }
3789
+ ],
3790
+ "symbolId": "src/CdkDiffIamTemplate:CdkDiffIamTemplateProps"
3791
+ },
3792
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSet": {
3793
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3794
+ "docs": {
3795
+ "remarks": "This provides a self-contained per-account deployment with no role chaining required.\n\nFor non-Projen projects, use `CdkDiffIamTemplateStackSetGenerator` directly.",
3796
+ "stability": "experimental",
3797
+ "summary": "Projen construct that creates a CloudFormation StackSet template for org-wide deployment of GitHub OIDC provider, OIDC role, and CDK Diff/Drift IAM roles."
3798
+ },
3799
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSet",
3800
+ "initializer": {
3801
+ "docs": {
3802
+ "stability": "experimental"
3803
+ },
3804
+ "locationInModule": {
3805
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3806
+ "line": 526
3807
+ },
3808
+ "parameters": [
3809
+ {
3810
+ "name": "props",
3811
+ "type": {
3812
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetProps"
3813
+ }
3814
+ }
3815
+ ]
3816
+ },
3817
+ "kind": "class",
3818
+ "locationInModule": {
3819
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3820
+ "line": 525
3821
+ },
3822
+ "name": "CdkDiffIamTemplateStackSet",
3823
+ "symbolId": "src/CdkDiffIamTemplateStackSet:CdkDiffIamTemplateStackSet"
3824
+ },
3825
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetCommandsProps": {
3826
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3827
+ "datatype": true,
3828
+ "docs": {
3829
+ "stability": "experimental",
3830
+ "summary": "Props for generating StackSet CLI commands (no Projen dependency)."
3831
+ },
3832
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetCommandsProps",
3833
+ "kind": "interface",
3834
+ "locationInModule": {
3835
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3836
+ "line": 87
3837
+ },
3838
+ "name": "CdkDiffIamTemplateStackSetCommandsProps",
3839
+ "properties": [
3840
+ {
3841
+ "abstract": true,
3842
+ "docs": {
3843
+ "stability": "experimental",
3844
+ "summary": "Auto-deployment configuration."
3845
+ },
3846
+ "immutable": true,
3847
+ "locationInModule": {
3848
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3849
+ "line": 101
3850
+ },
3851
+ "name": "autoDeployment",
3852
+ "optional": true,
3853
+ "type": {
3854
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.StackSetAutoDeployment"
3855
+ }
3856
+ },
3857
+ {
3858
+ "abstract": true,
3859
+ "docs": {
3860
+ "remarks": "If true, adds --call-as DELEGATED_ADMIN to commands.\nDefault: true",
3861
+ "stability": "experimental",
3862
+ "summary": "Whether to use delegated admin mode for StackSet operations."
3863
+ },
3864
+ "immutable": true,
3865
+ "locationInModule": {
3866
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3867
+ "line": 108
3868
+ },
3869
+ "name": "delegatedAdmin",
3870
+ "optional": true,
3871
+ "type": {
3872
+ "primitive": "boolean"
3873
+ }
3874
+ },
3875
+ {
3876
+ "abstract": true,
3877
+ "docs": {
3878
+ "stability": "experimental",
3879
+ "summary": "Target regions for deployment (e.g., ['us-east-1', 'eu-west-1'])."
3880
+ },
3881
+ "immutable": true,
3882
+ "locationInModule": {
3883
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3884
+ "line": 98
3885
+ },
3886
+ "name": "regions",
3887
+ "optional": true,
3888
+ "type": {
3889
+ "collection": {
3890
+ "elementtype": {
3891
+ "primitive": "string"
3892
+ },
3893
+ "kind": "array"
3894
+ }
3895
+ }
3896
+ },
3897
+ {
3898
+ "abstract": true,
3899
+ "docs": {
3900
+ "stability": "experimental",
3901
+ "summary": "Name of the StackSet (default: 'cdk-diff-workflow-iam-stackset')."
3902
+ },
3903
+ "immutable": true,
3904
+ "locationInModule": {
3905
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3906
+ "line": 89
3907
+ },
3908
+ "name": "stackSetName",
3909
+ "optional": true,
3910
+ "type": {
3911
+ "primitive": "string"
3912
+ }
3913
+ },
3914
+ {
3915
+ "abstract": true,
3916
+ "docs": {
3917
+ "stability": "experimental",
3918
+ "summary": "Target OUs for deployment (e.g., ['ou-xxxx-xxxxxxxx', 'r-xxxx'])."
3919
+ },
3920
+ "immutable": true,
3921
+ "locationInModule": {
3922
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3923
+ "line": 95
3924
+ },
3925
+ "name": "targetOrganizationalUnitIds",
3926
+ "optional": true,
3927
+ "type": {
3928
+ "collection": {
3929
+ "elementtype": {
3930
+ "primitive": "string"
3931
+ },
3932
+ "kind": "array"
3933
+ }
3934
+ }
3935
+ },
3936
+ {
3937
+ "abstract": true,
3938
+ "docs": {
3939
+ "stability": "experimental",
3940
+ "summary": "Path to the template file (default: 'cdk-diff-workflow-stackset-template.yaml')."
3941
+ },
3942
+ "immutable": true,
3943
+ "locationInModule": {
3944
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3945
+ "line": 92
3946
+ },
3947
+ "name": "templatePath",
3948
+ "optional": true,
3949
+ "type": {
3950
+ "primitive": "string"
3951
+ }
3952
+ }
3953
+ ],
3954
+ "symbolId": "src/CdkDiffIamTemplateStackSet:CdkDiffIamTemplateStackSetCommandsProps"
3955
+ },
3956
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGenerator": {
3957
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
3958
+ "docs": {
3959
+ "remarks": "No Projen dependency - can be used in any project.",
3960
+ "stability": "experimental",
3961
+ "summary": "Pure generator class for StackSet templates and commands."
3962
+ },
3963
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGenerator",
3964
+ "initializer": {
3965
+ "docs": {
3966
+ "stability": "experimental"
3967
+ }
3968
+ },
3969
+ "kind": "class",
3970
+ "locationInModule": {
3971
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3972
+ "line": 115
3973
+ },
3974
+ "methods": [
3975
+ {
3976
+ "docs": {
3977
+ "remarks": "Returns a map of command names to shell commands.",
3978
+ "stability": "experimental",
3979
+ "summary": "Generate AWS CLI commands for StackSet operations."
3980
+ },
3981
+ "locationInModule": {
3982
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
3983
+ "line": 143
3984
+ },
3985
+ "name": "generateCommands",
3986
+ "parameters": [
3987
+ {
3988
+ "name": "props",
3989
+ "optional": true,
3990
+ "type": {
3991
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetCommandsProps"
3992
+ }
3993
+ }
3994
+ ],
3995
+ "returns": {
3996
+ "type": {
3997
+ "collection": {
3998
+ "elementtype": {
3999
+ "primitive": "string"
4000
+ },
4001
+ "kind": "map"
4002
+ }
4003
+ }
4004
+ },
4005
+ "static": true
4006
+ },
4007
+ {
4008
+ "docs": {
4009
+ "stability": "experimental",
4010
+ "summary": "Generate the CloudFormation StackSet template as a YAML string."
4011
+ },
4012
+ "locationInModule": {
4013
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4014
+ "line": 119
4015
+ },
4016
+ "name": "generateTemplate",
4017
+ "parameters": [
4018
+ {
4019
+ "name": "props",
4020
+ "type": {
4021
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGeneratorProps"
4022
+ }
4023
+ }
4024
+ ],
4025
+ "returns": {
4026
+ "type": {
4027
+ "primitive": "string"
4028
+ }
4029
+ },
4030
+ "static": true
4031
+ }
4032
+ ],
4033
+ "name": "CdkDiffIamTemplateStackSetGenerator",
4034
+ "symbolId": "src/CdkDiffIamTemplateStackSet:CdkDiffIamTemplateStackSetGenerator"
4035
+ },
4036
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGeneratorProps": {
4037
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4038
+ "datatype": true,
4039
+ "docs": {
4040
+ "stability": "experimental",
4041
+ "summary": "Props for generating StackSet templates (no Projen dependency)."
4042
+ },
4043
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGeneratorProps",
4044
+ "kind": "interface",
4045
+ "locationInModule": {
4046
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4047
+ "line": 56
4048
+ },
4049
+ "name": "CdkDiffIamTemplateStackSetGeneratorProps",
4050
+ "properties": [
4051
+ {
4052
+ "abstract": true,
4053
+ "docs": {
4054
+ "stability": "experimental",
4055
+ "summary": "GitHub OIDC configuration for repo/branch restrictions."
4056
+ },
4057
+ "immutable": true,
4058
+ "locationInModule": {
4059
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4060
+ "line": 58
4061
+ },
4062
+ "name": "githubOidc",
4063
+ "type": {
4064
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.GitHubOidcConfig"
4065
+ }
4066
+ },
4067
+ {
4068
+ "abstract": true,
4069
+ "docs": {
4070
+ "stability": "experimental",
4071
+ "summary": "Name of the CdkChangesetRole (default: 'CdkChangesetRole')."
4072
+ },
4073
+ "immutable": true,
4074
+ "locationInModule": {
4075
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4076
+ "line": 64
4077
+ },
4078
+ "name": "changesetRoleName",
4079
+ "optional": true,
4080
+ "type": {
4081
+ "primitive": "string"
4082
+ }
4083
+ },
4084
+ {
4085
+ "abstract": true,
4086
+ "docs": {
4087
+ "stability": "experimental",
4088
+ "summary": "Description for the StackSet."
4089
+ },
4090
+ "immutable": true,
4091
+ "locationInModule": {
4092
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4093
+ "line": 73
4094
+ },
4095
+ "name": "description",
4096
+ "optional": true,
4097
+ "type": {
4098
+ "primitive": "string"
4099
+ }
4100
+ },
4101
+ {
4102
+ "abstract": true,
4103
+ "docs": {
4104
+ "stability": "experimental",
4105
+ "summary": "Name of the CdkDriftRole (default: 'CdkDriftRole')."
4106
+ },
4107
+ "immutable": true,
4108
+ "locationInModule": {
4109
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4110
+ "line": 67
4111
+ },
4112
+ "name": "driftRoleName",
4113
+ "optional": true,
4114
+ "type": {
4115
+ "primitive": "string"
4116
+ }
4117
+ },
4118
+ {
4119
+ "abstract": true,
4120
+ "docs": {
4121
+ "stability": "experimental",
4122
+ "summary": "Name of the GitHub OIDC role (default: 'GitHubOIDCRole')."
4123
+ },
4124
+ "immutable": true,
4125
+ "locationInModule": {
4126
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4127
+ "line": 61
4128
+ },
4129
+ "name": "oidcRoleName",
4130
+ "optional": true,
4131
+ "type": {
4132
+ "primitive": "string"
4133
+ }
4134
+ },
4135
+ {
4136
+ "abstract": true,
4137
+ "docs": {
4138
+ "stability": "experimental",
4139
+ "summary": "Which roles to include (default: BOTH)."
4140
+ },
4141
+ "immutable": true,
4142
+ "locationInModule": {
4143
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4144
+ "line": 70
4145
+ },
4146
+ "name": "roleSelection",
4147
+ "optional": true,
4148
+ "type": {
4149
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.StackSetRoleSelection"
4150
+ }
4151
+ },
4152
+ {
4153
+ "abstract": true,
4154
+ "docs": {
4155
+ "remarks": "Set to true if accounts already have a GitHub OIDC provider.\nThe template will reference the existing provider by ARN.\nDefault: false",
4156
+ "stability": "experimental",
4157
+ "summary": "Skip creating the OIDC provider (use existing one)."
4158
+ },
4159
+ "immutable": true,
4160
+ "locationInModule": {
4161
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4162
+ "line": 81
4163
+ },
4164
+ "name": "skipOidcProviderCreation",
4165
+ "optional": true,
4166
+ "type": {
4167
+ "primitive": "boolean"
4168
+ }
4169
+ }
4170
+ ],
4171
+ "symbolId": "src/CdkDiffIamTemplateStackSet:CdkDiffIamTemplateStackSetGeneratorProps"
4172
+ },
4173
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetProps": {
4174
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4175
+ "datatype": true,
4176
+ "docs": {
4177
+ "stability": "experimental",
4178
+ "summary": "Props for the Projen-integrated StackSet construct."
4179
+ },
4180
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetProps",
4181
+ "interfaces": [
4182
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDiffIamTemplateStackSetGeneratorProps"
4183
+ ],
4184
+ "kind": "interface",
4185
+ "locationInModule": {
4186
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4187
+ "line": 489
4188
+ },
4189
+ "name": "CdkDiffIamTemplateStackSetProps",
4190
+ "properties": [
4191
+ {
4192
+ "abstract": true,
4193
+ "docs": {
4194
+ "stability": "experimental",
4195
+ "summary": "Projen project instance."
4196
+ },
4197
+ "immutable": true,
4198
+ "locationInModule": {
4199
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4200
+ "line": 491
4201
+ },
4202
+ "name": "project",
4203
+ "type": {
4204
+ "primitive": "any"
4205
+ }
4206
+ },
4207
+ {
4208
+ "abstract": true,
4209
+ "docs": {
4210
+ "stability": "experimental",
4211
+ "summary": "Auto-deployment configuration."
4212
+ },
4213
+ "immutable": true,
4214
+ "locationInModule": {
4215
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4216
+ "line": 506
4217
+ },
4218
+ "name": "autoDeployment",
4219
+ "optional": true,
4220
+ "type": {
4221
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.StackSetAutoDeployment"
4222
+ }
4223
+ },
4224
+ {
4225
+ "abstract": true,
4226
+ "docs": {
4227
+ "remarks": "If true, adds --call-as DELEGATED_ADMIN to commands.\nIf false, assumes running from the management account.\nDefault: true",
4228
+ "stability": "experimental",
4229
+ "summary": "Whether to use delegated admin mode for StackSet operations."
3614
4230
  },
3615
4231
  "immutable": true,
3616
4232
  "locationInModule": {
3617
- "filename": "src/CdkDiffIamTemplate.ts",
3618
- "line": 8
4233
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4234
+ "line": 514
3619
4235
  },
3620
- "name": "oidcRegion",
4236
+ "name": "delegatedAdmin",
4237
+ "optional": true,
3621
4238
  "type": {
3622
- "primitive": "string"
4239
+ "primitive": "boolean"
3623
4240
  }
3624
4241
  },
3625
4242
  {
3626
4243
  "abstract": true,
3627
4244
  "docs": {
3628
- "stability": "experimental"
4245
+ "stability": "experimental",
4246
+ "summary": "Output path for the template file (default: 'cdk-diff-workflow-stackset-template.yaml')."
3629
4247
  },
3630
4248
  "immutable": true,
3631
4249
  "locationInModule": {
3632
- "filename": "src/CdkDiffIamTemplate.ts",
3633
- "line": 7
4250
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4251
+ "line": 497
3634
4252
  },
3635
- "name": "oidcRoleArn",
4253
+ "name": "outputPath",
4254
+ "optional": true,
3636
4255
  "type": {
3637
4256
  "primitive": "string"
3638
4257
  }
@@ -3640,29 +4259,38 @@
3640
4259
  {
3641
4260
  "abstract": true,
3642
4261
  "docs": {
3643
- "stability": "experimental"
4262
+ "stability": "experimental",
4263
+ "summary": "Target regions for deployment (e.g., ['us-east-1', 'eu-west-1'])."
3644
4264
  },
3645
4265
  "immutable": true,
3646
4266
  "locationInModule": {
3647
- "filename": "src/CdkDiffIamTemplate.ts",
3648
- "line": 4
4267
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4268
+ "line": 503
3649
4269
  },
3650
- "name": "project",
4270
+ "name": "regions",
4271
+ "optional": true,
3651
4272
  "type": {
3652
- "primitive": "any"
4273
+ "collection": {
4274
+ "elementtype": {
4275
+ "primitive": "string"
4276
+ },
4277
+ "kind": "array"
4278
+ }
3653
4279
  }
3654
4280
  },
3655
4281
  {
3656
4282
  "abstract": true,
3657
4283
  "docs": {
3658
- "stability": "experimental"
4284
+ "stability": "experimental",
4285
+ "summary": "Name of the StackSet (default: 'cdk-diff-workflow-iam-stackset')."
3659
4286
  },
3660
4287
  "immutable": true,
3661
4288
  "locationInModule": {
3662
- "filename": "src/CdkDiffIamTemplate.ts",
3663
- "line": 5
4289
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4290
+ "line": 494
3664
4291
  },
3665
- "name": "roleName",
4292
+ "name": "stackSetName",
4293
+ "optional": true,
3666
4294
  "type": {
3667
4295
  "primitive": "string"
3668
4296
  }
@@ -3670,21 +4298,27 @@
3670
4298
  {
3671
4299
  "abstract": true,
3672
4300
  "docs": {
3673
- "stability": "experimental"
4301
+ "stability": "experimental",
4302
+ "summary": "Target OUs for deployment (e.g., ['ou-xxxx-xxxxxxxx', 'r-xxxx'])."
3674
4303
  },
3675
4304
  "immutable": true,
3676
4305
  "locationInModule": {
3677
- "filename": "src/CdkDiffIamTemplate.ts",
3678
- "line": 6
4306
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
4307
+ "line": 500
3679
4308
  },
3680
- "name": "outputPath",
4309
+ "name": "targetOrganizationalUnitIds",
3681
4310
  "optional": true,
3682
4311
  "type": {
3683
- "primitive": "string"
4312
+ "collection": {
4313
+ "elementtype": {
4314
+ "primitive": "string"
4315
+ },
4316
+ "kind": "array"
4317
+ }
3684
4318
  }
3685
4319
  }
3686
4320
  ],
3687
- "symbolId": "src/CdkDiffIamTemplate:CdkDiffIamTemplateProps"
4321
+ "symbolId": "src/CdkDiffIamTemplateStackSet:CdkDiffIamTemplateStackSetProps"
3688
4322
  },
3689
4323
  "@jjrawlins/cdk-diff-pr-github-action.CdkDiffStack": {
3690
4324
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
@@ -4155,7 +4789,9 @@
4155
4789
  "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplate": {
4156
4790
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4157
4791
  "docs": {
4158
- "stability": "experimental"
4792
+ "remarks": "For non-Projen projects, use `CdkDriftIamTemplateGenerator` directly.",
4793
+ "stability": "experimental",
4794
+ "summary": "Projen construct that emits a CloudFormation template with minimal IAM permissions for the CDK Drift Detection Workflow."
4159
4795
  },
4160
4796
  "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplate",
4161
4797
  "initializer": {
@@ -4164,7 +4800,7 @@
4164
4800
  },
4165
4801
  "locationInModule": {
4166
4802
  "filename": "src/CdkDriftIamTemplate.ts",
4167
- "line": 12
4803
+ "line": 108
4168
4804
  },
4169
4805
  "parameters": [
4170
4806
  {
@@ -4178,34 +4814,110 @@
4178
4814
  "kind": "class",
4179
4815
  "locationInModule": {
4180
4816
  "filename": "src/CdkDriftIamTemplate.ts",
4181
- "line": 11
4817
+ "line": 107
4182
4818
  },
4183
4819
  "name": "CdkDriftIamTemplate",
4184
4820
  "symbolId": "src/CdkDriftIamTemplate:CdkDriftIamTemplate"
4185
4821
  },
4186
- "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateProps": {
4822
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator": {
4823
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4824
+ "docs": {
4825
+ "remarks": "No Projen dependency - can be used in any project.",
4826
+ "stability": "experimental",
4827
+ "summary": "Pure generator class for CDK Drift IAM templates."
4828
+ },
4829
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGenerator",
4830
+ "initializer": {
4831
+ "docs": {
4832
+ "stability": "experimental"
4833
+ }
4834
+ },
4835
+ "kind": "class",
4836
+ "locationInModule": {
4837
+ "filename": "src/CdkDriftIamTemplate.ts",
4838
+ "line": 19
4839
+ },
4840
+ "methods": [
4841
+ {
4842
+ "docs": {
4843
+ "stability": "experimental",
4844
+ "summary": "Generate the AWS CLI deploy command for the IAM template."
4845
+ },
4846
+ "locationInModule": {
4847
+ "filename": "src/CdkDriftIamTemplate.ts",
4848
+ "line": 86
4849
+ },
4850
+ "name": "generateDeployCommand",
4851
+ "parameters": [
4852
+ {
4853
+ "name": "templatePath",
4854
+ "optional": true,
4855
+ "type": {
4856
+ "primitive": "string"
4857
+ }
4858
+ }
4859
+ ],
4860
+ "returns": {
4861
+ "type": {
4862
+ "primitive": "string"
4863
+ }
4864
+ },
4865
+ "static": true
4866
+ },
4867
+ {
4868
+ "docs": {
4869
+ "stability": "experimental",
4870
+ "summary": "Generate the CloudFormation IAM template as a YAML string."
4871
+ },
4872
+ "locationInModule": {
4873
+ "filename": "src/CdkDriftIamTemplate.ts",
4874
+ "line": 23
4875
+ },
4876
+ "name": "generateTemplate",
4877
+ "parameters": [
4878
+ {
4879
+ "name": "props",
4880
+ "type": {
4881
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGeneratorProps"
4882
+ }
4883
+ }
4884
+ ],
4885
+ "returns": {
4886
+ "type": {
4887
+ "primitive": "string"
4888
+ }
4889
+ },
4890
+ "static": true
4891
+ }
4892
+ ],
4893
+ "name": "CdkDriftIamTemplateGenerator",
4894
+ "symbolId": "src/CdkDriftIamTemplate:CdkDriftIamTemplateGenerator"
4895
+ },
4896
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGeneratorProps": {
4187
4897
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4188
4898
  "datatype": true,
4189
4899
  "docs": {
4190
- "stability": "experimental"
4900
+ "stability": "experimental",
4901
+ "summary": "Props for generating CDK Drift IAM templates (no Projen dependency)."
4191
4902
  },
4192
- "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateProps",
4903
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGeneratorProps",
4193
4904
  "kind": "interface",
4194
4905
  "locationInModule": {
4195
4906
  "filename": "src/CdkDriftIamTemplate.ts",
4196
- "line": 3
4907
+ "line": 6
4197
4908
  },
4198
- "name": "CdkDriftIamTemplateProps",
4909
+ "name": "CdkDriftIamTemplateGeneratorProps",
4199
4910
  "properties": [
4200
4911
  {
4201
4912
  "abstract": true,
4202
4913
  "docs": {
4203
- "stability": "experimental"
4914
+ "stability": "experimental",
4915
+ "summary": "Region for the OIDC trust condition."
4204
4916
  },
4205
4917
  "immutable": true,
4206
4918
  "locationInModule": {
4207
4919
  "filename": "src/CdkDriftIamTemplate.ts",
4208
- "line": 8
4920
+ "line": 12
4209
4921
  },
4210
4922
  "name": "oidcRegion",
4211
4923
  "type": {
@@ -4215,12 +4927,13 @@
4215
4927
  {
4216
4928
  "abstract": true,
4217
4929
  "docs": {
4218
- "stability": "experimental"
4930
+ "stability": "experimental",
4931
+ "summary": "ARN of the existing GitHub OIDC role that can assume this drift role."
4219
4932
  },
4220
4933
  "immutable": true,
4221
4934
  "locationInModule": {
4222
4935
  "filename": "src/CdkDriftIamTemplate.ts",
4223
- "line": 7
4936
+ "line": 10
4224
4937
  },
4225
4938
  "name": "oidcRoleArn",
4226
4939
  "type": {
@@ -4230,42 +4943,66 @@
4230
4943
  {
4231
4944
  "abstract": true,
4232
4945
  "docs": {
4233
- "stability": "experimental"
4946
+ "stability": "experimental",
4947
+ "summary": "Name for the IAM role."
4234
4948
  },
4235
4949
  "immutable": true,
4236
4950
  "locationInModule": {
4237
4951
  "filename": "src/CdkDriftIamTemplate.ts",
4238
- "line": 4
4952
+ "line": 8
4239
4953
  },
4240
- "name": "project",
4954
+ "name": "roleName",
4241
4955
  "type": {
4242
- "primitive": "any"
4956
+ "primitive": "string"
4243
4957
  }
4244
- },
4958
+ }
4959
+ ],
4960
+ "symbolId": "src/CdkDriftIamTemplate:CdkDriftIamTemplateGeneratorProps"
4961
+ },
4962
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateProps": {
4963
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4964
+ "datatype": true,
4965
+ "docs": {
4966
+ "stability": "experimental",
4967
+ "summary": "Props for the Projen-integrated CDK Drift IAM template construct."
4968
+ },
4969
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateProps",
4970
+ "interfaces": [
4971
+ "@jjrawlins/cdk-diff-pr-github-action.CdkDriftIamTemplateGeneratorProps"
4972
+ ],
4973
+ "kind": "interface",
4974
+ "locationInModule": {
4975
+ "filename": "src/CdkDriftIamTemplate.ts",
4976
+ "line": 94
4977
+ },
4978
+ "name": "CdkDriftIamTemplateProps",
4979
+ "properties": [
4245
4980
  {
4246
4981
  "abstract": true,
4247
4982
  "docs": {
4248
- "stability": "experimental"
4983
+ "stability": "experimental",
4984
+ "summary": "Projen project instance."
4249
4985
  },
4250
4986
  "immutable": true,
4251
4987
  "locationInModule": {
4252
4988
  "filename": "src/CdkDriftIamTemplate.ts",
4253
- "line": 5
4989
+ "line": 96
4254
4990
  },
4255
- "name": "roleName",
4991
+ "name": "project",
4256
4992
  "type": {
4257
- "primitive": "string"
4993
+ "primitive": "any"
4258
4994
  }
4259
4995
  },
4260
4996
  {
4261
4997
  "abstract": true,
4262
4998
  "docs": {
4263
- "stability": "experimental"
4999
+ "stability": "experimental",
5000
+ "summary": "Output path for the template file (default: 'cdk-drift-workflow-iam-template.yaml')."
4264
5001
  },
4265
5002
  "immutable": true,
4266
5003
  "locationInModule": {
4267
5004
  "filename": "src/CdkDriftIamTemplate.ts",
4268
- "line": 6
5005
+ "line": 98
4269
5006
  },
4270
5007
  "name": "outputPath",
4271
5008
  "optional": true,
@@ -4276,6 +5013,105 @@
4276
5013
  ],
4277
5014
  "symbolId": "src/CdkDriftIamTemplate:CdkDriftIamTemplateProps"
4278
5015
  },
5016
+ "@jjrawlins/cdk-diff-pr-github-action.GitHubOidcConfig": {
5017
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
5018
+ "datatype": true,
5019
+ "docs": {
5020
+ "stability": "experimental",
5021
+ "summary": "GitHub repository restrictions for OIDC authentication."
5022
+ },
5023
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.GitHubOidcConfig",
5024
+ "kind": "interface",
5025
+ "locationInModule": {
5026
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5027
+ "line": 28
5028
+ },
5029
+ "name": "GitHubOidcConfig",
5030
+ "properties": [
5031
+ {
5032
+ "abstract": true,
5033
+ "docs": {
5034
+ "stability": "experimental",
5035
+ "summary": "GitHub organization or username (e.g., 'my-org' or 'my-username')."
5036
+ },
5037
+ "immutable": true,
5038
+ "locationInModule": {
5039
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5040
+ "line": 32
5041
+ },
5042
+ "name": "owner",
5043
+ "type": {
5044
+ "primitive": "string"
5045
+ }
5046
+ },
5047
+ {
5048
+ "abstract": true,
5049
+ "docs": {
5050
+ "stability": "experimental",
5051
+ "summary": "Repository names allowed to assume the role (e.g., ['repo1', 'repo2']) Use ['*'] to allow all repos in the organization."
5052
+ },
5053
+ "immutable": true,
5054
+ "locationInModule": {
5055
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5056
+ "line": 38
5057
+ },
5058
+ "name": "repositories",
5059
+ "type": {
5060
+ "collection": {
5061
+ "elementtype": {
5062
+ "primitive": "string"
5063
+ },
5064
+ "kind": "array"
5065
+ }
5066
+ }
5067
+ },
5068
+ {
5069
+ "abstract": true,
5070
+ "docs": {
5071
+ "stability": "experimental",
5072
+ "summary": "Additional subject claims for fine-grained access e.g., ['pull_request', 'environment:production']."
5073
+ },
5074
+ "immutable": true,
5075
+ "locationInModule": {
5076
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5077
+ "line": 50
5078
+ },
5079
+ "name": "additionalClaims",
5080
+ "optional": true,
5081
+ "type": {
5082
+ "collection": {
5083
+ "elementtype": {
5084
+ "primitive": "string"
5085
+ },
5086
+ "kind": "array"
5087
+ }
5088
+ }
5089
+ },
5090
+ {
5091
+ "abstract": true,
5092
+ "docs": {
5093
+ "stability": "experimental",
5094
+ "summary": "Branch patterns allowed (e.g., ['main', 'release/*']) Default: ['*'] (all branches)."
5095
+ },
5096
+ "immutable": true,
5097
+ "locationInModule": {
5098
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5099
+ "line": 44
5100
+ },
5101
+ "name": "branches",
5102
+ "optional": true,
5103
+ "type": {
5104
+ "collection": {
5105
+ "elementtype": {
5106
+ "primitive": "string"
5107
+ },
5108
+ "kind": "array"
5109
+ }
5110
+ }
5111
+ }
5112
+ ],
5113
+ "symbolId": "src/CdkDiffIamTemplateStackSet:GitHubOidcConfig"
5114
+ },
4279
5115
  "@jjrawlins/cdk-diff-pr-github-action.Stack": {
4280
5116
  "assembly": "@jjrawlins/cdk-diff-pr-github-action",
4281
5117
  "datatype": true,
@@ -4353,8 +5189,98 @@
4353
5189
  }
4354
5190
  ],
4355
5191
  "symbolId": "src/CdkDriftDetectionWorkflow:Stack"
5192
+ },
5193
+ "@jjrawlins/cdk-diff-pr-github-action.StackSetAutoDeployment": {
5194
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
5195
+ "datatype": true,
5196
+ "docs": {
5197
+ "stability": "experimental",
5198
+ "summary": "Configuration for StackSet auto-deployment."
5199
+ },
5200
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.StackSetAutoDeployment",
5201
+ "kind": "interface",
5202
+ "locationInModule": {
5203
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5204
+ "line": 18
5205
+ },
5206
+ "name": "StackSetAutoDeployment",
5207
+ "properties": [
5208
+ {
5209
+ "abstract": true,
5210
+ "docs": {
5211
+ "stability": "experimental",
5212
+ "summary": "Enable auto-deployment to new accounts in target OUs (default: true)."
5213
+ },
5214
+ "immutable": true,
5215
+ "locationInModule": {
5216
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5217
+ "line": 20
5218
+ },
5219
+ "name": "enabled",
5220
+ "optional": true,
5221
+ "type": {
5222
+ "primitive": "boolean"
5223
+ }
5224
+ },
5225
+ {
5226
+ "abstract": true,
5227
+ "docs": {
5228
+ "stability": "experimental",
5229
+ "summary": "Retain stacks when account leaves OU (default: false)."
5230
+ },
5231
+ "immutable": true,
5232
+ "locationInModule": {
5233
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5234
+ "line": 22
5235
+ },
5236
+ "name": "retainStacksOnAccountRemoval",
5237
+ "optional": true,
5238
+ "type": {
5239
+ "primitive": "boolean"
5240
+ }
5241
+ }
5242
+ ],
5243
+ "symbolId": "src/CdkDiffIamTemplateStackSet:StackSetAutoDeployment"
5244
+ },
5245
+ "@jjrawlins/cdk-diff-pr-github-action.StackSetRoleSelection": {
5246
+ "assembly": "@jjrawlins/cdk-diff-pr-github-action",
5247
+ "docs": {
5248
+ "stability": "experimental",
5249
+ "summary": "Which roles to include in the StackSet."
5250
+ },
5251
+ "fqn": "@jjrawlins/cdk-diff-pr-github-action.StackSetRoleSelection",
5252
+ "kind": "enum",
5253
+ "locationInModule": {
5254
+ "filename": "src/CdkDiffIamTemplateStackSet.ts",
5255
+ "line": 6
5256
+ },
5257
+ "members": [
5258
+ {
5259
+ "docs": {
5260
+ "stability": "experimental",
5261
+ "summary": "Include only the changeset role (CdkChangesetRole)."
5262
+ },
5263
+ "name": "CHANGESET_ONLY"
5264
+ },
5265
+ {
5266
+ "docs": {
5267
+ "stability": "experimental",
5268
+ "summary": "Include only the drift role (CdkDriftRole)."
5269
+ },
5270
+ "name": "DRIFT_ONLY"
5271
+ },
5272
+ {
5273
+ "docs": {
5274
+ "stability": "experimental",
5275
+ "summary": "Include both roles (default)."
5276
+ },
5277
+ "name": "BOTH"
5278
+ }
5279
+ ],
5280
+ "name": "StackSetRoleSelection",
5281
+ "symbolId": "src/CdkDiffIamTemplateStackSet:StackSetRoleSelection"
4356
5282
  }
4357
5283
  },
4358
- "version": "0.0.72",
4359
- "fingerprint": "WOeSrMNsE4tsIMyTo8iOq0QgIUj37Ow0yH7my4hROc0="
5284
+ "version": "1.0.0",
5285
+ "fingerprint": "9pMOy4tAMCoGCv5oj3QE0hewzoeH7Z47zUhXLwzBpok="
4360
5286
  }