Skip to content

Commit 475c145

Browse files
committed
r/aws_servicecatalog_portfolio_share: remove hardcoded sleep during create
1 parent 07cac48 commit 475c145

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

internal/service/servicecatalog/portfolio_share.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"context"
88
"log"
99
"strings"
10-
"time"
1110

1211
"github.com/aws/aws-sdk-go-v2/aws"
1312
"github.com/aws/aws-sdk-go-v2/aws/arn"
@@ -134,7 +133,6 @@ func resourcePortfolioShareCreate(ctx context.Context, d *schema.ResourceData, m
134133
input.ShareTagOptions = v.(bool)
135134
}
136135

137-
// mutex lock for creation/deletion serialization
138136
conns.GlobalMutexKV.Lock(portfolioShareMutexKey)
139137
defer conns.GlobalMutexKV.Unlock(portfolioShareMutexKey)
140138

@@ -181,13 +179,6 @@ func resourcePortfolioShareCreate(ctx context.Context, d *schema.ResourceData, m
181179
}
182180
}
183181

184-
// Only one share create/second is allowed, but unfortunately not all throttling
185-
// happens as a return from CreatePortfolioShare(). That can succeed and then
186-
// the throttling can happen as part of the account accepting. If everything
187-
// else succeeds, sleep a bit to give us time between sequentially executed
188-
// portfolio shares.
189-
time.Sleep(15 * time.Second)
190-
191182
return append(diags, resourcePortfolioShareRead(ctx, d, meta)...)
192183
}
193184

@@ -311,7 +302,6 @@ func resourcePortfolioShareDelete(ctx context.Context, d *schema.ResourceData, m
311302
input.OrganizationNode = orgNode
312303
}
313304

314-
// mutex lock for creation/deletion serialization
315305
conns.GlobalMutexKV.Lock(portfolioShareMutexKey)
316306
defer conns.GlobalMutexKV.Unlock(portfolioShareMutexKey)
317307

0 commit comments

Comments
 (0)