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

"CreateStack" permission is not necessary #62

Open
eladb opened this issue Jun 17, 2021 · 4 comments
Open

"CreateStack" permission is not necessary #62

eladb opened this issue Jun 17, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@eladb
Copy link

eladb commented Jun 17, 2021

In restricted environments, in which only ChangeSet-based creation of stacks is possible, it is impossible to use this action.

Our use case is as follows: we configure the job (using aws-actions/configure-aws-credentials) to assume an IAM role which will execute the CloudFormation deployment action. This role only has Change/ExecuteChangeSet IAM permissions.

This works for updating stacks, but for new stacks, aws-cloudformation-github-deploy action will use CreateStack, which will fail in our case.

I think it should be possible to use CreateChangeSet with ChangeSetType set to CREATE in case the stack does not exist. This will keep the same behavior while requiring a less privileged role.

See example here

If this sounds good, I am happy to contribute of course.

@eladb
Copy link
Author

eladb commented Jun 18, 2021

@katallaxie let me know what you think about this

@josealdaco
Copy link
Contributor

josealdaco commented Dec 15, 2023

This would be a great implementation but would require making separate calls since as @kddejong mentioned, termination protection and policy changes currently can't be used with createChangeSet.

@josealdaco
Copy link
Contributor

@kddejong Would the changes be appropriate for #120 or will a new PR be required?

@kddejong
Copy link
Contributor

I was going to merge this in and then adjust from there as we also have the aws-sdk v3 migration pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants