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

feat: stop propagateTags when no staskName is in the event #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s27y
Copy link

@s27y s27y commented Mar 30, 2023

Stop processing stack when the event doesn't have a value in detail.requestParameters.stackName

What is this PR about?

  • Stop propagate tags when an event received doesn't have a value for detail.requestParameters.stackName

Why?

  • We see many UpdateStack events with no value set for stackName.
  • For these kinds of events, propagateTags will not be able to do anything. So Instead of making a DescribeStasks call with no target stack name this change will skip the process of these events.
  • DescribeStacks with no target stack name require extra IAM action ListStacks, see AWS docs on Request Parameters - StackName

An example of events with no stackName:

image

Stop processing stack when the event doesn't have a value in detail.requestParameters.stackName
@s27y
Copy link
Author

s27y commented Mar 30, 2023

This if can be moved into src/functions/lib/propagate-tags.js#L37 or possibly make it as a filter at template.yml#L43
Let me know if there is anything I can make this change better.

@s27y
Copy link
Author

s27y commented Apr 3, 2023

@theburningmonk Could you have a look on this PR?

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

Successfully merging this pull request may close these issues.

1 participant