Skip to content

fix(GuParameterStoreReadPolicy): Remove hard-coded PolicyName#2932

Closed
akash1810 wants to merge 1 commit into
mainfrom
aa/remove-policy-name
Closed

fix(GuParameterStoreReadPolicy): Remove hard-coded PolicyName#2932
akash1810 wants to merge 1 commit into
mainfrom
aa/remove-policy-name

Conversation

@akash1810

Copy link
Copy Markdown
Member

What does this change?

In #2929 GuParameterStoreReadPolicy became a singleton scoped to an App. This change stops hard-coding the PolicyName property, reverting to AWS default behaviour. This is because AWS::IAM::Policy resources in a CFN stack must have a unique policy name. If a CFN stack has two applications (e.g. api and frontend) we need two AWS::IAM::Policy's each with their own PolicyName.

How to test

See updated snapshots.

How can we measure success?

Supporting multiple apps in a single CFN stack. For example https://github.com/guardian/cdk-playground/blob/main/cdk/lib/cdk-playground.ts.

Have we considered potential risks?

This is a functional no-op, however clients would need to update their snapshots.

Checklist

  • I have listed any breaking changes, along with a migration path 1
  • I have updated the documentation as required for the described changes 2

Footnotes

  1. Consider whether this is something that will mean changes to projects that have already been migrated, or to the CDK CLI tool. If changes are required, consider adding a checklist here and/or linking to related PRs.

  2. If you are adding a new construct or pattern, has new documentation been added? If you are amending defaults or changing behaviour, are the existing docs still valid?

In v64.0.0 `GuParameterStoreReadPolicy` became a singleton scoped to an `App`.

This change stops hard-coding the `PolicyName` property, reverting to AWS default behaviour.
This is because `AWS::IAM::Policy` resources in a CFN stack must have a unique policy name.
@akash1810 akash1810 requested a review from a team as a code owner July 6, 2026 13:24
@akash1810 akash1810 added the fix Departmental tracking: fix label Jul 6, 2026
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 282d9d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/cdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@akash1810 akash1810 marked this pull request as draft July 6, 2026 13:25
@akash1810 akash1810 closed this Jul 7, 2026
@akash1810 akash1810 deleted the aa/remove-policy-name branch July 7, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Departmental tracking: fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants