Skip to content

Commit

Permalink
fix lint failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed May 29, 2022
1 parent 920675e commit edd8b61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/provider/resource_cloudflare_argo_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strings"

"github.com/cloudflare/cloudflare-go"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/pkg/errors"
Expand Down Expand Up @@ -50,12 +51,13 @@ func resourceCloudflareArgoTunnelRead(ctx context.Context, d *schema.ResourceDat
return diag.FromErr(fmt.Errorf("failed to fetch Argo Tunnel: %w", err))
}

token, err := client.TunnelToken(context.Background(), cloudflare.TunnelTokenParams{
token, err := client.TunnelToken(ctx, cloudflare.TunnelTokenParams{
AccountID: accID,
ID: tunnel.ID,
})

if err != nil {
fmt.Sprintf("[WARN] Unable to set the tunnel_token in state because it's not found in API")
tflog.Warn(ctx, "unable to set the tunnel_token in state because it's not found in API")
d.Set("tunnel_token", "")
return nil
}
Expand Down

0 comments on commit edd8b61

Please sign in to comment.