Skip to content
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

fix(cli): unable to set termination protection for pipeline stacks #9938

Merged
merged 2 commits into from Sep 9, 2020
Merged

fix(cli): unable to set termination protection for pipeline stacks #9938

merged 2 commits into from Sep 9, 2020

Conversation

ghost
Copy link

@ghost ghost commented Aug 24, 2020

Add cloudformation:UpdateTerminationProtection permission to the pipeline deployment role so that termination protection can be enabled for pipeline stacks.

Currently, creating a pipeline stack with termination protection set to true causes an error:

 ❌  PipelineStack failed: AccessDenied: User: arn:aws:sts::123456789012:assumed-role/cdk-hnb659fds-deploy-role-123456789012-eu-west-1/aws-cdk-william is not authorized to perform: cloudformation:UpdateTerminationProtection on resource: arn:aws:cloudformation:eu-west-1:123456789012:stack/PipelineStack/dbf8ad70-e5f4-11ea-961d-021e20b443de

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

@ghost
Copy link
Author

ghost commented Aug 24, 2020

As far as I can determine, there are no tests for the bootstrap stack template. Presumably this would mean that in this case the failed PR Linter check should be ignored?

@ghost
Copy link
Author

ghost commented Aug 31, 2020

@rix0rrr: Sorry to trouble you directly (and I chose you simply because you're a recent committer!), but I suspect this PR may be languishing because of the failed PR Linter check which, as I mentioned above, seems to be inappropriate here because as far as I can tell there are no tests for the bootstrap template. Would you be able to have a look and advise if there's anything more I need to do? Thanks.

Copy link
Contributor

@shivlaks shivlaks left a comment

Choose a reason for hiding this comment

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

changes look fine. have you run the integ tests yarn integ-cli or npm run integ-cli
there are some bootstrap integration tests that will can be executed. The tests can be found here

@shivlaks shivlaks changed the title fix(bootstrap): add permission to set termination protection fix(cli): unable to set termination protection for pipeline stacks Sep 1, 2020
@ghost
Copy link
Author

ghost commented Sep 2, 2020

Thanks for your reply, @shivlaks. I had been looking (fruitlessly, of course) for tests that check the actual deployed bootstrap resources. The CLI integration tests do pass.

Test Suites: 2 passed, 2 total
Tests:       40 passed, 40 total
Snapshots:   0 total
Time:        2713.236s, estimated 2816s
Ran all test suites.
✨  Done in 8328.37s.

@shivlaks shivlaks added the pr-linter/exempt-test The PR linter will not require test changes label Sep 2, 2020
shivlaks
shivlaks previously approved these changes Sep 2, 2020
Add `cloudformation:UpdateTerminationProtection` permission to the pipeline deployment
role so that termination protection can be enabled for stacks deployed from pipelines.
@mergify mergify bot dismissed shivlaks’s stale review September 3, 2020 05:27

Pull request has been modified.

@ghost
Copy link
Author

ghost commented Sep 3, 2020

Updated to current master branch. Which means re-approval is required, apologies.

@ghost
Copy link
Author

ghost commented Sep 7, 2020

Hello @shivlaks. Is there anything more I can (or need to) do to get this PR merged?

@shivlaks shivlaks requested a review from rix0rrr September 9, 2020 05:58
@shivlaks shivlaks added the pr/do-not-merge This PR should not be merged at this time. label Sep 9, 2020
@shivlaks shivlaks removed the pr/do-not-merge This PR should not be merged at this time. label Sep 9, 2020
@mergify
Copy link
Contributor

mergify bot commented Sep 9, 2020

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

@shivlaks
Copy link
Contributor

shivlaks commented Sep 9, 2020

@williterate approved! sorry for the delay. I wanted to sync with @rix0rrr to make sure he was good with it.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 35ec83b
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify
Copy link
Contributor

mergify bot commented Sep 9, 2020

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

@mergify mergify bot merged commit a00a4ee into aws:master Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-linter/exempt-test The PR linter will not require test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants