Skip to content

Commit 4df5b34

Browse files
committed
r/aws_servicecatalog_portfolio_share: tidy up
```console % AWS_ALTERNATE_PROFILE=terraform_team1_dev make t K=servicecatalog T=TestAccServiceCatalog_serial/PortfolioShare make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... make: Running acceptance tests on branch: 🌿 b-aws_servicecatalog_portfolio_share-sequential-processing 🌿... TF_ACC=1 go1.24.8 test ./internal/service/servicecatalog/... -v -count 1 -parallel 20 -run='TestAccServiceCatalog_serial/PortfolioShare' -timeout 360m -vet=off 2025/10/08 15:15:43 Creating Terraform AWS Provider (SDKv2-style)... 2025/10/08 15:15:43 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccServiceCatalog_serial (218.61s) --- PASS: TestAccServiceCatalog_serial/PortfolioShare (218.61s) --- PASS: TestAccServiceCatalog_serial/PortfolioShare/basic (39.27s) --- SKIP: TestAccServiceCatalog_serial/PortfolioShare/sharePrincipals (0.47s) --- SKIP: TestAccServiceCatalog_serial/PortfolioShare/organizationalUnit (2.42s) --- PASS: TestAccServiceCatalog_serial/PortfolioShare/disappears (176.44s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/servicecatalog 225.373s ```
1 parent 475c145 commit 4df5b34

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

internal/service/servicecatalog/portfolio_share.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func resourcePortfolioShareCreate(ctx context.Context, d *schema.ResourceData, m
107107
var diags diag.Diagnostics
108108
conn := meta.(*conns.AWSClient).ServiceCatalogClient(ctx)
109109

110-
input := &servicecatalog.CreatePortfolioShareInput{
110+
input := servicecatalog.CreatePortfolioShareInput{
111111
PortfolioId: aws.String(d.Get("portfolio_id").(string)),
112112
SharePrincipals: d.Get("share_principals").(bool),
113113
AcceptLanguage: aws.String(d.Get("accept_language").(string)),
@@ -140,7 +140,7 @@ func resourcePortfolioShareCreate(ctx context.Context, d *schema.ResourceData, m
140140
err := tfresource.Retry(ctx, d.Timeout(schema.TimeoutCreate), func(ctx context.Context) *tfresource.RetryError {
141141
var err error
142142

143-
output, err = conn.CreatePortfolioShare(ctx, input)
143+
output, err = conn.CreatePortfolioShare(ctx, &input)
144144

145145
if errs.IsAErrorMessageContains[*awstypes.InvalidParametersException](err, "profile does not exist") {
146146
return tfresource.RetryableError(err)
@@ -224,7 +224,7 @@ func resourcePortfolioShareUpdate(ctx context.Context, d *schema.ResourceData, m
224224
var diags diag.Diagnostics
225225
conn := meta.(*conns.AWSClient).ServiceCatalogClient(ctx)
226226

227-
input := &servicecatalog.UpdatePortfolioShareInput{
227+
input := servicecatalog.UpdatePortfolioShareInput{
228228
PortfolioId: aws.String(d.Get("portfolio_id").(string)),
229229
AcceptLanguage: aws.String(d.Get("accept_language").(string)),
230230
}
@@ -254,7 +254,7 @@ func resourcePortfolioShareUpdate(ctx context.Context, d *schema.ResourceData, m
254254
}
255255

256256
err := tfresource.Retry(ctx, d.Timeout(schema.TimeoutUpdate), func(ctx context.Context) *tfresource.RetryError {
257-
_, err := conn.UpdatePortfolioShare(ctx, input)
257+
_, err := conn.UpdatePortfolioShare(ctx, &input)
258258

259259
if errs.IsAErrorMessageContains[*awstypes.InvalidParametersException](err, "profile does not exist") {
260260
return tfresource.RetryableError(err)
@@ -278,7 +278,7 @@ func resourcePortfolioShareDelete(ctx context.Context, d *schema.ResourceData, m
278278
var diags diag.Diagnostics
279279
conn := meta.(*conns.AWSClient).ServiceCatalogClient(ctx)
280280

281-
input := &servicecatalog.DeletePortfolioShareInput{
281+
input := servicecatalog.DeletePortfolioShareInput{
282282
PortfolioId: aws.String(d.Get("portfolio_id").(string)),
283283
}
284284

@@ -305,7 +305,7 @@ func resourcePortfolioShareDelete(ctx context.Context, d *schema.ResourceData, m
305305
conns.GlobalMutexKV.Lock(portfolioShareMutexKey)
306306
defer conns.GlobalMutexKV.Unlock(portfolioShareMutexKey)
307307

308-
output, err := conn.DeletePortfolioShare(ctx, input)
308+
output, err := conn.DeletePortfolioShare(ctx, &input)
309309

310310
if errs.IsA[*awstypes.ResourceNotFoundException](err) {
311311
return diags

internal/service/servicecatalog/wait.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ func waitPortfolioShareReady(ctx context.Context, conn *servicecatalog.Client, p
167167
return nil, err
168168
}
169169

170-
func waitPortfolioShareCreatedWithToken(ctx context.Context, conn *servicecatalog.Client, token string, acceptRequired bool, timeout time.Duration) (*servicecatalog.DescribePortfolioShareStatusOutput, error) {
170+
func waitPortfolioShareCreatedWithToken(ctx context.Context, conn *servicecatalog.Client, token string, waitForAcceptance bool, timeout time.Duration) (*servicecatalog.DescribePortfolioShareStatusOutput, error) {
171171
targets := enum.Slice(awstypes.ShareStatusCompleted)
172172

173-
if !acceptRequired {
173+
if !waitForAcceptance {
174174
targets = append(targets, string(awstypes.ShareStatusInProgress))
175175
}
176176

0 commit comments

Comments
 (0)