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

resource/aws_sqs_queue: Skip SQS ListQueueTags in aws-us-gov partition #3376

Merged
merged 1 commit into from
Feb 14, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Feb 14, 2018

Closes #2534 It seems there are other eventual consistency issues in us-gov-west-1 (we are correctly calling SetQueueAttributes), but this at least allows the resource to be usable for folks.

Previously:

 make testacc TEST=./aws TESTARGS='-run=TestAccAWSSQSQueue_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSQSQueue_basic -timeout 120m
=== RUN   TestAccAWSSQSQueue_basic
--- FAIL: TestAccAWSSQSQueue_basic (9.42s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_sqs_queue.queue: 1 error(s) occurred:

		* aws_sqs_queue.queue: InvalidAction: The action ListQueueTags is not valid for this endpoint.
			status code: 400, request id: dd0b3da4-12e0-51c8-82d6-6f5a40467820
make testacc TEST=./aws TESTARGS='-run=TestAccAWSSQSQueue_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSQSQueue_basic -timeout 120m
=== RUN   TestAccAWSSQSQueue_basic
--- FAIL: TestAccAWSSQSQueue_basic (29.12s)
	testing.go:513: Step 1 error: After applying this step, the plan was not empty:

		DIFF:

		UPDATE: aws_sqs_queue.queue
		  delay_seconds:              "0" => "90"
		  max_message_size:           "262144" => "2048"
		  message_retention_seconds:  "345600" => "86400"
		  receive_wait_time_seconds:  "0" => "10"
		  visibility_timeout_seconds: "30" => "60"

@bflad bflad added bug Addresses a defect in current functionality. service/sqs Issues and PRs that pertain to the sqs service. labels Feb 14, 2018
@bflad bflad added this to the v1.10.0 milestone Feb 14, 2018
@ghost ghost added the size/S Managed by automation to categorize the size of a PR. label Feb 14, 2018
if err != nil {
return err
tags := make(map[string]string)
if !meta.(*AWSClient).IsGovCloud() {
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: You could cast meta once and then use client.sqsconn above and client.IsGovCloud() here, totally no big deal though. 👌

}
d.Set("tags", tagsToMapGeneric(listTagsOutput.Tags))
d.Set("tags", tags)
Copy link
Member

Choose a reason for hiding this comment

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

I would argue we probably shouldn't be setting tags at all in such case, is there any reason to do that?

@bflad bflad merged commit a5f9efc into master Feb 14, 2018
@bflad bflad deleted the b-aws_sqs_queue-us-gov-listtags branch February 14, 2018 16:08
bflad added a commit that referenced this pull request Feb 14, 2018
@bflad
Copy link
Contributor Author

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.

@ghost
Copy link

ghost commented Apr 7, 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 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/sqs Issues and PRs that pertain to the sqs service. size/S Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQS queues in govcloud don't support ListQueueTags
2 participants