Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

feat: Add tags for organizations.Account #942

Merged
merged 8 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions client/mocks/mock_organizations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions client/organizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func (m mockOrgClient) ListAccounts(ctx context.Context, params *organizations.L
return m.listAccounts(ctx, params, optFns...)
}

func (mockOrgClient) ListTagsForResource(ctx context.Context, input *organizations.ListTagsForResourceInput, f ...func(*organizations.Options)) (*organizations.ListTagsForResourceOutput, error) {
return &organizations.ListTagsForResourceOutput{Tags: nil, NextToken: nil}, nil
}

func Test_Org_Configure(t *testing.T) {
ctx := context.Background()
tests := []struct {
Expand Down
1 change: 1 addition & 0 deletions client/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ type MQClient interface {
type OrganizationsClient interface {
ListAccountsForParent(ctx context.Context, params *organizations.ListAccountsForParentInput, optFns ...func(*organizations.Options)) (*organizations.ListAccountsForParentOutput, error)
ListAccounts(ctx context.Context, params *organizations.ListAccountsInput, optFns ...func(*organizations.Options)) (*organizations.ListAccountsOutput, error)
organizations.ListTagsForResourceAPIClient
}

//go:generate mockgen -package=mocks -destination=./mocks/mock_rds.go . RdsClient
Expand Down
19 changes: 10 additions & 9 deletions docs/tables/aws_organizations_accounts.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

# Table: aws_organizations_accounts
Contains information about an AWS account that is a member of an organization.
Contains information about an AWS account that is a member of an organization
## Columns
| Name | Type | Description |
| ------------- | ------------- | ----- |
|account_id|text|The root/organizational unit AWS account|
|arn|text|The Amazon Resource Name (ARN) of the account.|
|email|text|The email address associated with the AWS account.|
|id|text|The unique identifier (ID) of the account.|
|joined_method|text|The method by which the account joined the organization.|
|joined_timestamp|timestamp without time zone|The date the account became a part of the organization.|
|name|text|The friendly name of the account.|
|status|text|The status of the account in the organization.|
|account_id|text|The AWS Account ID of the resource.|
|tags|jsonb|The AWS tags of the resource.|
|arn|text|The Amazon Resource Name (ARN) of the account|
|email|text|The email address associated with the AWS account|
|id|text|The unique identifier (ID) of the account|
|joined_method|text|The method by which the account joined the organization|
|joined_timestamp|timestamp without time zone|The date the account became a part of the organization|
|name|text|The friendly name of the account|
|status|text|The status of the account in the organization|
15 changes: 12 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,20 @@ require (
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.7
github.com/hashicorp/go-hclog v1.1.0
github.com/mitchellh/mapstructure v1.4.2
github.com/mitchellh/mapstructure v1.4.3
github.com/spf13/cast v1.4.1
github.com/stretchr/testify v1.7.0
)

require (
github.com/daixiang0/gci v0.3.3 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.3.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)

require (
github.com/Masterminds/squirrel v1.5.0 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
Expand Down Expand Up @@ -147,14 +156,14 @@ require (
github.com/xo/dburl v0.8.4 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/mod v0.5.0 // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.42.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading