Skip to content

Commit

Permalink
Merge pull request hashicorp#3794 from terraform-providers/f-aws_sqs_…
Browse files Browse the repository at this point in the history
…queue-remove-isgovcloud-check

resource/aws_sqs_queue: Remove explicit IsGovCloud() check
  • Loading branch information
bflad authored Mar 15, 2018
2 parents fcee630 + c3436d7 commit 9159c92
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions aws/resource_aws_sqs_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,17 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error {
d.Set("content_based_deduplication", d.Get("content_based_deduplication").(bool))

tags := make(map[string]string)
if !meta.(*AWSClient).IsGovCloud() {
listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{
QueueUrl: aws.String(d.Id()),
})
if err != nil {
listTagsOutput, err := sqsconn.ListQueueTags(&sqs.ListQueueTagsInput{
QueueUrl: aws.String(d.Id()),
})
if err != nil {
// Non-standard partitions (e.g. US Gov) and some local development
// solutions do not yet support this API call. Depending on the
// implementation it may return InvalidAction or AWS.SimpleQueueService.UnsupportedOperation
if !isAWSErr(err, "InvalidAction", "") && !isAWSErr(err, sqs.ErrCodeUnsupportedOperation, "") {
return err
}
} else {
tags = tagsToMapGeneric(listTagsOutput.Tags)
}
d.Set("tags", tags)
Expand Down

0 comments on commit 9159c92

Please sign in to comment.