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

Work around the resourcegroupsapi being broken if called outside us-east-1 #29

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion iamy/resourcegroupstagging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package iamy
import (
"log"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/resourcegroupstaggingapiiface"
Expand All @@ -13,8 +14,9 @@ type resourceGroupsTaggingAPIClient struct {
}

func newResourceGroupsTaggingAPIClient(sess *session.Session) *resourceGroupsTaggingAPIClient {
// Force us of us-east-1 otherwise tags will not be returned for global resources
return &resourceGroupsTaggingAPIClient{
resourcegroupstaggingapi.New(sess),
resourcegroupstaggingapi.New(sess, aws.NewConfig().WithRegion("us-east-1")),
}
}

Expand Down