From 76fa1749308601176018f4cbb5052050699a1aa0 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 18:59:01 -0700 Subject: [PATCH 1/7] feat: run against all enabled regions --- docs/config.md | 10 ++++++++ go.mod | 2 +- go.sum | 2 ++ pkg/awsutil/account.go | 46 +++++++++++++++++++++++++++++++++--- pkg/commands/nuke/command.go | 24 ++++++++++++++++++- pkg/common/version.go | 8 ++++++- 6 files changed, 86 insertions(+), 6 deletions(-) diff --git a/docs/config.md b/docs/config.md index d52f3db0..e5449104 100644 --- a/docs/config.md +++ b/docs/config.md @@ -70,6 +70,16 @@ The regions is a list of AWS regions that the tool will run against. The tool wi configuration. If no regions are listed, then the tool will **NOT** run against any region. Regions must be explicitly provided. +### All Enabled Regions + +You may specify the special region `all` to run against all enabled regions. This will run against all regions that are +enabled in the account. It will not run against regions that are disabled. It will also automatically include the +special region `global` which is for specific global resources. + +!!! important + The use of `all` will ignore all other regions specified in the configuration. It will only run against regions + that are enabled in the account. + ## Accounts The accounts section is a map of AWS Account IDs to their configuration. The account ID is the key and the value is the diff --git a/go.mod b/go.mod index 80434875..80068400 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/ekristen/aws-nuke go 1.21.6 require ( - github.com/aws/aws-sdk-go v1.50.4 + github.com/aws/aws-sdk-go v1.50.24 github.com/ekristen/libnuke v0.10.1 github.com/fatih/color v1.16.0 github.com/golang/mock v1.6.0 diff --git a/go.sum b/go.sum index 3e0db75e..7f894f56 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/aws/aws-sdk-go v1.50.4 h1:jJNhxunBgfjmCSjMZ3INwQ19ZN3RoGEZfgSCUYF/NZw= github.com/aws/aws-sdk-go v1.50.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.50.24 h1:3o2Pg7mOoVL0jv54vWtuafoZqAeEXLhm1tltWA2GcEw= +github.com/aws/aws-sdk-go v1.50.24/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= diff --git a/pkg/awsutil/account.go b/pkg/awsutil/account.go index 321ba562..f1ee33c7 100644 --- a/pkg/awsutil/account.go +++ b/pkg/awsutil/account.go @@ -4,8 +4,11 @@ import ( "fmt" "strings" + "github.com/gotidy/ptr" "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/sts" @@ -15,8 +18,10 @@ import ( type Account struct { Credentials - id string - aliases []string + id string + aliases []string + regions []string + disabledRegions []string } func NewAccount(creds Credentials, endpoints config.CustomEndpoints) (*Account, error) { @@ -49,6 +54,13 @@ func NewAccount(creds Credentials, endpoints config.CustomEndpoints) (*Account, return nil, errors.Wrap(err, "failed get caller identity") } + regionsOutput, err := ec2.New(defaultSession).DescribeRegions(&ec2.DescribeRegionsInput{ + AllRegions: ptr.Bool(true), + }) + if err != nil { + return nil, errors.Wrap(err, "failed to get regions") + } + globalSession, err := account.NewSession(GlobalRegionID, "") if err != nil { return nil, errors.Wrapf(err, "failed to create global session in %s", GlobalRegionID) @@ -66,16 +78,33 @@ func NewAccount(creds Credentials, endpoints config.CustomEndpoints) (*Account, } } - account.id = *identityOutput.Account + regions := []string{"global"} + var disabledRegions []string + for _, region := range regionsOutput.Regions { + logrus.Debugf("region: %s, status: %s", + ptr.ToString(region.RegionName), ptr.ToString(region.OptInStatus)) + + if ptr.ToString(region.OptInStatus) == "not-opted-in" { + disabledRegions = append(disabledRegions, *region.RegionName) + } else { + regions = append(regions, *region.RegionName) + } + } + + account.id = ptr.ToString(identityOutput.Account) account.aliases = aliases + account.regions = regions + account.disabledRegions = disabledRegions return &account, nil } +// ID returns the account ID func (a *Account) ID() string { return a.id } +// Alias returns the first alias for the account func (a *Account) Alias() string { if len(a.aliases) == 0 { return fmt.Sprintf("no-alias-%s", a.ID()) @@ -84,6 +113,7 @@ func (a *Account) Alias() string { return a.aliases[0] } +// Aliases returns the list of aliases for the account func (a *Account) Aliases() []string { return a.aliases } @@ -100,3 +130,13 @@ func (a *Account) ResourceTypeToServiceType(regionName, resourceType string) str } return "" } + +// Regions returns the list of regions that are enabled for the account +func (a *Account) Regions() []string { + return a.regions +} + +// DisabledRegions returns the list of regions that are disabled for the account +func (a *Account) DisabledRegions() []string { + return a.disabledRegions +} diff --git a/pkg/commands/nuke/command.go b/pkg/commands/nuke/command.go index 45dc48a1..6c692df4 100644 --- a/pkg/commands/nuke/command.go +++ b/pkg/commands/nuke/command.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/ekristen/libnuke/pkg/registry" "slices" + "strings" "time" "github.com/sirupsen/logrus" @@ -107,7 +108,7 @@ func execute(c *cli.Context) error { n := libnuke.New(params, filters, parsedConfig.Settings) n.SetRunSleep(5 * time.Second) - n.RegisterVersion(common.AppVersion.Summary) + n.RegisterVersion(fmt.Sprintf("> %s", common.AppVersion.String())) // Register our custom validate handler that validates the account and AWS nuke unique alias checks n.RegisterValidateHandler(func() error { @@ -143,6 +144,27 @@ func execute(c *cli.Context) error { registry.GetAlternativeResourceTypeMapping(), ) + // If the user has specified the "all" region, then we need to get the enabled regions for the account + // and use those. Otherwise, we will use the regions that are specified in the configuration. + if slices.Contains(parsedConfig.Regions, "all") { + parsedConfig.Regions = account.Regions() + + logrus.Info( + `"all" detected in region list, only enabled regions and "global" will be used, all others ignored`) + logrus.Infof("The following regions are enabled for the account (%d total):", len(parsedConfig.Regions)) + + printableRegions := make([]string, 0) + for i, region := range parsedConfig.Regions { + printableRegions = append(printableRegions, region) + if i%6 == 0 { // print 5 regions per line + logrus.Infof("> %s", strings.Join(printableRegions, ", ")) + printableRegions = make([]string, 0) + } else if i == len(parsedConfig.Regions)-1 { + logrus.Infof("> %s", strings.Join(printableRegions, ", ")) + } + } + } + // Register the scanners for each region that is defined in the configuration. for _, regionName := range parsedConfig.Regions { // Step 1 - Create the region object diff --git a/pkg/common/version.go b/pkg/common/version.go index 1c120923..9946992f 100644 --- a/pkg/common/version.go +++ b/pkg/common/version.go @@ -1,10 +1,12 @@ package common +import "fmt" + // NAME of the App var NAME = "aws-nuke" // SUMMARY of the Version -var SUMMARY = "3.0.0-beta.4" +var SUMMARY = "3.0.0-dev" // BRANCH of the Version var BRANCH = "dev" @@ -22,6 +24,10 @@ type AppVersionInfo struct { Commit string } +func (a *AppVersionInfo) String() string { + return fmt.Sprintf("%s - %s - %s", a.Name, a.Summary, a.Commit) +} + func init() { AppVersion = AppVersionInfo{ Name: NAME, From 32ef3aa08bacb072485ed55420bc237fdf5b49d7 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:04:29 -0700 Subject: [PATCH 2/7] fix: improved logging around all regions --- pkg/commands/nuke/command.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/commands/nuke/command.go b/pkg/commands/nuke/command.go index 6c692df4..fc38fae0 100644 --- a/pkg/commands/nuke/command.go +++ b/pkg/commands/nuke/command.go @@ -151,6 +151,11 @@ func execute(c *cli.Context) error { logrus.Info( `"all" detected in region list, only enabled regions and "global" will be used, all others ignored`) + + if len(parsedConfig.Regions) > 1 { + logrus.Warnf(`additional regions defined along with "all", these will be ignored!`) + } + logrus.Infof("The following regions are enabled for the account (%d total):", len(parsedConfig.Regions)) printableRegions := make([]string, 0) From 549eec4eabb024b45f7dc5d080886c0ce1143e8d Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:10:09 -0700 Subject: [PATCH 3/7] tests: update mocks for new aws-sdk version --- go.mod | 2 + go.sum | 12 +- mocks/mock_cloudformationiface/mock.go | 684 ++++++++++++++++++++++++- mocks/mock_iamiface/mock.go | 2 +- resources/cloudformation_mock_test.go | 2 + resources/iam_mock_test.go | 2 + 6 files changed, 694 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 80068400..c3f5fd90 100644 --- a/go.mod +++ b/go.mod @@ -29,9 +29,11 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/stevenle/topsort v0.2.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect + golang.org/x/tools v0.1.12 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 7f894f56..7d31a516 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/aws/aws-sdk-go v1.50.4 h1:jJNhxunBgfjmCSjMZ3INwQ19ZN3RoGEZfgSCUYF/NZw= -github.com/aws/aws-sdk-go v1.50.4/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go v1.50.24 h1:3o2Pg7mOoVL0jv54vWtuafoZqAeEXLhm1tltWA2GcEw= github.com/aws/aws-sdk-go v1.50.24/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= @@ -8,12 +6,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/ekristen/libnuke v0.8.0 h1:dxs+RosOcstbzvxnLyWN4mq1mAuOqMRUi7LEBC8rk44= -github.com/ekristen/libnuke v0.8.0/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= -github.com/ekristen/libnuke v0.9.1 h1:AoX1cggVTanP671Xuh6kJRv0HEp26NLqqPTzwYbz9I0= -github.com/ekristen/libnuke v0.9.1/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= -github.com/ekristen/libnuke v0.10.0 h1:MBtly8gdZ8EBU/RPE1gI1aDpJlqWKKGxURcW7f8HVxY= -github.com/ekristen/libnuke v0.10.0/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= github.com/ekristen/libnuke v0.10.1 h1:+BRdDPuFR/5a8eJu1gpShXYbYs9tJ2kemM83EsbPp2g= github.com/ekristen/libnuke v0.10.1/go.mod h1:WhYx7LDAkvkXwwfhWCASRn7fbifF8kfyhNsUj5zCCVs= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= @@ -68,6 +60,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -95,6 +89,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/mocks/mock_cloudformationiface/mock.go b/mocks/mock_cloudformationiface/mock.go index 49a91061..1ac65a20 100644 --- a/mocks/mock_cloudformationiface/mock.go +++ b/mocks/mock_cloudformationiface/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.49.21/service/cloudformation/cloudformationiface/interface.go +// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.50.24/service/cloudformation/cloudformationiface/interface.go // Package mock_cloudformationiface is a generated GoMock package. package mock_cloudformationiface @@ -336,6 +336,56 @@ func (mr *MockCloudFormationAPIMockRecorder) CreateChangeSetWithContext(arg0, ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateChangeSetWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).CreateChangeSetWithContext), varargs...) } +// CreateGeneratedTemplate mocks base method. +func (m *MockCloudFormationAPI) CreateGeneratedTemplate(arg0 *cloudformation.CreateGeneratedTemplateInput) (*cloudformation.CreateGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateGeneratedTemplate", arg0) + ret0, _ := ret[0].(*cloudformation.CreateGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateGeneratedTemplate indicates an expected call of CreateGeneratedTemplate. +func (mr *MockCloudFormationAPIMockRecorder) CreateGeneratedTemplate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGeneratedTemplate", reflect.TypeOf((*MockCloudFormationAPI)(nil).CreateGeneratedTemplate), arg0) +} + +// CreateGeneratedTemplateRequest mocks base method. +func (m *MockCloudFormationAPI) CreateGeneratedTemplateRequest(arg0 *cloudformation.CreateGeneratedTemplateInput) (*request.Request, *cloudformation.CreateGeneratedTemplateOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateGeneratedTemplateRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.CreateGeneratedTemplateOutput) + return ret0, ret1 +} + +// CreateGeneratedTemplateRequest indicates an expected call of CreateGeneratedTemplateRequest. +func (mr *MockCloudFormationAPIMockRecorder) CreateGeneratedTemplateRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGeneratedTemplateRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).CreateGeneratedTemplateRequest), arg0) +} + +// CreateGeneratedTemplateWithContext mocks base method. +func (m *MockCloudFormationAPI) CreateGeneratedTemplateWithContext(arg0 aws.Context, arg1 *cloudformation.CreateGeneratedTemplateInput, arg2 ...request.Option) (*cloudformation.CreateGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateGeneratedTemplateWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.CreateGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateGeneratedTemplateWithContext indicates an expected call of CreateGeneratedTemplateWithContext. +func (mr *MockCloudFormationAPIMockRecorder) CreateGeneratedTemplateWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGeneratedTemplateWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).CreateGeneratedTemplateWithContext), varargs...) +} + // CreateStack mocks base method. func (m *MockCloudFormationAPI) CreateStack(arg0 *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error) { m.ctrl.T.Helper() @@ -636,6 +686,56 @@ func (mr *MockCloudFormationAPIMockRecorder) DeleteChangeSetWithContext(arg0, ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteChangeSetWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeleteChangeSetWithContext), varargs...) } +// DeleteGeneratedTemplate mocks base method. +func (m *MockCloudFormationAPI) DeleteGeneratedTemplate(arg0 *cloudformation.DeleteGeneratedTemplateInput) (*cloudformation.DeleteGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteGeneratedTemplate", arg0) + ret0, _ := ret[0].(*cloudformation.DeleteGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteGeneratedTemplate indicates an expected call of DeleteGeneratedTemplate. +func (mr *MockCloudFormationAPIMockRecorder) DeleteGeneratedTemplate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGeneratedTemplate", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeleteGeneratedTemplate), arg0) +} + +// DeleteGeneratedTemplateRequest mocks base method. +func (m *MockCloudFormationAPI) DeleteGeneratedTemplateRequest(arg0 *cloudformation.DeleteGeneratedTemplateInput) (*request.Request, *cloudformation.DeleteGeneratedTemplateOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteGeneratedTemplateRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.DeleteGeneratedTemplateOutput) + return ret0, ret1 +} + +// DeleteGeneratedTemplateRequest indicates an expected call of DeleteGeneratedTemplateRequest. +func (mr *MockCloudFormationAPIMockRecorder) DeleteGeneratedTemplateRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGeneratedTemplateRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeleteGeneratedTemplateRequest), arg0) +} + +// DeleteGeneratedTemplateWithContext mocks base method. +func (m *MockCloudFormationAPI) DeleteGeneratedTemplateWithContext(arg0 aws.Context, arg1 *cloudformation.DeleteGeneratedTemplateInput, arg2 ...request.Option) (*cloudformation.DeleteGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteGeneratedTemplateWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.DeleteGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteGeneratedTemplateWithContext indicates an expected call of DeleteGeneratedTemplateWithContext. +func (mr *MockCloudFormationAPIMockRecorder) DeleteGeneratedTemplateWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGeneratedTemplateWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DeleteGeneratedTemplateWithContext), varargs...) +} + // DeleteStack mocks base method. func (m *MockCloudFormationAPI) DeleteStack(arg0 *cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error) { m.ctrl.T.Helper() @@ -1019,6 +1119,56 @@ func (mr *MockCloudFormationAPIMockRecorder) DescribeChangeSetWithContext(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeChangeSetWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeChangeSetWithContext), varargs...) } +// DescribeGeneratedTemplate mocks base method. +func (m *MockCloudFormationAPI) DescribeGeneratedTemplate(arg0 *cloudformation.DescribeGeneratedTemplateInput) (*cloudformation.DescribeGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeGeneratedTemplate", arg0) + ret0, _ := ret[0].(*cloudformation.DescribeGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeGeneratedTemplate indicates an expected call of DescribeGeneratedTemplate. +func (mr *MockCloudFormationAPIMockRecorder) DescribeGeneratedTemplate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeGeneratedTemplate", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeGeneratedTemplate), arg0) +} + +// DescribeGeneratedTemplateRequest mocks base method. +func (m *MockCloudFormationAPI) DescribeGeneratedTemplateRequest(arg0 *cloudformation.DescribeGeneratedTemplateInput) (*request.Request, *cloudformation.DescribeGeneratedTemplateOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeGeneratedTemplateRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.DescribeGeneratedTemplateOutput) + return ret0, ret1 +} + +// DescribeGeneratedTemplateRequest indicates an expected call of DescribeGeneratedTemplateRequest. +func (mr *MockCloudFormationAPIMockRecorder) DescribeGeneratedTemplateRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeGeneratedTemplateRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeGeneratedTemplateRequest), arg0) +} + +// DescribeGeneratedTemplateWithContext mocks base method. +func (m *MockCloudFormationAPI) DescribeGeneratedTemplateWithContext(arg0 aws.Context, arg1 *cloudformation.DescribeGeneratedTemplateInput, arg2 ...request.Option) (*cloudformation.DescribeGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeGeneratedTemplateWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.DescribeGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeGeneratedTemplateWithContext indicates an expected call of DescribeGeneratedTemplateWithContext. +func (mr *MockCloudFormationAPIMockRecorder) DescribeGeneratedTemplateWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeGeneratedTemplateWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeGeneratedTemplateWithContext), varargs...) +} + // DescribeOrganizationsAccess mocks base method. func (m *MockCloudFormationAPI) DescribeOrganizationsAccess(arg0 *cloudformation.DescribeOrganizationsAccessInput) (*cloudformation.DescribeOrganizationsAccessOutput, error) { m.ctrl.T.Helper() @@ -1119,6 +1269,56 @@ func (mr *MockCloudFormationAPIMockRecorder) DescribePublisherWithContext(arg0, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribePublisherWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribePublisherWithContext), varargs...) } +// DescribeResourceScan mocks base method. +func (m *MockCloudFormationAPI) DescribeResourceScan(arg0 *cloudformation.DescribeResourceScanInput) (*cloudformation.DescribeResourceScanOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceScan", arg0) + ret0, _ := ret[0].(*cloudformation.DescribeResourceScanOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceScan indicates an expected call of DescribeResourceScan. +func (mr *MockCloudFormationAPIMockRecorder) DescribeResourceScan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceScan", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeResourceScan), arg0) +} + +// DescribeResourceScanRequest mocks base method. +func (m *MockCloudFormationAPI) DescribeResourceScanRequest(arg0 *cloudformation.DescribeResourceScanInput) (*request.Request, *cloudformation.DescribeResourceScanOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DescribeResourceScanRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.DescribeResourceScanOutput) + return ret0, ret1 +} + +// DescribeResourceScanRequest indicates an expected call of DescribeResourceScanRequest. +func (mr *MockCloudFormationAPIMockRecorder) DescribeResourceScanRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceScanRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeResourceScanRequest), arg0) +} + +// DescribeResourceScanWithContext mocks base method. +func (m *MockCloudFormationAPI) DescribeResourceScanWithContext(arg0 aws.Context, arg1 *cloudformation.DescribeResourceScanInput, arg2 ...request.Option) (*cloudformation.DescribeResourceScanOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeResourceScanWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.DescribeResourceScanOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeResourceScanWithContext indicates an expected call of DescribeResourceScanWithContext. +func (mr *MockCloudFormationAPIMockRecorder) DescribeResourceScanWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeResourceScanWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).DescribeResourceScanWithContext), varargs...) +} + // DescribeStackDriftDetectionStatus mocks base method. func (m *MockCloudFormationAPI) DescribeStackDriftDetectionStatus(arg0 *cloudformation.DescribeStackDriftDetectionStatusInput) (*cloudformation.DescribeStackDriftDetectionStatusOutput, error) { m.ctrl.T.Helper() @@ -2018,6 +2218,56 @@ func (mr *MockCloudFormationAPIMockRecorder) ExecuteChangeSetWithContext(arg0, a return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteChangeSetWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ExecuteChangeSetWithContext), varargs...) } +// GetGeneratedTemplate mocks base method. +func (m *MockCloudFormationAPI) GetGeneratedTemplate(arg0 *cloudformation.GetGeneratedTemplateInput) (*cloudformation.GetGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetGeneratedTemplate", arg0) + ret0, _ := ret[0].(*cloudformation.GetGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetGeneratedTemplate indicates an expected call of GetGeneratedTemplate. +func (mr *MockCloudFormationAPIMockRecorder) GetGeneratedTemplate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGeneratedTemplate", reflect.TypeOf((*MockCloudFormationAPI)(nil).GetGeneratedTemplate), arg0) +} + +// GetGeneratedTemplateRequest mocks base method. +func (m *MockCloudFormationAPI) GetGeneratedTemplateRequest(arg0 *cloudformation.GetGeneratedTemplateInput) (*request.Request, *cloudformation.GetGeneratedTemplateOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetGeneratedTemplateRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.GetGeneratedTemplateOutput) + return ret0, ret1 +} + +// GetGeneratedTemplateRequest indicates an expected call of GetGeneratedTemplateRequest. +func (mr *MockCloudFormationAPIMockRecorder) GetGeneratedTemplateRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGeneratedTemplateRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).GetGeneratedTemplateRequest), arg0) +} + +// GetGeneratedTemplateWithContext mocks base method. +func (m *MockCloudFormationAPI) GetGeneratedTemplateWithContext(arg0 aws.Context, arg1 *cloudformation.GetGeneratedTemplateInput, arg2 ...request.Option) (*cloudformation.GetGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetGeneratedTemplateWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.GetGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetGeneratedTemplateWithContext indicates an expected call of GetGeneratedTemplateWithContext. +func (mr *MockCloudFormationAPIMockRecorder) GetGeneratedTemplateWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetGeneratedTemplateWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).GetGeneratedTemplateWithContext), varargs...) +} + // GetStackPolicy mocks base method. func (m *MockCloudFormationAPI) GetStackPolicy(arg0 *cloudformation.GetStackPolicyInput) (*cloudformation.GetStackPolicyOutput, error) { m.ctrl.T.Helper() @@ -2384,6 +2634,89 @@ func (mr *MockCloudFormationAPIMockRecorder) ListExportsWithContext(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListExportsWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListExportsWithContext), varargs...) } +// ListGeneratedTemplates mocks base method. +func (m *MockCloudFormationAPI) ListGeneratedTemplates(arg0 *cloudformation.ListGeneratedTemplatesInput) (*cloudformation.ListGeneratedTemplatesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListGeneratedTemplates", arg0) + ret0, _ := ret[0].(*cloudformation.ListGeneratedTemplatesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListGeneratedTemplates indicates an expected call of ListGeneratedTemplates. +func (mr *MockCloudFormationAPIMockRecorder) ListGeneratedTemplates(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGeneratedTemplates", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListGeneratedTemplates), arg0) +} + +// ListGeneratedTemplatesPages mocks base method. +func (m *MockCloudFormationAPI) ListGeneratedTemplatesPages(arg0 *cloudformation.ListGeneratedTemplatesInput, arg1 func(*cloudformation.ListGeneratedTemplatesOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListGeneratedTemplatesPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListGeneratedTemplatesPages indicates an expected call of ListGeneratedTemplatesPages. +func (mr *MockCloudFormationAPIMockRecorder) ListGeneratedTemplatesPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGeneratedTemplatesPages", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListGeneratedTemplatesPages), arg0, arg1) +} + +// ListGeneratedTemplatesPagesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListGeneratedTemplatesPagesWithContext(arg0 aws.Context, arg1 *cloudformation.ListGeneratedTemplatesInput, arg2 func(*cloudformation.ListGeneratedTemplatesOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListGeneratedTemplatesPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListGeneratedTemplatesPagesWithContext indicates an expected call of ListGeneratedTemplatesPagesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListGeneratedTemplatesPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGeneratedTemplatesPagesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListGeneratedTemplatesPagesWithContext), varargs...) +} + +// ListGeneratedTemplatesRequest mocks base method. +func (m *MockCloudFormationAPI) ListGeneratedTemplatesRequest(arg0 *cloudformation.ListGeneratedTemplatesInput) (*request.Request, *cloudformation.ListGeneratedTemplatesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListGeneratedTemplatesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ListGeneratedTemplatesOutput) + return ret0, ret1 +} + +// ListGeneratedTemplatesRequest indicates an expected call of ListGeneratedTemplatesRequest. +func (mr *MockCloudFormationAPIMockRecorder) ListGeneratedTemplatesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGeneratedTemplatesRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListGeneratedTemplatesRequest), arg0) +} + +// ListGeneratedTemplatesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListGeneratedTemplatesWithContext(arg0 aws.Context, arg1 *cloudformation.ListGeneratedTemplatesInput, arg2 ...request.Option) (*cloudformation.ListGeneratedTemplatesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListGeneratedTemplatesWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ListGeneratedTemplatesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListGeneratedTemplatesWithContext indicates an expected call of ListGeneratedTemplatesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListGeneratedTemplatesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGeneratedTemplatesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListGeneratedTemplatesWithContext), varargs...) +} + // ListImports mocks base method. func (m *MockCloudFormationAPI) ListImports(arg0 *cloudformation.ListImportsInput) (*cloudformation.ListImportsOutput, error) { m.ctrl.T.Helper() @@ -2467,6 +2800,255 @@ func (mr *MockCloudFormationAPIMockRecorder) ListImportsWithContext(arg0, arg1 i return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListImportsWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListImportsWithContext), varargs...) } +// ListResourceScanRelatedResources mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanRelatedResources(arg0 *cloudformation.ListResourceScanRelatedResourcesInput) (*cloudformation.ListResourceScanRelatedResourcesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanRelatedResources", arg0) + ret0, _ := ret[0].(*cloudformation.ListResourceScanRelatedResourcesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScanRelatedResources indicates an expected call of ListResourceScanRelatedResources. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanRelatedResources(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanRelatedResources", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanRelatedResources), arg0) +} + +// ListResourceScanRelatedResourcesPages mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanRelatedResourcesPages(arg0 *cloudformation.ListResourceScanRelatedResourcesInput, arg1 func(*cloudformation.ListResourceScanRelatedResourcesOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanRelatedResourcesPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScanRelatedResourcesPages indicates an expected call of ListResourceScanRelatedResourcesPages. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanRelatedResourcesPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanRelatedResourcesPages", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanRelatedResourcesPages), arg0, arg1) +} + +// ListResourceScanRelatedResourcesPagesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanRelatedResourcesPagesWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScanRelatedResourcesInput, arg2 func(*cloudformation.ListResourceScanRelatedResourcesOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScanRelatedResourcesPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScanRelatedResourcesPagesWithContext indicates an expected call of ListResourceScanRelatedResourcesPagesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanRelatedResourcesPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanRelatedResourcesPagesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanRelatedResourcesPagesWithContext), varargs...) +} + +// ListResourceScanRelatedResourcesRequest mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanRelatedResourcesRequest(arg0 *cloudformation.ListResourceScanRelatedResourcesInput) (*request.Request, *cloudformation.ListResourceScanRelatedResourcesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanRelatedResourcesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ListResourceScanRelatedResourcesOutput) + return ret0, ret1 +} + +// ListResourceScanRelatedResourcesRequest indicates an expected call of ListResourceScanRelatedResourcesRequest. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanRelatedResourcesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanRelatedResourcesRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanRelatedResourcesRequest), arg0) +} + +// ListResourceScanRelatedResourcesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanRelatedResourcesWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScanRelatedResourcesInput, arg2 ...request.Option) (*cloudformation.ListResourceScanRelatedResourcesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScanRelatedResourcesWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ListResourceScanRelatedResourcesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScanRelatedResourcesWithContext indicates an expected call of ListResourceScanRelatedResourcesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanRelatedResourcesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanRelatedResourcesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanRelatedResourcesWithContext), varargs...) +} + +// ListResourceScanResources mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanResources(arg0 *cloudformation.ListResourceScanResourcesInput) (*cloudformation.ListResourceScanResourcesOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanResources", arg0) + ret0, _ := ret[0].(*cloudformation.ListResourceScanResourcesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScanResources indicates an expected call of ListResourceScanResources. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanResources(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanResources", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanResources), arg0) +} + +// ListResourceScanResourcesPages mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanResourcesPages(arg0 *cloudformation.ListResourceScanResourcesInput, arg1 func(*cloudformation.ListResourceScanResourcesOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanResourcesPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScanResourcesPages indicates an expected call of ListResourceScanResourcesPages. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanResourcesPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanResourcesPages", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanResourcesPages), arg0, arg1) +} + +// ListResourceScanResourcesPagesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanResourcesPagesWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScanResourcesInput, arg2 func(*cloudformation.ListResourceScanResourcesOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScanResourcesPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScanResourcesPagesWithContext indicates an expected call of ListResourceScanResourcesPagesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanResourcesPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanResourcesPagesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanResourcesPagesWithContext), varargs...) +} + +// ListResourceScanResourcesRequest mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanResourcesRequest(arg0 *cloudformation.ListResourceScanResourcesInput) (*request.Request, *cloudformation.ListResourceScanResourcesOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScanResourcesRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ListResourceScanResourcesOutput) + return ret0, ret1 +} + +// ListResourceScanResourcesRequest indicates an expected call of ListResourceScanResourcesRequest. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanResourcesRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanResourcesRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanResourcesRequest), arg0) +} + +// ListResourceScanResourcesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScanResourcesWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScanResourcesInput, arg2 ...request.Option) (*cloudformation.ListResourceScanResourcesOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScanResourcesWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ListResourceScanResourcesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScanResourcesWithContext indicates an expected call of ListResourceScanResourcesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScanResourcesWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScanResourcesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScanResourcesWithContext), varargs...) +} + +// ListResourceScans mocks base method. +func (m *MockCloudFormationAPI) ListResourceScans(arg0 *cloudformation.ListResourceScansInput) (*cloudformation.ListResourceScansOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScans", arg0) + ret0, _ := ret[0].(*cloudformation.ListResourceScansOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScans indicates an expected call of ListResourceScans. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScans(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScans", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScans), arg0) +} + +// ListResourceScansPages mocks base method. +func (m *MockCloudFormationAPI) ListResourceScansPages(arg0 *cloudformation.ListResourceScansInput, arg1 func(*cloudformation.ListResourceScansOutput, bool) bool) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScansPages", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScansPages indicates an expected call of ListResourceScansPages. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScansPages(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScansPages", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScansPages), arg0, arg1) +} + +// ListResourceScansPagesWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScansPagesWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScansInput, arg2 func(*cloudformation.ListResourceScansOutput, bool) bool, arg3 ...request.Option) error { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1, arg2} + for _, a := range arg3 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScansPagesWithContext", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ListResourceScansPagesWithContext indicates an expected call of ListResourceScansPagesWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScansPagesWithContext(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1, arg2}, arg3...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScansPagesWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScansPagesWithContext), varargs...) +} + +// ListResourceScansRequest mocks base method. +func (m *MockCloudFormationAPI) ListResourceScansRequest(arg0 *cloudformation.ListResourceScansInput) (*request.Request, *cloudformation.ListResourceScansOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListResourceScansRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.ListResourceScansOutput) + return ret0, ret1 +} + +// ListResourceScansRequest indicates an expected call of ListResourceScansRequest. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScansRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScansRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScansRequest), arg0) +} + +// ListResourceScansWithContext mocks base method. +func (m *MockCloudFormationAPI) ListResourceScansWithContext(arg0 aws.Context, arg1 *cloudformation.ListResourceScansInput, arg2 ...request.Option) (*cloudformation.ListResourceScansOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListResourceScansWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.ListResourceScansOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListResourceScansWithContext indicates an expected call of ListResourceScansWithContext. +func (mr *MockCloudFormationAPIMockRecorder) ListResourceScansWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListResourceScansWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).ListResourceScansWithContext), varargs...) +} + // ListStackInstanceResourceDrifts mocks base method. func (m *MockCloudFormationAPI) ListStackInstanceResourceDrifts(arg0 *cloudformation.ListStackInstanceResourceDriftsInput) (*cloudformation.ListStackInstanceResourceDriftsOutput, error) { m.ctrl.T.Helper() @@ -3714,6 +4296,56 @@ func (mr *MockCloudFormationAPIMockRecorder) SignalResourceWithContext(arg0, arg return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SignalResourceWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).SignalResourceWithContext), varargs...) } +// StartResourceScan mocks base method. +func (m *MockCloudFormationAPI) StartResourceScan(arg0 *cloudformation.StartResourceScanInput) (*cloudformation.StartResourceScanOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StartResourceScan", arg0) + ret0, _ := ret[0].(*cloudformation.StartResourceScanOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StartResourceScan indicates an expected call of StartResourceScan. +func (mr *MockCloudFormationAPIMockRecorder) StartResourceScan(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartResourceScan", reflect.TypeOf((*MockCloudFormationAPI)(nil).StartResourceScan), arg0) +} + +// StartResourceScanRequest mocks base method. +func (m *MockCloudFormationAPI) StartResourceScanRequest(arg0 *cloudformation.StartResourceScanInput) (*request.Request, *cloudformation.StartResourceScanOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StartResourceScanRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.StartResourceScanOutput) + return ret0, ret1 +} + +// StartResourceScanRequest indicates an expected call of StartResourceScanRequest. +func (mr *MockCloudFormationAPIMockRecorder) StartResourceScanRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartResourceScanRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).StartResourceScanRequest), arg0) +} + +// StartResourceScanWithContext mocks base method. +func (m *MockCloudFormationAPI) StartResourceScanWithContext(arg0 aws.Context, arg1 *cloudformation.StartResourceScanInput, arg2 ...request.Option) (*cloudformation.StartResourceScanOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "StartResourceScanWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.StartResourceScanOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StartResourceScanWithContext indicates an expected call of StartResourceScanWithContext. +func (mr *MockCloudFormationAPIMockRecorder) StartResourceScanWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartResourceScanWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).StartResourceScanWithContext), varargs...) +} + // StopStackSetOperation mocks base method. func (m *MockCloudFormationAPI) StopStackSetOperation(arg0 *cloudformation.StopStackSetOperationInput) (*cloudformation.StopStackSetOperationOutput, error) { m.ctrl.T.Helper() @@ -3814,6 +4446,56 @@ func (mr *MockCloudFormationAPIMockRecorder) TestTypeWithContext(arg0, arg1 inte return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TestTypeWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).TestTypeWithContext), varargs...) } +// UpdateGeneratedTemplate mocks base method. +func (m *MockCloudFormationAPI) UpdateGeneratedTemplate(arg0 *cloudformation.UpdateGeneratedTemplateInput) (*cloudformation.UpdateGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateGeneratedTemplate", arg0) + ret0, _ := ret[0].(*cloudformation.UpdateGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateGeneratedTemplate indicates an expected call of UpdateGeneratedTemplate. +func (mr *MockCloudFormationAPIMockRecorder) UpdateGeneratedTemplate(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGeneratedTemplate", reflect.TypeOf((*MockCloudFormationAPI)(nil).UpdateGeneratedTemplate), arg0) +} + +// UpdateGeneratedTemplateRequest mocks base method. +func (m *MockCloudFormationAPI) UpdateGeneratedTemplateRequest(arg0 *cloudformation.UpdateGeneratedTemplateInput) (*request.Request, *cloudformation.UpdateGeneratedTemplateOutput) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateGeneratedTemplateRequest", arg0) + ret0, _ := ret[0].(*request.Request) + ret1, _ := ret[1].(*cloudformation.UpdateGeneratedTemplateOutput) + return ret0, ret1 +} + +// UpdateGeneratedTemplateRequest indicates an expected call of UpdateGeneratedTemplateRequest. +func (mr *MockCloudFormationAPIMockRecorder) UpdateGeneratedTemplateRequest(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGeneratedTemplateRequest", reflect.TypeOf((*MockCloudFormationAPI)(nil).UpdateGeneratedTemplateRequest), arg0) +} + +// UpdateGeneratedTemplateWithContext mocks base method. +func (m *MockCloudFormationAPI) UpdateGeneratedTemplateWithContext(arg0 aws.Context, arg1 *cloudformation.UpdateGeneratedTemplateInput, arg2 ...request.Option) (*cloudformation.UpdateGeneratedTemplateOutput, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateGeneratedTemplateWithContext", varargs...) + ret0, _ := ret[0].(*cloudformation.UpdateGeneratedTemplateOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateGeneratedTemplateWithContext indicates an expected call of UpdateGeneratedTemplateWithContext. +func (mr *MockCloudFormationAPIMockRecorder) UpdateGeneratedTemplateWithContext(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGeneratedTemplateWithContext", reflect.TypeOf((*MockCloudFormationAPI)(nil).UpdateGeneratedTemplateWithContext), varargs...) +} + // UpdateStack mocks base method. func (m *MockCloudFormationAPI) UpdateStack(arg0 *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error) { m.ctrl.T.Helper() diff --git a/mocks/mock_iamiface/mock.go b/mocks/mock_iamiface/mock.go index b475cb13..96b855e1 100644 --- a/mocks/mock_iamiface/mock.go +++ b/mocks/mock_iamiface/mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.49.21/service/iam/iamiface/interface.go +// Source: /Users/ekristen/go/pkg/mod/github.com/aws/aws-sdk-go@v1.50.24/service/iam/iamiface/interface.go // Package mock_iamiface is a generated GoMock package. package mock_iamiface diff --git a/resources/cloudformation_mock_test.go b/resources/cloudformation_mock_test.go index 882a94ce..536ff80d 100644 --- a/resources/cloudformation_mock_test.go +++ b/resources/cloudformation_mock_test.go @@ -1,4 +1,6 @@ //go:generate ../mocks/generate_mocks.sh cloudformation cloudformationiface package resources +import _ "github.com/golang/mock/mockgen" + // Note: empty on purpose, this file exist purely to generate mocks for the CloudFormation service diff --git a/resources/iam_mock_test.go b/resources/iam_mock_test.go index 9b563cd4..2fbdeaf0 100644 --- a/resources/iam_mock_test.go +++ b/resources/iam_mock_test.go @@ -1,4 +1,6 @@ //go:generate ../mocks/generate_mocks.sh iam iamiface package resources +import _ "github.com/golang/mock/mockgen" + // Note: empty on purpose, this file exist purely to generate mocks for the IAM service From b67d8392b133139d22c28be7a5177285eced634c Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:15:54 -0700 Subject: [PATCH 4/7] fix: imports and mock generation --- mocks/generate_mocks.sh | 2 ++ resources/cloudformation_mock_test.go | 2 -- resources/iam_mock_test.go | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mocks/generate_mocks.sh b/mocks/generate_mocks.sh index b90fe4a6..b1c9895f 100755 --- a/mocks/generate_mocks.sh +++ b/mocks/generate_mocks.sh @@ -3,4 +3,6 @@ SERVICE=$1 INTERFACE=$2 +go get github.com/golang/mock/mockgen@v1.6.0 + go run github.com/golang/mock/mockgen -source $(go list -m -mod=mod -f "{{.Dir}}" "github.com/aws/aws-sdk-go")/service/$SERVICE/$INTERFACE/interface.go -destination ../mocks/mock_$INTERFACE/mock.go diff --git a/resources/cloudformation_mock_test.go b/resources/cloudformation_mock_test.go index 536ff80d..882a94ce 100644 --- a/resources/cloudformation_mock_test.go +++ b/resources/cloudformation_mock_test.go @@ -1,6 +1,4 @@ //go:generate ../mocks/generate_mocks.sh cloudformation cloudformationiface package resources -import _ "github.com/golang/mock/mockgen" - // Note: empty on purpose, this file exist purely to generate mocks for the CloudFormation service diff --git a/resources/iam_mock_test.go b/resources/iam_mock_test.go index 2fbdeaf0..9b563cd4 100644 --- a/resources/iam_mock_test.go +++ b/resources/iam_mock_test.go @@ -1,6 +1,4 @@ //go:generate ../mocks/generate_mocks.sh iam iamiface package resources -import _ "github.com/golang/mock/mockgen" - // Note: empty on purpose, this file exist purely to generate mocks for the IAM service From 6830d96c09aee9550c1f0643ac0a7acbb91c3372 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:25:02 -0700 Subject: [PATCH 5/7] docs: adding whats new in version 3 --- docs/index.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 7799c8a3..ea7a983f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,16 +5,31 @@ Remove all resources from an AWS account. *aws-nuke* is stable, but it is likely that not all AWS resources are covered by it. Be encouraged to add missing resources and create a Pull Request or to create an [Issue](https://github.com/ekristen/aws-nuke/issues/new). +## What's New in Version 3 + +This is not a comprehensive list, but here are some of the highlights: + +* Completely rewrote the core of the tool as a dedicated library [libnuke](https://github.com/ekristen/libnuke) with 95%+ test coverage +* New Feature: Global Filters +* New Feature: Run Against All Enabled Regions +* Upcoming Feature: Filter Groups (**in progress**) +* Breaking Change: `root` command no longer triggers the run, must use subcommand `run` (alias: `nuke`) +* Semantic Releases with notifications on issues / pull requests +* New Resources +* Broke away from rebuy-de/aws-nuke project as a fork for reasons outlined in the history section + ## History of this Fork This is a full fork of the original tool written by the folks over at [rebuy-de](https://github.com/rebuy-de). This fork became necessary after attempting to make contributions and respond to issues to learn that the current maintainers only have time to work on the project about once a month and while receptive to bringing in other people to help maintain, made it clear -it would take time. Considering the feedback cycle was already weeks on initial communications, I had to make the hard -decision to fork and maintain it. +it would take time, but overall got the feeling that they wanted to maintain full control, which is understandable. +Considering the feedback cycle was already weeks on initial communications, I had to make the hard decision to fork +and maintain it. -Since then the rebuy-de team has taken up interest in responding to their issues and pull requests, but I have decided -to continue maintaining this fork as I have a few things I want to do with it that I don't think they will be interested. +Since then the rebuy-de team has taken up interest in responding to their issues and pull requests, however there are a +lot of outstanding feature requests and other tasks not being tackled, therefore I have decided to continue +maintaining this fork as I have a few things I want to do with it that I don't think they will be interested. ### Continued Attribution From 84d107a96639a31edafb7eb16b23299ec76e40f5 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:26:45 -0700 Subject: [PATCH 6/7] docs: tweak the new in version 3 text --- docs/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index ea7a983f..bb257df1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,11 +9,12 @@ resources and create a Pull Request or to create an [Issue](https://github.com/e This is not a comprehensive list, but here are some of the highlights: -* Completely rewrote the core of the tool as a dedicated library [libnuke](https://github.com/ekristen/libnuke) with 95%+ test coverage * New Feature: Global Filters * New Feature: Run Against All Enabled Regions * Upcoming Feature: Filter Groups (**in progress**) * Breaking Change: `root` command no longer triggers the run, must use subcommand `run` (alias: `nuke`) +* Completely rewrote the core of the tool as a dedicated library [libnuke](https://github.com/ekristen/libnuke) + * This library has over 95% test coverage which makes iteration and new features easier to implement. * Semantic Releases with notifications on issues / pull requests * New Resources * Broke away from rebuy-de/aws-nuke project as a fork for reasons outlined in the history section From c7e32a2b12fbe9df550d9d1e7a62b1bd90cc233e Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Thu, 22 Feb 2024 19:36:48 -0700 Subject: [PATCH 7/7] docs: call out bypass alias check feature --- docs/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.md b/docs/index.md index bb257df1..3a7e6a73 100644 --- a/docs/index.md +++ b/docs/index.md @@ -11,6 +11,7 @@ This is not a comprehensive list, but here are some of the highlights: * New Feature: Global Filters * New Feature: Run Against All Enabled Regions +* New Feature: Bypass Alias Check - Allow the skip of an alias on an account * Upcoming Feature: Filter Groups (**in progress**) * Breaking Change: `root` command no longer triggers the run, must use subcommand `run` (alias: `nuke`) * Completely rewrote the core of the tool as a dedicated library [libnuke](https://github.com/ekristen/libnuke)