From fb78f32388c6187b40e1cc8efcf0603a10ca0288 Mon Sep 17 00:00:00 2001 From: Andrew Humphrey Date: Wed, 7 Sep 2022 10:14:58 +1200 Subject: [PATCH 1/2] Force us-east-1 to get complete data --- iamy/resourcegroupstagging.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iamy/resourcegroupstagging.go b/iamy/resourcegroupstagging.go index 4f04a96..ea8d159 100644 --- a/iamy/resourcegroupstagging.go +++ b/iamy/resourcegroupstagging.go @@ -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" @@ -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")), } } From acee7789c1c1e4d8fc49a625391de33ff41ecac6 Mon Sep 17 00:00:00 2001 From: Andrew Humphrey Date: Wed, 7 Sep 2022 12:05:40 +1200 Subject: [PATCH 2/2] Go tabs --- iamy/resourcegroupstagging.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iamy/resourcegroupstagging.go b/iamy/resourcegroupstagging.go index ea8d159..cb7c01e 100644 --- a/iamy/resourcegroupstagging.go +++ b/iamy/resourcegroupstagging.go @@ -3,7 +3,7 @@ package iamy import ( "log" - "github.com/aws/aws-sdk-go/aws" + "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" @@ -14,7 +14,7 @@ type resourceGroupsTaggingAPIClient struct { } func newResourceGroupsTaggingAPIClient(sess *session.Session) *resourceGroupsTaggingAPIClient { - // Force us of us-east-1 otherwise tags will not be returned for global resources + // Force us of us-east-1 otherwise tags will not be returned for global resources return &resourceGroupsTaggingAPIClient{ resourcegroupstaggingapi.New(sess, aws.NewConfig().WithRegion("us-east-1")), }