Skip to content

Commit

Permalink
chore: Upgrade go-sdk to v2 (#667)
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jin <[email protected]>
  • Loading branch information
leijin-lw authored Nov 1, 2024
1 parent fd6120f commit ab4c951
Show file tree
Hide file tree
Showing 225 changed files with 208 additions and 128 deletions.
2 changes: 1 addition & 1 deletion docs/resources/resource_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: |-
Create and manage Resource Groups in Lacework
---

# (beta) lacework\_resource\_group
# lacework\_resource\_group

Use this resource to create a Resource Group in order to categorize Lacework-identifiable assets.
For more information, see the [Resource Groups documentation](https://docs.fortinet.com/document/lacework-forticnapp/latest/api-reference/690087/using-the-resource-groups-api).
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/gruntwork-io/terratest v0.46.15
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0
github.com/lacework/go-sdk v1.54.1-0.20241030155210-2b0ffd411c65
github.com/lacework/go-sdk/v2 v2.1.2
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.4
golang.org/x/text v0.14.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lacework/go-sdk v1.54.1-0.20241030155210-2b0ffd411c65 h1:A4LDKoyuC0fKknf7Nd6BM3MkFqzlbmjs0gXDPsH5szQ=
github.com/lacework/go-sdk v1.54.1-0.20241030155210-2b0ffd411c65/go.mod h1:l0kCskNExDs1E8fBfpaZeafC42pmKucdXn3nZO1iyLI=
github.com/lacework/go-sdk/v2 v2.1.2 h1:qmFbZLmwLPVvJv7plEGgMqsOBK3569uuIBfVXWG2xRo=
github.com/lacework/go-sdk/v2 v2.1.2/go.mod h1:bSB8gUzHiywNOGrH7bAICf7XDAEDp5Bq1+c76qwZcCY=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
Expand Down
2 changes: 1 addition & 1 deletion integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"regexp"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion integration/resource_lacework_alert_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion integration/resource_lacework_report_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"

"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion integration/resource_lacework_team_member_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/gruntwork-io/terratest/modules/terraform"
"github.com/lacework/go-sdk/lwdomain"
"github.com/lacework/go-sdk/v2/lwdomain"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion lacework/alert_channel_importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/pkg/errors"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

// VerifyAlertChannelAndRollback will test the integration of an alert channel,
Expand Down
2 changes: 1 addition & 1 deletion lacework/data_source_lacework_agent_access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func dataSourceLaceworkAgentAccessToken() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/data_source_lacework_api_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func dataSourceLaceworkApiToken() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/data_source_lacework_metric_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package lacework

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func dataSourceLaceworkMetricModule() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/data_source_lacework_user_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lacework
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func dataSourceLaceworkUserProfile() *schema.Resource {
Expand Down
8 changes: 4 additions & 4 deletions lacework/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/lwconfig"
"github.com/lacework/go-sdk/lwdomain"
"github.com/lacework/go-sdk/lwlogger"
"github.com/lacework/go-sdk/v2/api"
"github.com/lacework/go-sdk/v2/lwconfig"
"github.com/lacework/go-sdk/v2/lwdomain"
"github.com/lacework/go-sdk/v2/lwlogger"
)

// Provider returns a Lacework schema.Provider
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_agent_access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"time"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_aws_cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelAwsCloudWatch() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_aws_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lacework
import (
"log"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_cisco_webex.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelCiscoWebex() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelDatadog() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_email.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelEmail() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_gcp_pub_sub.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_jira_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelJiraCloud() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_jira_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelJiraServer() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelMicrosoftTeams() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_newrelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelNewRelic() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_pagerduty.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelPagerDuty() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_qradar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelQRadar() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_service_now.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelServiceNow() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelSlack() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_splunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelSplunk() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_victorops.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelVictorOps() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_channel_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkAlertChannelWebhook() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_alert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_data_export_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkDataExportRule() *schema.Resource {
Expand Down
4 changes: 2 additions & 2 deletions lacework/resource_lacework_external_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/pkg/errors"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/lwdomain"
"github.com/lacework/go-sdk/v2/api"
"github.com/lacework/go-sdk/v2/lwdomain"
)

var externalIDValidCsp = []string{"aws", "google", "oci", "azure"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsAgentlessScanning() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_integration_aws_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsCfg() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_integration_aws_ct.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsCloudTrail() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsEksAuditLog() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_integration_aws_govcloud_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsGovCloudCfg() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_integration_aws_govcloud_ct.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsGovCloudCT() *schema.Resource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAwsOrgAgentlessScanning() *schema.Resource {
Expand Down
2 changes: 1 addition & 1 deletion lacework/resource_lacework_integration_azure_ad_al.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/v2/api"
)

func resourceLaceworkIntegrationAzureAdAl() *schema.Resource {
Expand Down
Loading

0 comments on commit ab4c951

Please sign in to comment.