remind101 / stacker_blueprints

DEPRECATED - moved to:
https://github.com/cloudtools/stacker_blueprints
BSD 2-Clause "Simplified" License
39 stars 53 forks source link

Add the FifoQueue parameter to sqs.Queues #118

Closed Lowercases closed 6 years ago

Lowercases commented 7 years ago

Add the FifoQueue parameter from CloudFormation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#cfn-sqs-queue-fifoqueue as a variable to sqs.Queque.

Please note that this parameter requires Replacement on update.

russellballestrini commented 7 years ago

Will merging this trigger the Replacement or is that something end users can schedule?

Lowercases commented 7 years ago

@russellballestrini It won't, however it seems there's a missing piece yet. AWS demands that the name of a FifoQueue end with ".fifo", but troposphere+stacker are unable to create a stack with a dot on it.

phobologic commented 7 years ago

@Lowercases Do you have an example that doesn't work? Honestly, I think we should probably just move this blueprint over to using TroposphereType - I think it should "just work".

The issue you're seeing with the .fifo name thing is because it doesn't look like this blueprint uses QueueName attribute of the SQS Queue resource. You're setting the Cloudformation resource name to use .fifo most likely, and Cloudformation resources can't have periods in them. Make sense?

Lowercases commented 7 years ago

@phobologic the latest versions of Troposphere work indeed with these queues.

Added now a check for QueueName to end with .fifo in case FifoQueue is provided, since CloudFormation will enforce it.

phobologic commented 7 years ago

@Lowercases cool - honestly though, I think we should pull the .fifo thing in troposphere directly, since this would be more generally useful. Want to pull that out of here and submit a PR to troposphere?

phobologic commented 7 years ago

You can see an example of how you'd add this kind of a validation here:

https://github.com/cloudtools/troposphere/blob/779ba85f7e1577e16161a26da480c9b892541471/troposphere/codebuild.py#L20

Lowercases commented 7 years ago

@mike LMK what you think! https://github.com/cloudtools/troposphere/compare/master...Lowercases:validate-fifo-queues

phobologic commented 7 years ago

Also - you really should add this .fifo logic to troposphere - we'd love to add it :)

Lowercases commented 7 years ago

Submitted with suggestions to https://github.com/cloudtools/troposphere/pull/757