Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephybun committed Jan 22, 2024
1 parent b516516 commit ec7398a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions internal/clients/client_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package clients

import (
"fmt"
chaosstudio "github.com/hashicorp/terraform-provider-azurerm/internal/services/chaosstudio/client"

"github.com/hashicorp/terraform-provider-azurerm/internal/common"
containers "github.com/hashicorp/terraform-provider-azurerm/internal/services/containers/client"
Expand All @@ -13,13 +14,17 @@ import (
)

type autoClient struct {
ChaosStudio *chaosstudio.AutoClient
ContainerService *containers.AutoClient
DevCenter *devcenter.AutoClient
LoadTestService *loadtestservice.AutoClient
ManagedIdentity *managedidentity.AutoClient
}

func buildAutoClients(client *autoClient, o *common.ClientOptions) (err error) {
if client.ChaosStudio, err = chaosstudio.NewClient(o); err != nil {
return fmt.Errorf("building client for ChaosStudio: %+v", err)
}

if client.ContainerService, err = containers.NewClient(o); err != nil {
return fmt.Errorf("building client for ContainerService: %+v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/targets"
"github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/targettypes"
Expand Down Expand Up @@ -50,7 +51,7 @@ func (r ChaosStudioTargetResource) Create() sdk.ResourceFunc {
return fmt.Errorf("%q is not a valid `target_type` for the region %s, must be one of %+v", config.TargetType, config.Location, targetTypes)
}

id := targets.NewScopedTargetID(config.TargetResourceId, config.TargetType)
id := commonids.NewChaosStudioTargetID(config.TargetResourceId, config.TargetType)

existing, err := client.Get(ctx, id)
if err != nil {
Expand Down

0 comments on commit ec7398a

Please sign in to comment.