Skip to content

Commit

Permalink
added changelog, fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbacchin committed Oct 16, 2024
1 parent c9ffcf4 commit b1d6f21
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changelog/39744.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```release-note:bug
resource/aws_resourceexplorer2_index: create index type is AGGREGATOR during cool down period. The dangling LOCAL index is deleted for eventual consistency.
```
```release-note:enhancement
resource/aws_resourceexplorer2_view: Add `scope` argument
```
4 changes: 2 additions & 2 deletions internal/service/resourceexplorer2/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *resourceIndex) Create(ctx context.Context, request resource.CreateReque

_, err := conn.UpdateIndexType(ctx, input)
if err != nil {
//in case an AGGREGATED index cannot be created due to cool down period, delete the dangling LOCAL index created above.
//eventual consistency: in case an AGGREGATOR index cannot be created due to cool down period, delete the dangling LOCAL index created above
if tfawserr.ErrCodeEquals(err, errServiceQuotaExceededException) {
_, err := conn.DeleteIndex(ctx, &resourceexplorer2.DeleteIndexInput{
Arn: flex.StringFromFramework(ctx, data.ID),
Expand Down Expand Up @@ -354,7 +354,7 @@ func waitIndexUpdated(ctx context.Context, conn *resourceexplorer2.Client, timeo
return nil, err
}

func waitIndexDeleted(ctx context.Context, conn *resourceexplorer2.Client, timeout time.Duration) (*resourceexplorer2.GetIndexOutput, error) {
func waitIndexDeleted(ctx context.Context, conn *resourceexplorer2.Client, timeout time.Duration) (*resourceexplorer2.GetIndexOutput, error) { //nolint:unparam
stateConf := &retry.StateChangeConf{
Pending: enum.Slice(awstypes.IndexStateDeleting),
Target: []string{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
)

func TestAccResourceExplorer2_serial(t *testing.T) {

testCases := map[string]map[string]func(t *testing.T){
"Index": {
acctest.CtBasic: testAccIndex_basic,
Expand All @@ -19,6 +18,7 @@ func TestAccResourceExplorer2_serial(t *testing.T) {
"type": testAccIndex_type,
},
"View": {
acctest.CtBasic: testAccView_basic,
"defaultView": testAccView_defaultView,
acctest.CtDisappears: testAccView_disappears,
"filter": testAccView_filter,
Expand Down
4 changes: 2 additions & 2 deletions internal/service/resourceexplorer2/view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ resource "aws_resourceexplorer2_index" "test" {
}
resource "aws_resourceexplorer2_view" "test" {
name = %[1]q
scope = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:root"
name = %[1]q
scope = "arn:${data.aws_partition.current.partition}:iam::${data.aws_caller_identity.current.account_id}:root"
depends_on = [aws_resourceexplorer2_index.test]
}
Expand Down

0 comments on commit b1d6f21

Please sign in to comment.