Skip to content

Commit

Permalink
Merge pull request #40838 from hashicorp/b-opensearchserverless_sweepers
Browse files Browse the repository at this point in the history
sweepers: fix opensearchserverless resource references
  • Loading branch information
johnsonaj authored Jan 8, 2025
2 parents 0568ae8 + 83cb022 commit 678e496
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/service/opensearchserverless/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func sweepSecurityConfigs(region string) error {
id := aws.ToString(sc.Id)

log.Printf("[INFO] Deleting OpenSearch Serverless Security Config: %s", id)
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceCollection, client,
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceSecurityConfig, client,
framework.NewAttribute(names.AttrID, id),
))
}
Expand Down Expand Up @@ -209,7 +209,7 @@ func sweepSecurityPolicies(region string) error {
name := aws.ToString(sp.Name)

log.Printf("[INFO] Deleting OpenSearch Serverless Security Policy: %s", name)
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceCollection, client,
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceSecurityPolicy, client,
framework.NewAttribute(names.AttrID, name),
framework.NewAttribute(names.AttrName, name),
framework.NewAttribute(names.AttrType, sp.Type),
Expand All @@ -236,7 +236,7 @@ func sweepSecurityPolicies(region string) error {
name := aws.ToString(sp.Name)

log.Printf("[INFO] Deleting OpenSearch Serverless Security Policy: %s", name)
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceCollection, client,
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceSecurityPolicy, client,
framework.NewAttribute(names.AttrID, name),
framework.NewAttribute(names.AttrName, name),
framework.NewAttribute(names.AttrType, sp.Type),
Expand Down Expand Up @@ -281,7 +281,7 @@ func sweepVPCEndpoints(region string) error {
id := aws.ToString(endpoint.Id)

log.Printf("[INFO] Deleting OpenSearch Serverless VPC Endpoint: %s", id)
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceCollection, client,
sweepResources = append(sweepResources, framework.NewSweepResource(newVPCEndpointResource, client,
framework.NewAttribute(names.AttrID, id),
))
}
Expand Down

0 comments on commit 678e496

Please sign in to comment.