Skip to content

Conversation

go-to-k
Copy link
Contributor

@go-to-k go-to-k commented Sep 26, 2024

Issue # (if applicable)

Closes #31558.

Reason for this change

SNS topic policy is not created even if enforceSSL is enabled, until calling addToResourcePolicy method.

But, originally, the policy should be created without calling the addToResourcePolicy method.

Description of changes

The topic policy is created first if the enforceSSL is enabled.

Description of how you validated changes

Unit and integ tests.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team September 26, 2024 08:36
@github-actions github-actions bot added bug This issue is a bug. p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Sep 26, 2024
Comment on lines -238 to -232
{
'Sid': '0',
'Action': 'sns:*',
'Effect': 'Allow',
'Principal': { 'AWS': 'arn' },
'Resource': '*',
},
Copy link
Contributor Author

@go-to-k go-to-k Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the SSL policy was created after the addToResourcePolicy method was called. But now the SSL policy is created first, so this Sid by the addToResourcePolicy method will be 1, i.e. after the SSL policy.

This is NOT a breaking change, although it does cause a change in the CloudFormation template.

          {
            'Sid': '1',
            'Action': 'sns:*',
            'Effect': 'Allow',
            'Principal': { 'AWS': 'arn' },
            'Resource': '*',
          },

moved to: #31569 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that it’s just a change to the Sid and that the policy itself remains unchanged, so it won’t result in a destructive change. That makes sense.

Comment on lines +283 to +289
{
'Sid': '1',
'Action': 'sns:*',
'Effect': 'Allow',
'Principal': { 'AWS': 'arn' },
'Resource': '*',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 26, 2024
Copy link
Contributor

@badmintoncryer badmintoncryer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! I have nothing to say.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Jan 10, 2025
GavinZZ
GavinZZ previously approved these changes Jan 31, 2025
Copy link
Contributor

mergify bot commented Jan 31, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 31, 2025
Copy link
Contributor

mergify bot commented Jan 31, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@go-to-k
Copy link
Contributor Author

go-to-k commented Jan 31, 2025

@Mergifyio update

Copy link
Contributor

mergify bot commented Jan 31, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/pr-linter.yml without workflows permission

@go-to-k
Copy link
Contributor Author

go-to-k commented Jan 31, 2025

@Mergifyio update

Copy link
Contributor

mergify bot commented Jan 31, 2025

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally.
GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/pr-linter.yml without workflows permission

@go-to-k
Copy link
Contributor Author

go-to-k commented Jan 31, 2025

@GavinZZ Could you please handle it and merge?

The collect workflow is still waiting.

collect Expected — Waiting for status to be reported

And the update with mergify failed: see the above comment.

@mergify mergify bot dismissed GavinZZ’s stale review January 31, 2025 21:19

Pull request has been modified.

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.84%. Comparing base (330a919) to head (443a032).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #31569   +/-   ##
=======================================
  Coverage   80.84%   80.84%           
=======================================
  Files         232      232           
  Lines       14135    14135           
  Branches     2460     2460           
=======================================
  Hits        11428    11428           
  Misses       2427     2427           
  Partials      280      280           
Flag Coverage Δ
suite.unit 80.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 79.64% <ø> (ø)
packages/aws-cdk-lib/core 82.17% <ø> (ø)

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 443a032
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Jan 31, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@GavinZZ GavinZZ merged commit b3975c5 into aws:main Jan 31, 2025
20 of 21 checks passed
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2025
@go-to-k go-to-k deleted the sns-ssl branch February 1, 2025 03:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

L2 SNS Topic: Setting enforceSSL prop to true does not create AWS::SNS::TopicPolicy
4 participants