Skip to content

feat(appconfig): deletion protection check for configuration profile #34418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 23, 2025

Conversation

badmintoncryer
Copy link
Contributor

Issue # (if applicable)

None

Reason for this change

Cloudformation now supports for configuring deletion protection check for configuration profile in addition to environment.

https://docs.aws.amazon.com/appconfig/latest/userguide/deletion-protection.html
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-appconfig-configurationprofile.html#cfn-appconfig-configurationprofile-deletionprotectioncheck

Description of changes

  • Add deletionProtectionCheck to both HostedConfigurationProfileProps and SourcedConfigurationProfileProps

Describe any new or updated permissions being added

None

Description of how you validated changes

Add both 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 May 11, 2025 13:01
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels May 11, 2025
@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 May 12, 2025
@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 May 12, 2025
@samson-keung samson-keung self-assigned this May 13, 2025
* Deletion protection prevents a user from deleting a configuration profile if your application has called
* either `GetLatestConfiguration` or `GetConfiguration` for the configuration profile during the specified interval.
*
* @see https://docs.aws.amazon.com/appconfig/latest/userguide/delete-config-profile.html
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I've used the first one.

/**
* Configuration for deletion protection behavior.
*/
readonly deletionProtectionCheck?: DeletionProtectionCheck;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better to keep it private instead of exposing it for now until there is a use case to expose it. Keeping it private give us more flexibility in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're absolutely right. I've removed deletionProtectionCheck from IConfiguration.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 13, 2025
@mergify mergify bot dismissed samson-keung’s stale review May 14, 2025 15:09

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label May 14, 2025
@vishaalmehrishi
Copy link
Contributor

The CLI documentation suggests that a ProtectionPeriodInMinutes config is also possible

You can increase the default interval to a maximum of 24 hours. Run the following command to specify a new interval.

aws appconfig update-account-settings --deletion-protection Enabled=true,ProtectionPeriodInMinutes=a number between 15 and 1440

However, this does not seem to be supported by Cloudformation.

The PR looks good - thank you for contributing!

@mergify mergify bot dismissed vishaalmehrishi’s stale review May 20, 2025 13:05

Pull request has been modified.

@badmintoncryer
Copy link
Contributor Author

badmintoncryer commented May 20, 2025

@vishaalmehrishi Thank you for your review!! I've updated snapshot files to fix CI failure.

Copy link
Contributor

mergify bot commented May 23, 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 May 23, 2025
Copy link
Contributor

mergify bot commented May 23, 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).

Copy link
Contributor

mergify bot commented May 23, 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
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mergify mergify bot merged commit ce88c76 into aws:main May 23, 2025
15 of 16 checks passed
Copy link
Contributor

mergify bot commented May 23, 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).

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 May 23, 2025
@badmintoncryer badmintoncryer deleted the deletion-protection branch May 23, 2025 02:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants