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

r/aws_sqs_queue allow SQS name validation during terraform validate #2837

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

sjauld
Copy link
Contributor

@sjauld sjauld commented Jan 3, 2018

Fixes #2835.

I have repurposed the validateSQSQueueName function to allow for both FIFO and non-FIFO queue names which therefore can be used in the Schema. I moved the old functionality to the new validateSQSNonFifoQueueName function. I also bumped the FIFO and non-FIFO tests to test against both relevant functions.

@radeksimko radeksimko added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 3, 2018
@sjauld
Copy link
Contributor Author

sjauld commented Jan 3, 2018

Forgot to add the test output!

$ TF_ACC=1 aws-vault exec development -- go test -v ./... -run SQS -timeout 60m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSSQSQueue_importBasic
--- PASS: TestAccAWSSQSQueue_importBasic (46.19s)
=== RUN   TestAccAWSSQSQueue_importFifo
--- PASS: TestAccAWSSQSQueue_importFifo (45.19s)
=== RUN   TestAccAWSSQSQueue_importEncryption
--- PASS: TestAccAWSSQSQueue_importEncryption (51.31s)
=== RUN   TestAccAWSSQSQueuePolicy_basic
--- PASS: TestAccAWSSQSQueuePolicy_basic (45.92s)
=== RUN   TestAccAWSSQSQueuePolicy_import
--- PASS: TestAccAWSSQSQueuePolicy_import (52.12s)
=== RUN   TestAccAWSSQSQueue_basic
--- PASS: TestAccAWSSQSQueue_basic (112.30s)
=== RUN   TestAccAWSSQSQueue_tags
--- PASS: TestAccAWSSQSQueue_tags (107.22s)
=== RUN   TestAccAWSSQSQueue_namePrefix
--- PASS: TestAccAWSSQSQueue_namePrefix (41.17s)
=== RUN   TestAccAWSSQSQueue_policy
--- PASS: TestAccAWSSQSQueue_policy (52.22s)
=== RUN   TestAccAWSSQSQueue_redrivePolicy
--- PASS: TestAccAWSSQSQueue_redrivePolicy (52.85s)
=== RUN   TestAccAWSSQSQueue_Policybasic
--- PASS: TestAccAWSSQSQueue_Policybasic (53.46s)
=== RUN   TestAccAWSSQSQueue_FIFO
--- PASS: TestAccAWSSQSQueue_FIFO (41.03s)
=== RUN   TestAccAWSSQSQueue_FIFOExpectNameError
--- PASS: TestAccAWSSQSQueue_FIFOExpectNameError (11.68s)
=== RUN   TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication
--- PASS: TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication (40.40s)
=== RUN   TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError
--- PASS: TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError (11.03s)
=== RUN   TestAccAWSSQSQueue_Encryption
--- PASS: TestAccAWSSQSQueue_Encryption (40.82s)
=== RUN   TestValidateSQSQueueName
--- PASS: TestValidateSQSQueueName (0.00s)
=== RUN   TestValidateSQSFifoQueueName
--- PASS: TestValidateSQSFifoQueueName (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	804.955s

@bflad bflad added the service/sqs Issues and PRs that pertain to the sqs service. label Jan 11, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks so much!

make testacc TEST=./aws TESTARGS='-run=TestAccAWSSQSQueue'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSQSQueue -timeout 120m
=== RUN   TestAccAWSSQSQueue_importBasic
--- PASS: TestAccAWSSQSQueue_importBasic (14.54s)
=== RUN   TestAccAWSSQSQueue_importFifo
--- PASS: TestAccAWSSQSQueue_importFifo (15.59s)
=== RUN   TestAccAWSSQSQueue_importEncryption
--- PASS: TestAccAWSSQSQueue_importEncryption (12.00s)
=== RUN   TestAccAWSSQSQueuePolicy_basic
--- PASS: TestAccAWSSQSQueuePolicy_basic (14.32s)
=== RUN   TestAccAWSSQSQueuePolicy_import
--- PASS: TestAccAWSSQSQueuePolicy_import (14.17s)
=== RUN   TestAccAWSSQSQueue_basic
--- PASS: TestAccAWSSQSQueue_basic (28.56s)
=== RUN   TestAccAWSSQSQueue_tags
--- PASS: TestAccAWSSQSQueue_tags (29.72s)
=== RUN   TestAccAWSSQSQueue_namePrefix
--- PASS: TestAccAWSSQSQueue_namePrefix (11.04s)
=== RUN   TestAccAWSSQSQueue_policy
--- PASS: TestAccAWSSQSQueue_policy (16.33s)
=== RUN   TestAccAWSSQSQueue_redrivePolicy
--- PASS: TestAccAWSSQSQueue_redrivePolicy (15.00s)
=== RUN   TestAccAWSSQSQueue_Policybasic
--- PASS: TestAccAWSSQSQueue_Policybasic (16.04s)
=== RUN   TestAccAWSSQSQueue_FIFO
--- PASS: TestAccAWSSQSQueue_FIFO (10.62s)
=== RUN   TestAccAWSSQSQueue_FIFOExpectNameError
--- PASS: TestAccAWSSQSQueue_FIFOExpectNameError (2.51s)
=== RUN   TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication
--- PASS: TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication (11.39s)
=== RUN   TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError
--- PASS: TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError (2.54s)
=== RUN   TestAccAWSSQSQueue_Encryption
--- PASS: TestAccAWSSQSQueue_Encryption (10.37s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	224.790s

@bflad bflad added this to the v1.10.0 milestone Feb 14, 2018
@bflad bflad merged commit 05768df into hashicorp:master Feb 14, 2018
bflad added a commit that referenced this pull request Feb 14, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@sjauld sjauld deleted the bugfix/SQS-name-validation branch November 1, 2018 22:15
@ghost
Copy link

ghost commented Apr 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/sqs Issues and PRs that pertain to the sqs service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQS Queue Name is not validated
3 participants