From 8c0ac0625dc548f55bc56bda4e2d01418a1a0b57 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 3 Feb 2023 11:43:12 -0500 Subject: [PATCH 01/44] Added account_settings datasource --- go.mod | 2 +- go.sum | 4 +- linode/accountsettings/datasource.go | 40 +++++++++++++++++++ linode/accountsettings/datasource_test.go | 31 ++++++++++++++ linode/accountsettings/schema_datasource.go | 31 ++++++++++++++ linode/accountsettings/tmpl/data_basic.gotf | 5 +++ linode/accountsettings/tmpl/template.go | 12 ++++++ linode/provider.go | 2 + website/docs/d/account_settings.html.markdown | 33 +++++++++++++++ 9 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 linode/accountsettings/datasource.go create mode 100644 linode/accountsettings/datasource_test.go create mode 100644 linode/accountsettings/schema_datasource.go create mode 100644 linode/accountsettings/tmpl/data_basic.gotf create mode 100644 linode/accountsettings/tmpl/template.go create mode 100644 website/docs/d/account_settings.html.markdown diff --git a/go.mod b/go.mod index 1224a06bc..28127aedc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 - github.com/linode/linodego v1.12.0 + github.com/linode/linodego v1.13.0 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 ) diff --git a/go.sum b/go.sum index 004ec8d88..6f54fb1e1 100644 --- a/go.sum +++ b/go.sum @@ -313,8 +313,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.12.0 h1:33mOIrZ+gVva14gyJMKPZ85mQGovAvZCEP1ftgmFBjA= -github.com/linode/linodego v1.12.0/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= +github.com/linode/linodego v1.13.0 h1:SSqGW7j3vKEIahR/LhXwHHx7o+Wa0Tc70eH/wQ4/hTc= +github.com/linode/linodego v1.13.0/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/linode/accountsettings/datasource.go b/linode/accountsettings/datasource.go new file mode 100644 index 000000000..58998e154 --- /dev/null +++ b/linode/accountsettings/datasource.go @@ -0,0 +1,40 @@ +package accountsettings + +import ( + "context" + "encoding/json" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +func DataSource() *schema.Resource { + return &schema.Resource{ + Schema: dataSourceSchema, + ReadContext: readDataSource, + } +} + +func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client := meta.(*helper.ProviderMeta).Client + + data, err := client.GetAccountSettings(ctx) + if err != nil { + return diag.Errorf("Error getting account settings: %s", err) + } + + id, err := json.Marshal(data) + if err != nil { + return diag.Errorf("failed to marshal id: %s", err) + } + + d.SetId(string(id)) + d.Set("backups_enabled", data.BackupsEnabled) + d.Set("longview_subscription", data.LongviewSubscription) + d.Set("managed", data.Managed) + d.Set("network_helper", data.NetworkHelper) + d.Set("object_storage", data.ObjectStorage) + + return nil +} diff --git a/linode/accountsettings/datasource_test.go b/linode/accountsettings/datasource_test.go new file mode 100644 index 000000000..a1a90c0a6 --- /dev/null +++ b/linode/accountsettings/datasource_test.go @@ -0,0 +1,31 @@ +package accountsettings_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/accountsettings/tmpl" +) + +func TestAccDataSourceLinodeAccountSettings_basic(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_account_settings.foobar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataBasic(t), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "backups_enabled"), + resource.TestCheckResourceAttrSet(resourceName, "managed"), + resource.TestCheckResourceAttrSet(resourceName, "network_helper"), + resource.TestCheckResourceAttrSet(resourceName, "object_storage"), + ), + }, + }, + }) +} diff --git a/linode/accountsettings/schema_datasource.go b/linode/accountsettings/schema_datasource.go new file mode 100644 index 000000000..4a5c28bc6 --- /dev/null +++ b/linode/accountsettings/schema_datasource.go @@ -0,0 +1,31 @@ +package accountsettings + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +var dataSourceSchema = map[string]*schema.Schema{ + "backups_enabled": { + Type: schema.TypeBool, + Description: "Account-wide backups default.", + Computed: true, + }, + "longview_subscription": { + Type: schema.TypeString, + Description: "The Longview Pro tier you are currently subscribed to.", + Computed: true, + }, + "managed": { + Type: schema.TypeBool, + Description: "Enables monitoring for connectivity, response, and total request time.", + Computed: true, + }, + "network_helper": { + Type: schema.TypeBool, + Description: "Enables network helper across all users by default for new Linodes and Linode Configs.", + Computed: true, + }, + "object_storage": { + Type: schema.TypeString, + Description: "A string describing the status of this account’s Object Storage service enrollment.", + Computed: true, + }, +} diff --git a/linode/accountsettings/tmpl/data_basic.gotf b/linode/accountsettings/tmpl/data_basic.gotf new file mode 100644 index 000000000..f3e4f92c8 --- /dev/null +++ b/linode/accountsettings/tmpl/data_basic.gotf @@ -0,0 +1,5 @@ +{{ define "account_settings_data_basic" }} + +data "linode_account_settings" "foobar" {} + +{{ end }} \ No newline at end of file diff --git a/linode/accountsettings/tmpl/template.go b/linode/accountsettings/tmpl/template.go new file mode 100644 index 000000000..db7ff94b1 --- /dev/null +++ b/linode/accountsettings/tmpl/template.go @@ -0,0 +1,12 @@ +package tmpl + +import ( + "testing" + + "github.com/linode/terraform-provider-linode/linode/acceptance" +) + +func DataBasic(t *testing.T) string { + return acceptance.ExecuteTemplate(t, + "account_settings_data_basic", nil) +} diff --git a/linode/provider.go b/linode/provider.go index 312b3b34c..2dba7d825 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -12,6 +12,7 @@ import ( "github.com/linode/terraform-provider-linode/linode/account" "github.com/linode/terraform-provider-linode/linode/accountlogin" "github.com/linode/terraform-provider-linode/linode/accountlogins" + "github.com/linode/terraform-provider-linode/linode/accountsettings" "github.com/linode/terraform-provider-linode/linode/backup" "github.com/linode/terraform-provider-linode/linode/databaseaccesscontrols" "github.com/linode/terraform-provider-linode/linode/databasebackups" @@ -164,6 +165,7 @@ func Provider() *schema.Provider { "linode_account": account.DataSource(), "linode_account_login": accountlogin.DataSource(), "linode_account_logins": accountlogins.DataSource(), + "linode_account_settings": accountsettings.DataSource(), "linode_database_backups": databasebackups.DataSource(), "linode_database_engines": databaseengines.DataSource(), "linode_database_mongodb": databasemongodb.DataSource(), diff --git a/website/docs/d/account_settings.html.markdown b/website/docs/d/account_settings.html.markdown new file mode 100644 index 000000000..010b58000 --- /dev/null +++ b/website/docs/d/account_settings.html.markdown @@ -0,0 +1,33 @@ +--- +layout: "linode" +page_title: "Linode: linode_account_settings" +sidebar_current: "docs-linode-datasource-account-settings" +description: |- +Provides information about Linode account settings. +--- + +# linode\_account\_settings + +Provides information about Linode account settings. + +## Example Usage + +The following example shows how one might use this data source to access information about Linode account settings. + +```hcl +data "linode_account_settings" "example" {} +``` + +## Attributes Reference + +Each Linode LKE Version will be stored in the `versions` attribute and will export the following attributes: + +* `backups_enabled` - Account-wide backups default. + +* `longview_subscription` - The Longview Pro tier you are currently subscribed to. + +* `managed` - Enables monitoring for connectivity, response, and total request time. + +* `network_helper` - Enables network helper across all users by default for new Linodes and Linode Configs. + +* `object_storage` - A string describing the status of this account’s Object Storage service enrollment. From ca39ea0fc8080f7efcc1930f75b873746e6cbdd1 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 3 Feb 2023 13:37:55 -0500 Subject: [PATCH 02/44] Fixed small issue in docs --- website/docs/d/account_settings.html.markdown | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/docs/d/account_settings.html.markdown b/website/docs/d/account_settings.html.markdown index 010b58000..94dcedb4c 100644 --- a/website/docs/d/account_settings.html.markdown +++ b/website/docs/d/account_settings.html.markdown @@ -20,8 +20,6 @@ data "linode_account_settings" "example" {} ## Attributes Reference -Each Linode LKE Version will be stored in the `versions` attribute and will export the following attributes: - * `backups_enabled` - Account-wide backups default. * `longview_subscription` - The Longview Pro tier you are currently subscribed to. From d0f47a90c44c13cfa87144c556f215bab31a56c1 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Thu, 9 Feb 2023 14:03:21 -0500 Subject: [PATCH 03/44] Added resource for account settings --- go.mod | 2 +- go.sum | 4 +- linode/accountsettings/resource.go | 102 ++++++++++++++++++++++ linode/accountsettings/resource_test.go | 69 +++++++++++++++ linode/accountsettings/schema_resource.go | 34 ++++++++ linode/accountsettings/tmpl/basic.gotf | 5 ++ linode/accountsettings/tmpl/template.go | 16 ++++ linode/accountsettings/tmpl/updates.gotf | 9 ++ linode/provider.go | 1 + 9 files changed, 239 insertions(+), 3 deletions(-) create mode 100644 linode/accountsettings/resource.go create mode 100644 linode/accountsettings/resource_test.go create mode 100644 linode/accountsettings/schema_resource.go create mode 100644 linode/accountsettings/tmpl/basic.gotf create mode 100644 linode/accountsettings/tmpl/updates.gotf diff --git a/go.mod b/go.mod index 28127aedc..9be74bef5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 - github.com/linode/linodego v1.13.0 + github.com/linode/linodego v1.14.0 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 ) diff --git a/go.sum b/go.sum index 6f54fb1e1..e98e108cd 100644 --- a/go.sum +++ b/go.sum @@ -313,8 +313,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.13.0 h1:SSqGW7j3vKEIahR/LhXwHHx7o+Wa0Tc70eH/wQ4/hTc= -github.com/linode/linodego v1.13.0/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= +github.com/linode/linodego v1.14.0 h1:rEFcpDDjO7gGrplPgo0TheVmzjwAFXRej5t5ej8cUJo= +github.com/linode/linodego v1.14.0/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/linode/accountsettings/resource.go b/linode/accountsettings/resource.go new file mode 100644 index 000000000..25196459a --- /dev/null +++ b/linode/accountsettings/resource.go @@ -0,0 +1,102 @@ +package accountsettings + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/linode/linodego" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +func Resource() *schema.Resource { + return &schema.Resource{ + Schema: resourceSchema, + ReadContext: readResource, + CreateContext: createResource, + UpdateContext: updateResource, + DeleteContext: deleteResource, + } +} + +func readResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client := meta.(*helper.ProviderMeta).Client + + settings, err := client.GetAccountSettings(ctx) + if err != nil { + return diag.Errorf("Error getting account settings: %s", err) + } + + d.Set("backups_enabled", settings.BackupsEnabled) + d.Set("longview_subscription", settings.LongviewSubscription) + d.Set("managed", settings.Managed) + d.Set("network_helper", settings.NetworkHelper) + d.Set("object_storage", settings.ObjectStorage) + + return nil +} + +func createResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client := meta.(*helper.ProviderMeta).Client + + account, err := client.GetAccount(ctx) + if err != nil { + return diag.Errorf("Error getting account: %s", err) + } + + d.SetId(account.Email) + return updateResource(ctx, d, meta) +} + +func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client := meta.(*helper.ProviderMeta).Client + + _, errSettings := client.GetAccountSettings(ctx) + if errSettings != nil { + return diag.Errorf("Error fetching the account settings: %s", errSettings) + } + + accountUpdateOpts := linodego.AccountSettingsUpdateOptions{} + longviewUpdateOpts := linodego.LongviewPlanUpdateOptions{} + + accountUpdate := false + longviewUpdate := false + + if d.HasChange("backups_enabled") { + backupsEnabled := d.Get("backups_enabled").(bool) + accountUpdateOpts.BackupsEnabled = &backupsEnabled + accountUpdate = true + + } + + if d.HasChange("network_helper") { + networkHelper := d.Get("network_helper").(bool) + accountUpdateOpts.NetworkHelper = &networkHelper + accountUpdate = true + } + + if d.HasChange("longview_subscription") { + longviewUpdateOpts.LongviewSubscription = d.Get("longview_subscription").(string) + longviewUpdate = true + } + + if accountUpdate { + _, updateErr := client.UpdateAccountSettings(ctx, accountUpdateOpts) + if updateErr != nil { + return diag.Errorf("Error updating the account settings: %s", updateErr) + } + } + + if longviewUpdate { + _, updateErr := client.UpdateLongviewPlan(ctx, longviewUpdateOpts) + if updateErr != nil { + return diag.Errorf("Error updating the longview plan: %s", updateErr) + } + } + + return readResource(ctx, d, meta) +} + +func deleteResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + return nil +} diff --git a/linode/accountsettings/resource_test.go b/linode/accountsettings/resource_test.go new file mode 100644 index 000000000..b30217cf6 --- /dev/null +++ b/linode/accountsettings/resource_test.go @@ -0,0 +1,69 @@ +package accountsettings_test + +import ( + "strconv" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/linode/linodego" + "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/accountsettings/tmpl" +) + +func TestAccResourceAccountSettings_basic(t *testing.T) { + acceptance.OptInTest(t) + + resourceName := "linode_account_settings.foobar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.Basic(t), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "backups_enabled"), + resource.TestCheckResourceAttrSet(resourceName, "managed"), + resource.TestCheckResourceAttrSet(resourceName, "network_helper"), + resource.TestCheckResourceAttrSet(resourceName, "object_storage"), + ), + }, + }, + }) +} + +func TestAccResourceAccountSettings_update(t *testing.T) { + acceptance.OptInTest(t) + + resourceName := "linode_account_settings.foobar" + + accountSettings := linodego.AccountSettings{} + longviewSettings := linodego.LongviewPlan{} + + currLongviewPlan := longviewSettings.ID + currBackupsEnabled := accountSettings.BackupsEnabled + currNetworkHelper := accountSettings.NetworkHelper + + updatedLongviewPlan := "longview-10" + updatedBackupsEnabled := !currBackupsEnabled + updatedNetworkHelper := !currNetworkHelper + + if currLongviewPlan == "" || currLongviewPlan == "longview-10" { + updatedLongviewPlan = "longview-3" + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.Updates(t, updatedLongviewPlan, updatedBackupsEnabled, updatedNetworkHelper), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "longview_subscription", updatedLongviewPlan), + resource.TestCheckResourceAttr(resourceName, "backups_enabled", strconv.FormatBool(updatedBackupsEnabled)), + resource.TestCheckResourceAttr(resourceName, "network_helper", strconv.FormatBool(updatedNetworkHelper)), + ), + }, + }, + }) +} diff --git a/linode/accountsettings/schema_resource.go b/linode/accountsettings/schema_resource.go new file mode 100644 index 000000000..4839f51ca --- /dev/null +++ b/linode/accountsettings/schema_resource.go @@ -0,0 +1,34 @@ +package accountsettings + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +var resourceSchema = map[string]*schema.Schema{ + "backups_enabled": { + Type: schema.TypeBool, + Description: "Account-wide backups default.", + Computed: true, + Optional: true, + }, + "longview_subscription": { + Type: schema.TypeString, + Description: "The Longview Pro tier you are currently subscribed to.", + Computed: true, + Optional: true, + }, + "managed": { + Type: schema.TypeBool, + Description: "Enables monitoring for connectivity, response, and total request time.", + Computed: true, + }, + "network_helper": { + Type: schema.TypeBool, + Description: "Enables network helper across all users by default for new Linodes and Linode Configs.", + Computed: true, + Optional: true, + }, + "object_storage": { + Type: schema.TypeString, + Description: "A string describing the status of this account's Object Storage service enrollment.", + Computed: true, + }, +} diff --git a/linode/accountsettings/tmpl/basic.gotf b/linode/accountsettings/tmpl/basic.gotf new file mode 100644 index 000000000..d0073a5db --- /dev/null +++ b/linode/accountsettings/tmpl/basic.gotf @@ -0,0 +1,5 @@ +{{ define "account_settings_basic" }} + +resource "linode_account_settings" "foobar" {} + +{{ end }} \ No newline at end of file diff --git a/linode/accountsettings/tmpl/template.go b/linode/accountsettings/tmpl/template.go index db7ff94b1..aa5dd5e64 100644 --- a/linode/accountsettings/tmpl/template.go +++ b/linode/accountsettings/tmpl/template.go @@ -6,7 +6,23 @@ import ( "github.com/linode/terraform-provider-linode/linode/acceptance" ) +type TemplateData struct { + LongviewSubscription string + BackupsEnabled bool + NetworkHelper bool +} + +func Basic(t *testing.T) string { + return acceptance.ExecuteTemplate(t, + "account_settings_basic", nil) +} + func DataBasic(t *testing.T) string { return acceptance.ExecuteTemplate(t, "account_settings_data_basic", nil) } + +func Updates(t *testing.T, longviewSubscription string, backupsEnabled, networkHelper bool) string { + return acceptance.ExecuteTemplate(t, + "account_settings_updates", TemplateData{LongviewSubscription: longviewSubscription, BackupsEnabled: backupsEnabled, NetworkHelper: networkHelper}) +} diff --git a/linode/accountsettings/tmpl/updates.gotf b/linode/accountsettings/tmpl/updates.gotf new file mode 100644 index 000000000..58bff863e --- /dev/null +++ b/linode/accountsettings/tmpl/updates.gotf @@ -0,0 +1,9 @@ +{{ define "account_settings_updates" }} + +resource "linode_account_settings" "foobar" { + longview_subscription = "{{ .LongviewSubscription }}" + backups_enabled = "{{ .BackupsEnabled }}" + network_helper = "{{ .NetworkHelper }}" +} + +{{ end }} \ No newline at end of file diff --git a/linode/provider.go b/linode/provider.go index 2dba7d825..7c6f9c273 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -204,6 +204,7 @@ func Provider() *schema.Provider { }, ResourcesMap: map[string]*schema.Resource{ + "linode_account_settings": accountsettings.Resource(), "linode_database_access_controls": databaseaccesscontrols.Resource(), "linode_database_mongodb": databasemongodb.Resource(), "linode_database_mysql": databasemysql.Resource(), From 9cf5ef9ed8e24f5dad85ce181aa68a65be460f45 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Thu, 9 Feb 2023 14:47:17 -0500 Subject: [PATCH 04/44] Added documentation for account settings resource --- website/docs/r/account_settings.html.markdown | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 website/docs/r/account_settings.html.markdown diff --git a/website/docs/r/account_settings.html.markdown b/website/docs/r/account_settings.html.markdown new file mode 100644 index 000000000..58d84d109 --- /dev/null +++ b/website/docs/r/account_settings.html.markdown @@ -0,0 +1,38 @@ +--- +layout: "linode" +page_title: "Linode: linode_account_settings" +sidebar_current: "docs-linode-account-settings" +description: |- + Manages the settings of a Linode account. +--- + +# linode\_accout\_settings + +Manages the settings of a Linode account. + +## Example Usage + +The following example shows how one might use this resource to change their Linode account settings. + +```hcl +resource "linode_account_settings" "myaccount" { + longview_subscription = "longview-40" + backups_enabled = "true" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `backups_enabled` - (Optional) The account-wide backups default. If true, all Linodes created will automatically be enrolled in the Backups service. If false, Linodes will not be enrolled by default, but may still be enrolled on creation or later. + +* `network_helper` - (Optional) Enables network helper across all users by default for new Linodes and Linode Configs. + +* `longview_subscription` - (Optional) The Longview Pro tier you are currently subscribed to. The value must be a [Longview Subscription](https://www.linode.com/docs/api/longview/#longview-subscriptions-list) ID or null for Longview Free. + +## Additional Results + +* `managed` - Enables monitoring for connectivity, response, and total request time. + +* `object_storage` - A string describing the status of this account’s Object Storage service enrollment. From e2a8fb33a665b761f91cb6535636e28b7683474d Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Thu, 9 Feb 2023 15:08:56 -0500 Subject: [PATCH 05/44] Addressed linting error and security error --- linode/accountsettings/tmpl/template.go | 3 ++- linode/image/resource.go | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/linode/accountsettings/tmpl/template.go b/linode/accountsettings/tmpl/template.go index aa5dd5e64..925001876 100644 --- a/linode/accountsettings/tmpl/template.go +++ b/linode/accountsettings/tmpl/template.go @@ -24,5 +24,6 @@ func DataBasic(t *testing.T) string { func Updates(t *testing.T, longviewSubscription string, backupsEnabled, networkHelper bool) string { return acceptance.ExecuteTemplate(t, - "account_settings_updates", TemplateData{LongviewSubscription: longviewSubscription, BackupsEnabled: backupsEnabled, NetworkHelper: networkHelper}) + "account_settings_updates", TemplateData{LongviewSubscription: longviewSubscription, + BackupsEnabled: backupsEnabled, NetworkHelper: networkHelper}) } diff --git a/linode/image/resource.go b/linode/image/resource.go index 814753a69..3dfbc2dc7 100644 --- a/linode/image/resource.go +++ b/linode/image/resource.go @@ -133,7 +133,12 @@ func createResourceFromUpload( if err != nil { return diag.Errorf("failed to get image source: %v", err) } - defer imageReader.Close() + + defer func() { + if err := imageReader.Close(); err != nil { + log.Printf("[WARN] Failed to close image reader: %s\n", err) + } + }() createOpts := linodego.ImageCreateUploadOptions{ Region: region, From 18744e14f0b083be7b588547c455dd150e51cc76 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Thu, 9 Feb 2023 15:14:56 -0500 Subject: [PATCH 06/44] Fixed another linting error --- linode/accountsettings/tmpl/template.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linode/accountsettings/tmpl/template.go b/linode/accountsettings/tmpl/template.go index 925001876..e460c7112 100644 --- a/linode/accountsettings/tmpl/template.go +++ b/linode/accountsettings/tmpl/template.go @@ -24,6 +24,8 @@ func DataBasic(t *testing.T) string { func Updates(t *testing.T, longviewSubscription string, backupsEnabled, networkHelper bool) string { return acceptance.ExecuteTemplate(t, - "account_settings_updates", TemplateData{LongviewSubscription: longviewSubscription, - BackupsEnabled: backupsEnabled, NetworkHelper: networkHelper}) + "account_settings_updates", TemplateData{ + LongviewSubscription: longviewSubscription, + BackupsEnabled: backupsEnabled, NetworkHelper: networkHelper, + }) } From b008d7caecc7390296bc779a52b3fd2e1283bade Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 10 Feb 2023 10:53:47 -0500 Subject: [PATCH 07/44] Fixed test to reset account settings to their original state --- linode/accountsettings/resource_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linode/accountsettings/resource_test.go b/linode/accountsettings/resource_test.go index b30217cf6..d4a1a4de9 100644 --- a/linode/accountsettings/resource_test.go +++ b/linode/accountsettings/resource_test.go @@ -64,6 +64,9 @@ func TestAccResourceAccountSettings_update(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "network_helper", strconv.FormatBool(updatedNetworkHelper)), ), }, + { + Config: tmpl.Updates(t, currLongviewPlan, currBackupsEnabled, currNetworkHelper), + }, }, }) } From d464572402dd79203395ca6d20de0915fba85644 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 10 Feb 2023 11:50:14 -0500 Subject: [PATCH 08/44] Fixed issue with update function --- linode/accountsettings/resource.go | 14 +++++++++----- linode/accountsettings/resource_test.go | 17 ++++++++++++++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/linode/accountsettings/resource.go b/linode/accountsettings/resource.go index 25196459a..5cb9b2788 100644 --- a/linode/accountsettings/resource.go +++ b/linode/accountsettings/resource.go @@ -51,31 +51,35 @@ func createResource(ctx context.Context, d *schema.ResourceData, meta interface{ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*helper.ProviderMeta).Client - _, errSettings := client.GetAccountSettings(ctx) + accountSettings, errSettings := client.GetAccountSettings(ctx) if errSettings != nil { return diag.Errorf("Error fetching the account settings: %s", errSettings) } + longviewPlan, errLongview := client.GetLongviewPlan(ctx) + if errLongview != nil { + return diag.Errorf("Error fetching the longview plan: %s", errLongview) + } + accountUpdateOpts := linodego.AccountSettingsUpdateOptions{} longviewUpdateOpts := linodego.LongviewPlanUpdateOptions{} accountUpdate := false longviewUpdate := false - if d.HasChange("backups_enabled") { + if d.HasChange("backups_enabled") || d.Get("backups_enabled") != accountSettings.BackupsEnabled { backupsEnabled := d.Get("backups_enabled").(bool) accountUpdateOpts.BackupsEnabled = &backupsEnabled accountUpdate = true - } - if d.HasChange("network_helper") { + if d.HasChange("network_helper") || d.Get("network_helper") != accountSettings.NetworkHelper { networkHelper := d.Get("network_helper").(bool) accountUpdateOpts.NetworkHelper = &networkHelper accountUpdate = true } - if d.HasChange("longview_subscription") { + if d.HasChange("longview_subscription") || d.Get("longview_subscription") != longviewPlan.ID { longviewUpdateOpts.LongviewSubscription = d.Get("longview_subscription").(string) longviewUpdate = true } diff --git a/linode/accountsettings/resource_test.go b/linode/accountsettings/resource_test.go index d4a1a4de9..459914790 100644 --- a/linode/accountsettings/resource_test.go +++ b/linode/accountsettings/resource_test.go @@ -1,11 +1,11 @@ package accountsettings_test import ( + "context" "strconv" "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" - "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/accountsettings/tmpl" ) @@ -37,8 +37,14 @@ func TestAccResourceAccountSettings_update(t *testing.T) { resourceName := "linode_account_settings.foobar" - accountSettings := linodego.AccountSettings{} - longviewSettings := linodego.LongviewPlan{} + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fail() + t.Log("Failed to get testing client.") + } + + accountSettings, _ := client.GetAccountSettings(context.Background()) + longviewSettings, _ := client.GetLongviewPlan(context.Background()) currLongviewPlan := longviewSettings.ID currBackupsEnabled := accountSettings.BackupsEnabled @@ -66,6 +72,11 @@ func TestAccResourceAccountSettings_update(t *testing.T) { }, { Config: tmpl.Updates(t, currLongviewPlan, currBackupsEnabled, currNetworkHelper), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "longview_subscription", currLongviewPlan), + resource.TestCheckResourceAttr(resourceName, "backups_enabled", strconv.FormatBool(currBackupsEnabled)), + resource.TestCheckResourceAttr(resourceName, "network_helper", strconv.FormatBool(currNetworkHelper)), + ), }, }, }) From b01db7660aba1e6ba8e1f1e872062723d7e36f31 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 10 Feb 2023 14:22:08 -0500 Subject: [PATCH 09/44] Added support for label property in linode_region datasource --- go.mod | 2 +- go.sum | 4 ++-- linode/region/datasource.go | 1 + linode/region/datasource_test.go | 19 ++++++++++++++++++- linode/region/schema_datasource.go | 5 +++++ linode/region/tmpl/template.go | 5 +++-- website/docs/d/region.html.markdown | 2 ++ 7 files changed, 32 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9be74bef5..cebdc4588 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 - github.com/linode/linodego v1.14.0 + github.com/linode/linodego v1.14.1 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 ) diff --git a/go.sum b/go.sum index e98e108cd..1dea6da8a 100644 --- a/go.sum +++ b/go.sum @@ -313,8 +313,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.14.0 h1:rEFcpDDjO7gGrplPgo0TheVmzjwAFXRej5t5ej8cUJo= -github.com/linode/linodego v1.14.0/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= +github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= +github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/linode/region/datasource.go b/linode/region/datasource.go index ad9575af5..6969f8cfc 100644 --- a/linode/region/datasource.go +++ b/linode/region/datasource.go @@ -32,6 +32,7 @@ func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{ if region != nil { d.SetId(region.ID) d.Set("country", region.Country) + d.Set("label", region.Label) return nil } diff --git a/linode/region/datasource_test.go b/linode/region/datasource_test.go index 1443a24b7..5c9803429 100644 --- a/linode/region/datasource_test.go +++ b/linode/region/datasource_test.go @@ -1,6 +1,7 @@ package region_test import ( + "context" "log" "testing" @@ -10,6 +11,7 @@ import ( ) var testRegion string +var testLabel string func init() { region, err := acceptance.GetRandomRegionWithCaps([]string{"linodes"}) @@ -18,12 +20,26 @@ func init() { } testRegion = region + + client, err := acceptance.GetClientForSweepers() + if err != nil { + log.Fatal(err) + } + + r, err := client.GetRegion(context.Background(), testRegion) + if err != nil { + log.Fatal(err) + } + + testLabel = r.Label + } func TestAccDataSourceRegion_basic(t *testing.T) { t.Parallel() regionID := testRegion + label := testLabel resourceName := "data.linode_region.foobar" resource.Test(t, resource.TestCase{ @@ -31,10 +47,11 @@ func TestAccDataSourceRegion_basic(t *testing.T) { Providers: acceptance.TestAccProviders, Steps: []resource.TestStep{ { - Config: tmpl.DataBasic(t, regionID), + Config: tmpl.DataBasic(t, regionID, label), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "country"), resource.TestCheckResourceAttr(resourceName, "id", regionID), + resource.TestCheckResourceAttr(resourceName, "label", label), ), }, }, diff --git a/linode/region/schema_datasource.go b/linode/region/schema_datasource.go index 70affb49c..36ebf271d 100644 --- a/linode/region/schema_datasource.go +++ b/linode/region/schema_datasource.go @@ -14,4 +14,9 @@ var dataSourceSchema = map[string]*schema.Schema{ Description: "The unique ID of this Region.", Required: true, }, + "label": { + Type: schema.TypeString, + Description: "Detailed location information for this Region, including city, state or region, and country.", + Computed: true, + }, } diff --git a/linode/region/tmpl/template.go b/linode/region/tmpl/template.go index d0a34bb27..7ca799ab5 100644 --- a/linode/region/tmpl/template.go +++ b/linode/region/tmpl/template.go @@ -8,9 +8,10 @@ import ( type TemplateData struct { Region string + Label string } -func DataBasic(t *testing.T, id string) string { +func DataBasic(t *testing.T, id, label string) string { return acceptance.ExecuteTemplate(t, - "region_data_basic", TemplateData{Region: id}) + "region_data_basic", TemplateData{Region: id, Label: label}) } diff --git a/website/docs/d/region.html.markdown b/website/docs/d/region.html.markdown index 0d157e43b..ab445300e 100644 --- a/website/docs/d/region.html.markdown +++ b/website/docs/d/region.html.markdown @@ -29,3 +29,5 @@ data "linode_region" "region" { In addition to all arguments above, the following attributes are exported: - `country` - The country the region resides in. + +- `label` - Detailed location information for this Region, including city, state or region, and country. From f35b9012acf578944fdd9aff7876dfe1331c6c75 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Tue, 14 Feb 2023 13:35:52 -0500 Subject: [PATCH 10/44] Added linode_regions datasource and updated linode_region datasource to support new fields --- linode/acceptance/test_util.go | 47 +++++ linode/provider.go | 2 + linode/region/datasource.go | 17 ++ linode/region/datasource_test.go | 4 + linode/region/schema_datasource.go | 29 +++ linode/regions/datasource.go | 64 ++++++ linode/regions/datasource_test.go | 182 ++++++++++++++++++ linode/regions/schema_datasource.go | 23 +++ linode/regions/tmpl/data_basic.gotf | 5 + .../tmpl/data_filter_by_capabilities.gotf | 10 + .../regions/tmpl/data_filter_by_country.gotf | 10 + .../regions/tmpl/data_filter_by_status.gotf | 10 + linode/regions/tmpl/template.go | 45 +++++ website/docs/d/region.html.markdown | 12 ++ website/docs/d/regions.html.markdown | 71 +++++++ 15 files changed, 531 insertions(+) create mode 100644 linode/regions/datasource.go create mode 100644 linode/regions/datasource_test.go create mode 100644 linode/regions/schema_datasource.go create mode 100644 linode/regions/tmpl/data_basic.gotf create mode 100644 linode/regions/tmpl/data_filter_by_capabilities.gotf create mode 100644 linode/regions/tmpl/data_filter_by_country.gotf create mode 100644 linode/regions/tmpl/data_filter_by_status.gotf create mode 100644 linode/regions/tmpl/template.go create mode 100644 website/docs/d/regions.html.markdown diff --git a/linode/acceptance/test_util.go b/linode/acceptance/test_util.go index e23dc04e3..5f020f732 100644 --- a/linode/acceptance/test_util.go +++ b/linode/acceptance/test_util.go @@ -34,6 +34,8 @@ const ( type AttrValidateFunc func(val string) error +type ListAttrValidateFunc func(resourceName, path string, state *terraform.State) error + var ( optInTests map[string]struct{} privateKeyMaterial string @@ -260,6 +262,51 @@ func CheckResourceAttrNotEqual(resName string, path, notValue string) resource.T } } +func CheckResourceAttrListContains(resName, path, desiredValue string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resName] + if !ok { + return fmt.Errorf("Not found: %s", resName) + } + + length, err := strconv.Atoi(rs.Primary.Attributes[path+".#"]) + if err != nil { + return fmt.Errorf("attribute %s does not exist", path) + } + + for i := 0; i < length; i++ { + if rs.Primary.Attributes[path+"."+strconv.Itoa(i)] == desiredValue { + return nil + } + } + + return fmt.Errorf("Desired value not found in resource attribute") + } +} + +func LoopThroughStringList(resName, path string, listValidateFunc ListAttrValidateFunc) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[resName] + if !ok { + return fmt.Errorf("Not found: %s", resName) + } + + length, err := strconv.Atoi(rs.Primary.Attributes[path+".#"]) + if err != nil { + return fmt.Errorf("attribute %s does not exist", path) + } + + for i := 0; i < length; i++ { + err := listValidateFunc(resName, path+"."+strconv.Itoa(i), s) + if err != nil { + return fmt.Errorf("Value not found:%s", err) + } + } + + return nil + } +} + func CheckLKEClusterDestroy(s *terraform.State) error { client := TestAccProvider.Meta().(*helper.ProviderMeta).Client diff --git a/linode/provider.go b/linode/provider.go index 7c6f9c273..fce5760b9 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -53,6 +53,7 @@ import ( "github.com/linode/terraform-provider-linode/linode/profile" "github.com/linode/terraform-provider-linode/linode/rdns" "github.com/linode/terraform-provider-linode/linode/region" + "github.com/linode/terraform-provider-linode/linode/regions" "github.com/linode/terraform-provider-linode/linode/sshkey" "github.com/linode/terraform-provider-linode/linode/stackscript" "github.com/linode/terraform-provider-linode/linode/stackscripts" @@ -195,6 +196,7 @@ func Provider() *schema.Provider { "linode_object_storage_cluster": objcluster.DataSource(), "linode_profile": profile.DataSource(), "linode_region": region.DataSource(), + "linode_regions": regions.DataSource(), "linode_sshkey": sshkey.DataSource(), "linode_stackscript": stackscript.DataSource(), "linode_stackscripts": stackscripts.DataSource(), diff --git a/linode/region/datasource.go b/linode/region/datasource.go index 6969f8cfc..e0383401d 100644 --- a/linode/region/datasource.go +++ b/linode/region/datasource.go @@ -33,8 +33,25 @@ func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{ d.SetId(region.ID) d.Set("country", region.Country) d.Set("label", region.Label) + d.Set("capabilities", region.Capabilities) + d.Set("status", region.Status) + d.Set("resolvers", []map[string]interface{}{{ + "ipv4": region.Resolvers.IPv4, + "ipv6": region.Resolvers.IPv6, + }}) return nil } return diag.Errorf("Linode Region %s was not found", reqRegion) } + +// func flattenRegionResolvers(data interface{}) map[string]interface{} { +// t := data.(linodego.RegionResolvers) + +// result := make(map[string]interface{}) + +// result["ipv4"] = t.IPv4 +// result["ipv6"] = t.IPv4 + +// return result +// } diff --git a/linode/region/datasource_test.go b/linode/region/datasource_test.go index 5c9803429..9d5f75b03 100644 --- a/linode/region/datasource_test.go +++ b/linode/region/datasource_test.go @@ -52,6 +52,10 @@ func TestAccDataSourceRegion_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "country"), resource.TestCheckResourceAttr(resourceName, "id", regionID), resource.TestCheckResourceAttr(resourceName, "label", label), + resource.TestCheckResourceAttrSet(resourceName, "status"), + resource.TestCheckResourceAttrSet(resourceName, "resolvers.0.ipv4"), + resource.TestCheckResourceAttrSet(resourceName, "resolvers.0.ipv6"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "capabilities.#", 0), ), }, }, diff --git a/linode/region/schema_datasource.go b/linode/region/schema_datasource.go index 36ebf271d..372fed0ec 100644 --- a/linode/region/schema_datasource.go +++ b/linode/region/schema_datasource.go @@ -19,4 +19,33 @@ var dataSourceSchema = map[string]*schema.Schema{ Description: "Detailed location information for this Region, including city, state or region, and country.", Computed: true, }, + "capabilities": { + Type: schema.TypeList, + Description: "A list of capabilities of this region.", + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "status": { + Type: schema.TypeString, + Description: "This region’s current operational status.", + Computed: true, + }, + "resolvers": { + Computed: true, + Type: schema.TypeList, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ipv4": { + Type: schema.TypeString, + Computed: true, + Description: "The IPv4 addresses for this region’s DNS resolvers, separated by commas.", + }, + "ipv6": { + Type: schema.TypeString, + Computed: true, + Description: "The IPv6 addresses for this region’s DNS resolvers, separated by commas.", + }, + }, + }, + }, } diff --git a/linode/regions/datasource.go b/linode/regions/datasource.go new file mode 100644 index 000000000..74f1e8f05 --- /dev/null +++ b/linode/regions/datasource.go @@ -0,0 +1,64 @@ +package regions + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/linode/linodego" +) + +func DataSource() *schema.Resource { + return &schema.Resource{ + Schema: dataSourceSchema, + ReadContext: readDataSource, + } +} + +func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + results, err := filterConfig.FilterDataSource(ctx, d, meta, listRegions, flattenRegions) + if err != nil { + return nil + } + + d.Set("regions", results) + + return nil +} + +func listRegions( + ctx context.Context, d *schema.ResourceData, client *linodego.Client, + options *linodego.ListOptions, +) ([]interface{}, error) { + types, err := client.ListRegions(ctx, options) + if err != nil { + return nil, err + } + + result := make([]interface{}, len(types)) + + for i, v := range types { + result[i] = v + } + + return result, nil +} + +func flattenRegions(data interface{}) map[string]interface{} { + t := data.(linodego.Region) + + result := make(map[string]interface{}) + + result["capabilities"] = t.Capabilities + result["country"] = t.Country + result["id"] = t.ID + result["label"] = t.Label + result["resolvers"] = + []map[string]interface{}{{ + "ipv4": t.Resolvers.IPv4, + "ipv6": t.Resolvers.IPv6, + }} + result["status"] = t.Status + + return result +} diff --git a/linode/regions/datasource_test.go b/linode/regions/datasource_test.go new file mode 100644 index 000000000..0e7930e7e --- /dev/null +++ b/linode/regions/datasource_test.go @@ -0,0 +1,182 @@ +package regions_test + +import ( + "context" + "math/rand" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/regions/tmpl" +) + +func TestAccDataSourceRegions_basic(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_regions.foobar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataBasic(t), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "regions.0.country"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.id"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.label"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv4"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv6"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.0.capabilities.#", 0), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.#", 0), + ), + }, + }, + }) +} + +func TestAccDataSourceAccountRegions_filterByCountry(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_regions.foobar" + + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fail() + t.Log("Failed to get testing client.") + } + + regions, err := client.ListRegions(context.TODO(), nil) + randIndex := rand.Intn(len(regions)) + region := regions[randIndex] + + country := region.Country + status := region.Status + capabilities := region.Capabilities + + randomCapability := capabilities[rand.Intn(len(capabilities))] + + if err != nil { + t.Fail() + t.Log("Failed to get testing region.") + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataFilterCountry(t, country, status, randomCapability), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(resourceName, "regions.0.country", country), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.id"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.label"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv4"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv6"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.0.capabilities.#", 0), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.#", 0), + ), + }, + }, + }) +} + +func TestAccDataSourceRegions_filterByStatus(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_regions.foobar" + + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fail() + t.Log("Failed to get testing client.") + } + + regions, err := client.ListRegions(context.TODO(), nil) + randIndex := rand.Intn(len(regions)) + region := regions[randIndex] + + country := region.Country + status := region.Status + capabilities := region.Capabilities + + randomCapability := capabilities[rand.Intn(len(capabilities))] + + if err != nil { + t.Fail() + t.Log("Failed to get testing region.") + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataFilterStatus(t, country, status, randomCapability), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "regions.0.country"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.id"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.label"), + resource.TestCheckResourceAttr(resourceName, "regions.0.status", status), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv4"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv6"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.0.capabilities.#", 0), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.#", 0), + ), + }, + }, + }) +} + +func TestAccDataSourceRegions_filterByCapabilities(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_regions.foobar" + + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fail() + t.Log("Failed to get testing client.") + } + + regions, err := client.ListRegions(context.TODO(), nil) + randIndex := rand.Intn(len(regions)) + region := regions[randIndex] + + country := region.Country + status := region.Status + capabilities := region.Capabilities + + randomCapability := capabilities[rand.Intn(len(capabilities))] + + if err != nil { + t.Fail() + t.Log("Failed to get testing region.") + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataFilterCapabilities(t, country, status, randomCapability), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "regions.0.country"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.id"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.label"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv4"), + resource.TestCheckResourceAttrSet(resourceName, "regions.0.resolvers.0.ipv6"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.0.capabilities.#", 0), + acceptance.CheckResourceAttrGreaterThan(resourceName, "regions.#", 0), + acceptance.LoopThroughStringList(resourceName, "regions", func(resourceName, path string, state *terraform.State) error { + return acceptance.CheckResourceAttrListContains(resourceName, path+".capabilities", randomCapability)(state) + }), + ), + }, + }, + }) +} diff --git a/linode/regions/schema_datasource.go b/linode/regions/schema_datasource.go new file mode 100644 index 000000000..feed88a41 --- /dev/null +++ b/linode/regions/schema_datasource.go @@ -0,0 +1,23 @@ +package regions + +import ( + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/linode/region" +) + +var filterConfig = helper.FilterConfig{ + "capabilities": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, + "country": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, + "status": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, +} + +var dataSourceSchema = map[string]*schema.Schema{ + "filter": filterConfig.FilterSchema(), + "regions": { + Type: schema.TypeList, + Description: "The returned list of regions.", + Computed: true, + Elem: region.DataSource(), + }, +} diff --git a/linode/regions/tmpl/data_basic.gotf b/linode/regions/tmpl/data_basic.gotf new file mode 100644 index 000000000..675021085 --- /dev/null +++ b/linode/regions/tmpl/data_basic.gotf @@ -0,0 +1,5 @@ +{{ define "regions_data_basic" }} + +data "linode_regions" "foobar" {} + +{{ end }} \ No newline at end of file diff --git a/linode/regions/tmpl/data_filter_by_capabilities.gotf b/linode/regions/tmpl/data_filter_by_capabilities.gotf new file mode 100644 index 000000000..84c0d1722 --- /dev/null +++ b/linode/regions/tmpl/data_filter_by_capabilities.gotf @@ -0,0 +1,10 @@ +{{ define "regions_data_filter_by_capabilities" }} + +data "linode_regions" "foobar" { + filter { + name = "capabilities" + values = ["{{ .Capabilities }}"] + } +} + +{{ end }} \ No newline at end of file diff --git a/linode/regions/tmpl/data_filter_by_country.gotf b/linode/regions/tmpl/data_filter_by_country.gotf new file mode 100644 index 000000000..0857f9d3d --- /dev/null +++ b/linode/regions/tmpl/data_filter_by_country.gotf @@ -0,0 +1,10 @@ +{{ define "regions_data_filter_by_country" }} + +data "linode_regions" "foobar" { + filter { + name = "country" + values = ["{{ .Country }}"] + } +} + +{{ end }} \ No newline at end of file diff --git a/linode/regions/tmpl/data_filter_by_status.gotf b/linode/regions/tmpl/data_filter_by_status.gotf new file mode 100644 index 000000000..465dabc40 --- /dev/null +++ b/linode/regions/tmpl/data_filter_by_status.gotf @@ -0,0 +1,10 @@ +{{ define "regions_data_filter_by_status" }} + +data "linode_regions" "foobar" { + filter { + name = "status" + values = ["{{ .Status }}"] + } +} + +{{ end }} \ No newline at end of file diff --git a/linode/regions/tmpl/template.go b/linode/regions/tmpl/template.go new file mode 100644 index 000000000..7add9f9cd --- /dev/null +++ b/linode/regions/tmpl/template.go @@ -0,0 +1,45 @@ +package tmpl + +import ( + "testing" + + "github.com/linode/terraform-provider-linode/linode/acceptance" +) + +type TemplateData struct { + Country string + Status string + Capabilities string +} + +func DataBasic(t *testing.T) string { + return acceptance.ExecuteTemplate(t, + "regions_data_basic", nil) +} + +func DataFilterCountry(t *testing.T, country, status string, capabilities string) string { + return acceptance.ExecuteTemplate(t, + "regions_data_filter_by_country", TemplateData{ + Country: country, + Status: status, + Capabilities: capabilities, + }) +} + +func DataFilterStatus(t *testing.T, country, status string, capabilities string) string { + return acceptance.ExecuteTemplate(t, + "regions_data_filter_by_status", TemplateData{ + Country: country, + Status: status, + Capabilities: capabilities, + }) +} + +func DataFilterCapabilities(t *testing.T, country, status string, capabilities string) string { + return acceptance.ExecuteTemplate(t, + "regions_data_filter_by_capabilities", TemplateData{ + Country: country, + Status: status, + Capabilities: capabilities, + }) +} diff --git a/website/docs/d/region.html.markdown b/website/docs/d/region.html.markdown index ab445300e..6931aa5e0 100644 --- a/website/docs/d/region.html.markdown +++ b/website/docs/d/region.html.markdown @@ -31,3 +31,15 @@ In addition to all arguments above, the following attributes are exported: - `country` - The country the region resides in. - `label` - Detailed location information for this Region, including city, state or region, and country. + +- `capabilities` - A list of capabilities of this region. + +- `status` - This region’s current operational status (ok or outage). + +- [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. + +### Resolvers + +- `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. + +- `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. diff --git a/website/docs/d/regions.html.markdown b/website/docs/d/regions.html.markdown new file mode 100644 index 000000000..a84430a70 --- /dev/null +++ b/website/docs/d/regions.html.markdown @@ -0,0 +1,71 @@ +--- +layout: "linode" +page_title: "Linode: linode_regions" +sidebar_current: "docs-linode-datasource-regions" +description: |- + Lists the Regions available for Linode services. Not all services are guaranteed to be available in all Regions. +--- + +# linode\_regions + +Provides information about Linode regions that match a set of filters. + +```hcl +data "linode_regions" "filtered-regions" { + filter { + name = "status" + values = ["ok"] + } + + filter { + name = "capabilities" + values = ["NodeBalancers"] + } +} + +output "regions" { + value = data.linode_regions.filtered-regions.regions +} +``` + +## Argument Reference + +The following arguments are supported: + +* [`filter`](#filter) - (Optional) A set of filters used to select Linode regions that meet certain requirements. + +### Filter + +* `name` - (Required) The name of the field to filter by. See the [Filterable Fields section](#filterable-fields) for a complete list of filterable fields. + +* `values` - (Required) A list of values for the filter to allow. These values should all be in string form. + +* `match_by` - (Optional) The method to match the field by. (`exact`, `regex`, `substring`; default `exact`) + +## Attributes Reference + +Each Linode region will be stored in the `regions` attribute and will export the following attributes: + +- `country` - The country the region resides in. + +- `label` - Detailed location information for this Region, including city, state or region, and country. + +- `capabilities` - A list of capabilities of this region. + +- `status` - This region’s current operational status (ok or outage). + +- [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. + +### Resolvers + +- `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. + +- `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. + +## Filterable Fields + +* `status` + +* `country` + +* `capabilities` \ No newline at end of file From 63b878de9c72a1777d63e56f7a93a573a7f3c234 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Tue, 14 Feb 2023 13:41:00 -0500 Subject: [PATCH 11/44] Fixed linting issues with docs --- website/docs/d/region.html.markdown | 16 ++++++++-------- website/docs/d/regions.html.markdown | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/website/docs/d/region.html.markdown b/website/docs/d/region.html.markdown index 6931aa5e0..95c7cbd5f 100644 --- a/website/docs/d/region.html.markdown +++ b/website/docs/d/region.html.markdown @@ -22,24 +22,24 @@ data "linode_region" "region" { ## Argument Reference -- `id` - (Required) The code name of the region to select. +* `id` - (Required) The code name of the region to select. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -- `country` - The country the region resides in. +* `country` - The country the region resides in. -- `label` - Detailed location information for this Region, including city, state or region, and country. +* `label` - Detailed location information for this Region, including city, state or region, and country. -- `capabilities` - A list of capabilities of this region. +* `capabilities` - A list of capabilities of this region. -- `status` - This region’s current operational status (ok or outage). +* `status` - This region’s current operational status (ok or outage). -- [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. +* [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. ### Resolvers -- `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. +* `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. -- `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. +* `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. diff --git a/website/docs/d/regions.html.markdown b/website/docs/d/regions.html.markdown index a84430a70..5e15543ca 100644 --- a/website/docs/d/regions.html.markdown +++ b/website/docs/d/regions.html.markdown @@ -46,21 +46,21 @@ The following arguments are supported: Each Linode region will be stored in the `regions` attribute and will export the following attributes: -- `country` - The country the region resides in. +* `country` - The country the region resides in. -- `label` - Detailed location information for this Region, including city, state or region, and country. +* `label` - Detailed location information for this Region, including city, state or region, and country. -- `capabilities` - A list of capabilities of this region. +* `capabilities` - A list of capabilities of this region. -- `status` - This region’s current operational status (ok or outage). +* `status` - This region’s current operational status (ok or outage). -- [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. +* [`resolvers`] (#resolvers) - An object representing the IP addresses for this region's DNS resolvers. ### Resolvers -- `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. +* `ipv4` - The IPv4 addresses for this region’s DNS resolvers, separated by commas. -- `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. +* `ipv6` - The IPv6 addresses for this region’s DNS resolvers, separated by commas. ## Filterable Fields @@ -68,4 +68,4 @@ Each Linode region will be stored in the `regions` attribute and will export the * `country` -* `capabilities` \ No newline at end of file +* `capabilities` From a71d5c214129102002bc9c8aaafb3b59f6e52246 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Tue, 14 Feb 2023 13:44:56 -0500 Subject: [PATCH 12/44] Fixed another linting error --- linode/regions/datasource.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/linode/regions/datasource.go b/linode/regions/datasource.go index 74f1e8f05..a8749e677 100644 --- a/linode/regions/datasource.go +++ b/linode/regions/datasource.go @@ -53,11 +53,10 @@ func flattenRegions(data interface{}) map[string]interface{} { result["country"] = t.Country result["id"] = t.ID result["label"] = t.Label - result["resolvers"] = - []map[string]interface{}{{ - "ipv4": t.Resolvers.IPv4, - "ipv6": t.Resolvers.IPv6, - }} + result["resolvers"] = []map[string]interface{}{{ + "ipv4": t.Resolvers.IPv4, + "ipv6": t.Resolvers.IPv6, + }} result["status"] = t.Status return result From e623f31c4b1aa4c7e33345a1eec710b379787fcb Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Tue, 14 Feb 2023 13:49:39 -0500 Subject: [PATCH 13/44] Fixed yet another linting error --- linode/regions/datasource_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linode/regions/datasource_test.go b/linode/regions/datasource_test.go index 0e7930e7e..ee5dda1b8 100644 --- a/linode/regions/datasource_test.go +++ b/linode/regions/datasource_test.go @@ -37,7 +37,7 @@ func TestAccDataSourceRegions_basic(t *testing.T) { }) } -func TestAccDataSourceAccountRegions_filterByCountry(t *testing.T) { +func TestAccDataSourceRegions_filterByCountry(t *testing.T) { t.Parallel() resourceName := "data.linode_regions.foobar" From 742631896d3b4cae704bb66e24e3cbc03510ae77 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Wed, 15 Feb 2023 14:58:24 -0500 Subject: [PATCH 14/44] The linode_lke_cluster resource now waits for nodes to be ready before returning from a scale-up operation --- linode/lke/resource.go | 16 +++++++++++++++- linode/lke/resource_test.go | 7 +++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/linode/lke/resource.go b/linode/lke/resource.go index e18bcb870..8aed8fd37 100644 --- a/linode/lke/resource.go +++ b/linode/lke/resource.go @@ -191,16 +191,24 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ poolSpecs := expandLinodeLKENodePoolSpecs(d.Get("pool").([]interface{})) updates := ReconcileLKENodePoolSpecs(poolSpecs, pools) + updatedIds := []int{} + for poolID, updateOpts := range updates.ToUpdate { if _, err := client.UpdateLKENodePool(ctx, id, poolID, updateOpts); err != nil { return diag.Errorf("failed to update LKE Cluster %d Pool %d: %s", id, poolID, err) } + + updatedIds = append(updatedIds, poolID) } for _, createOpts := range updates.ToCreate { - if _, err := client.CreateLKENodePool(ctx, id, createOpts); err != nil { + pool, err := client.CreateLKENodePool(ctx, id, createOpts) + + if err != nil { return diag.Errorf("failed to create LKE Cluster %d Pool: %s", id, err) } + + updatedIds = append(updatedIds, pool.ID) } for _, poolID := range updates.ToDelete { @@ -209,6 +217,12 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ } } + for _, id := range updatedIds { + client.WaitForLKEClusterConditions(ctx, id, linodego.LKEClusterPollOptions{ + TimeoutSeconds: 10 * 60, + }, k8scondition.ClusterHasReadyNode) + } + return nil } diff --git a/linode/lke/resource_test.go b/linode/lke/resource_test.go index 980d52cca..f62ecfcdf 100644 --- a/linode/lke/resource_test.go +++ b/linode/lke/resource_test.go @@ -307,6 +307,7 @@ func TestAccResourceLKECluster_poolUpdates(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "label", clusterName), resource.TestCheckResourceAttr(resourceClusterName, "pool.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.count", "3"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { @@ -317,6 +318,7 @@ func TestAccResourceLKECluster_poolUpdates(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "pool.1.count", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.2.count", "2"), resource.TestCheckResourceAttr(resourceClusterName, "pool.3.count", "2"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { @@ -325,6 +327,7 @@ func TestAccResourceLKECluster_poolUpdates(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "label", clusterName), resource.TestCheckResourceAttr(resourceClusterName, "pool.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.count", "3"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, }, @@ -394,6 +397,7 @@ func TestAccResourceLKECluster_autoScaler(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "pool.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.count", "3"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.#", "0"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { @@ -405,6 +409,7 @@ func TestAccResourceLKECluster_autoScaler(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.0.min", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.0.max", "5"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { @@ -416,6 +421,7 @@ func TestAccResourceLKECluster_autoScaler(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.0.min", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.0.autoscaler.0.max", "8"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { @@ -431,6 +437,7 @@ func TestAccResourceLKECluster_autoScaler(t *testing.T) { resource.TestCheckResourceAttr(resourceClusterName, "pool.1.autoscaler.#", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.1.autoscaler.0.min", "1"), resource.TestCheckResourceAttr(resourceClusterName, "pool.1.autoscaler.0.max", "8"), + resource.TestCheckResourceAttr(resourceClusterName, "status", "ready"), ), }, { From ffa6033aca563a636bc1d8df88a166f84ead13e4 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Wed, 15 Feb 2023 15:04:16 -0500 Subject: [PATCH 15/44] Fixed linting issue --- linode/lke/resource.go | 1 - 1 file changed, 1 deletion(-) diff --git a/linode/lke/resource.go b/linode/lke/resource.go index 8aed8fd37..eb107bd40 100644 --- a/linode/lke/resource.go +++ b/linode/lke/resource.go @@ -203,7 +203,6 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ for _, createOpts := range updates.ToCreate { pool, err := client.CreateLKENodePool(ctx, id, createOpts) - if err != nil { return diag.Errorf("failed to create LKE Cluster %d Pool: %s", id, err) } From 534eae860d3502bbd965fb9e24b5f7d08dbf3972 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 17 Feb 2023 09:25:43 -0500 Subject: [PATCH 16/44] updateResource now uses waitForNodePoolReady --- linode/lke/resource.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/linode/lke/resource.go b/linode/lke/resource.go index eb107bd40..35a6956a1 100644 --- a/linode/lke/resource.go +++ b/linode/lke/resource.go @@ -4,6 +4,7 @@ import ( "context" "log" "strconv" + "sync" "time" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" @@ -191,14 +192,12 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ poolSpecs := expandLinodeLKENodePoolSpecs(d.Get("pool").([]interface{})) updates := ReconcileLKENodePoolSpecs(poolSpecs, pools) - updatedIds := []int{} - for poolID, updateOpts := range updates.ToUpdate { if _, err := client.UpdateLKENodePool(ctx, id, poolID, updateOpts); err != nil { return diag.Errorf("failed to update LKE Cluster %d Pool %d: %s", id, poolID, err) } - updatedIds = append(updatedIds, poolID) + waitForNodePoolReady(ctx, &client, make(chan<- error), &sync.WaitGroup{}, int(updateLKETimeout), id, poolID) } for _, createOpts := range updates.ToCreate { @@ -207,7 +206,7 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ return diag.Errorf("failed to create LKE Cluster %d Pool: %s", id, err) } - updatedIds = append(updatedIds, pool.ID) + waitForNodePoolReady(ctx, &client, make(chan<- error), &sync.WaitGroup{}, int(updateLKETimeout), id, pool.ID) } for _, poolID := range updates.ToDelete { @@ -216,12 +215,6 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ } } - for _, id := range updatedIds { - client.WaitForLKEClusterConditions(ctx, id, linodego.LKEClusterPollOptions{ - TimeoutSeconds: 10 * 60, - }, k8scondition.ClusterHasReadyNode) - } - return nil } From 935ba70d77fff5f3f8707013a5502a3b5145e9ae Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 17 Feb 2023 09:42:47 -0500 Subject: [PATCH 17/44] Changed domain length validation from 255 to 253 --- linode/domain/schema_resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linode/domain/schema_resource.go b/linode/domain/schema_resource.go index 9288268f4..066573796 100644 --- a/linode/domain/schema_resource.go +++ b/linode/domain/schema_resource.go @@ -42,7 +42,7 @@ var resourceSchema = map[string]*schema.Schema{ "description": { Type: schema.TypeString, Description: "A description for this Domain. This is for display purposes only.", - ValidateFunc: validation.StringLenBetween(0, 255), + ValidateFunc: validation.StringLenBetween(0, 253), Optional: true, }, "master_ips": { From 13e1655c7a8f85acd6572f2e431d519fe653c2e6 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 17 Feb 2023 13:41:02 -0500 Subject: [PATCH 18/44] Fixed the pollMs field to not cause timeout --- linode/lke/resource.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/linode/lke/resource.go b/linode/lke/resource.go index 35a6956a1..bd757b90c 100644 --- a/linode/lke/resource.go +++ b/linode/lke/resource.go @@ -192,12 +192,14 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ poolSpecs := expandLinodeLKENodePoolSpecs(d.Get("pool").([]interface{})) updates := ReconcileLKENodePoolSpecs(poolSpecs, pools) + updatedIds := []int{} + for poolID, updateOpts := range updates.ToUpdate { if _, err := client.UpdateLKENodePool(ctx, id, poolID, updateOpts); err != nil { return diag.Errorf("failed to update LKE Cluster %d Pool %d: %s", id, poolID, err) } - waitForNodePoolReady(ctx, &client, make(chan<- error), &sync.WaitGroup{}, int(updateLKETimeout), id, poolID) + updatedIds = append(updatedIds, poolID) } for _, createOpts := range updates.ToCreate { @@ -206,7 +208,7 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ return diag.Errorf("failed to create LKE Cluster %d Pool: %s", id, err) } - waitForNodePoolReady(ctx, &client, make(chan<- error), &sync.WaitGroup{}, int(updateLKETimeout), id, pool.ID) + updatedIds = append(updatedIds, pool.ID) } for _, poolID := range updates.ToDelete { @@ -215,6 +217,15 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ } } + var wg sync.WaitGroup + wg.Add(len(updatedIds)) + + for _, poolID := range updatedIds { + go waitForNodePoolReady(ctx, &client, make(chan<- error), &wg, providerMeta.Config.LKENodeReadyPollMilliseconds, id, poolID) + } + + wg.Wait() + return nil } From 4f7c9e0e38ef838193b8617d5ae240d2affe95ab Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Fri, 17 Feb 2023 13:46:19 -0500 Subject: [PATCH 19/44] Fixed linting error --- linode/lke/resource.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linode/lke/resource.go b/linode/lke/resource.go index bd757b90c..8ebcbac52 100644 --- a/linode/lke/resource.go +++ b/linode/lke/resource.go @@ -221,7 +221,8 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ wg.Add(len(updatedIds)) for _, poolID := range updatedIds { - go waitForNodePoolReady(ctx, &client, make(chan<- error), &wg, providerMeta.Config.LKENodeReadyPollMilliseconds, id, poolID) + go waitForNodePoolReady(ctx, &client, make(chan<- error), + &wg, providerMeta.Config.LKENodeReadyPollMilliseconds, id, poolID) } wg.Wait() From 74293354c9ba1842e37c7526df8bbebaa360d989 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 09:06:50 +0000 Subject: [PATCH 20/44] build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: indirect ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index cebdc4588..ea0739dc7 100644 --- a/go.mod +++ b/go.mod @@ -60,9 +60,9 @@ require ( github.com/zclconf/go-cty v1.12.1 // indirect golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/text v0.3.8 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect diff --git a/go.sum b/go.sum index 1dea6da8a..a97539a65 100644 --- a/go.sum +++ b/go.sum @@ -593,8 +593,9 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -607,8 +608,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 874ac7d2ec51e02d7e9bb278d26a118b4301ce83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:42:24 +0000 Subject: [PATCH 21/44] build(deps): bump golang.org/x/text from 0.3.7 to 0.3.8 in /tools Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tools/go.mod | 9 +- tools/go.sum | 315 ++------------------------------------------------- 2 files changed, 16 insertions(+), 308 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index 085375162..e1dc67806 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -157,11 +157,10 @@ require ( go.uber.org/zap v1.17.0 // indirect golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1 // indirect - golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect + golang.org/x/text v0.3.8 // indirect + golang.org/x/tools v0.1.12 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index f58215d98..3c3acd8f5 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -22,30 +22,14 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -60,8 +44,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Antonboom/errname v0.1.6 h1:LzIJZlyLOCSu51o3/t2n9Ck7PcoP9wdbrdaW6J8fX24= -github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= github.com/Antonboom/errname v0.1.7 h1:mBBDKvEYwPl4WFFNwec1CZO096G6vzK9vvDQzAwkako= github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= github.com/Antonboom/nilnil v0.1.1 h1:PHhrh5ANKFWRBh7TdYmyyq2gyT2lotnvFvvFbylF81Q= @@ -70,11 +52,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0 h1:LAPPhJ4KR5Z8aKVZF5S48csJkxL5RMKmE/98fMs1u5M= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.1.0/go.mod h1:LGOGuvEgCfCQsy3JF2tRmpGDpzA53iZfyGEWSPwQ6/4= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0 h1:V9xVvhKbLt7unNEGAruK1xXglyc668Pq3Xx0MNTNqpo= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0/go.mod h1:n/vLeA7V+QY84iYAGwMkkUUp9ooeuftMEvaDrSVch+Q= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -83,7 +62,6 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.1.0 h1:pjK9nLPS1FwQYGGpPxoMYpe7qACHOhAWQMQzV71i49o= github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -102,7 +80,6 @@ github.com/alingse/asasalint v0.0.10/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqr github.com/andybalholm/crlf v0.0.0-20171020200849-670099aa064f/go.mod h1:k8feO4+kXDxro6ErPXBRTJ/ro2mf0SsFG8s7doP9kJE= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= @@ -110,10 +87,7 @@ github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:o github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= @@ -150,7 +124,6 @@ github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92 github.com/butuzov/ireturn v0.1.1 h1:QvrO2QF2+/Cx1WA/vETCIYBKtRjc30vesdoPUNo1EbY= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -162,17 +135,10 @@ github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXH github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -180,18 +146,14 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.3.3 h1:55xJKH7Gl9Vk6oQ1cMkwrDWjAkT1D+D1G9kNmRcAIY4= -github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= github.com/daixiang0/gci v0.4.3 h1:wf7x0xRjQqTlA2dzHTI0A/xPyp7VcBatBG9nwGatwbQ= github.com/daixiang0/gci v0.4.3/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -209,9 +171,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStBA= @@ -219,26 +178,20 @@ github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcH github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/firefart/nonamedreturns v1.0.1 h1:fSvcq6ZpK/uBAgJEGMvzErlzyM4NELLqqdTofVjVNag= -github.com/firefart/nonamedreturns v1.0.1/go.mod h1:D3dpIBojGGNh5UfElmwPu73SwDCm+VKhHYqwlNOk2uQ= github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/frankban/quicktest v1.14.2 h1:SPb1KFFmM+ybpEjPUhCCkZOM5xlovT5UbrMvWnXyBns= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.5.1 h1:L66amyuYogbxl0j2U+vGqJXusPF2IkduvXLnYD5TFgw= -github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -285,20 +238,17 @@ github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4 github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -306,8 +256,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -324,11 +272,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= @@ -337,8 +283,6 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.46.2 h1:o90t/Xa6dhJbvy8Bz2RpzUXqrkigp19DLStMolTZbyo= -github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= github.com/golangci/golangci-lint v1.47.2 h1:qvMDVv49Hrx3PSEXZ0bD/yhwSbhsOihQjFYCKieegIw= github.com/golangci/golangci-lint v1.47.2/go.mod h1:lpS2pjBZtRyXewUcOY7yUL3K4KfpoWz072yRN8AuhHg= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= @@ -363,19 +307,15 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -387,12 +327,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -402,12 +337,7 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 h1:PVRE9d4AQKmbelZ7emNig1+NT27DUmKZn5qXxfio54U= @@ -437,46 +367,30 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY= github.com/hashicorp/go-getter v1.5.0/go.mod h1:a7z7NPPfNQpJWcn4rSWFtdrSldqLdLPEF3d8nFMsSLM= github.com/hashicorp/go-getter v1.5.2/go.mod h1:orNH3BTYLu/fIxGIdLjLoAJHWMDQ/UKQr5O4m3iBuoo= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.15.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= github.com/hashicorp/go-plugin v1.4.0/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.4.0 h1:aAQzgqIrRKRa7w75CKpbBxYsmUoPjzVm1W59ca1L0J4= -github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -489,10 +403,6 @@ github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8= github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= github.com/hashicorp/terraform-exec v0.10.0/go.mod h1:tOT8j1J8rP05bZBGWXfMyU3HkLi1LWyqL3Bzsc3CJjo= github.com/hashicorp/terraform-exec v0.13.0/go.mod h1:SGhto91bVRlgXQWcJ5znSz+29UZIa8kpBbkGwQ+g9E8= @@ -537,7 +447,6 @@ github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUB github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= @@ -553,9 +462,6 @@ github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.1 h1:cErYo+J4SmEjdXZrVXGwLJCE2sB06s23LpkcyWNrT+s= github.com/kisielk/errcheck v1.6.1/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= @@ -567,18 +473,13 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.6.2 h1:K4xulKkwOCnT1CDms6Ex3uG1dvSMUUQe9zxgYQgbRXs= -github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= -github.com/kunwardeep/paralleltest v1.0.3 h1:UdKIkImEAXjR1chUWLn+PNXqWUGs//7tzMeWuP7NhmI= -github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g= github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= @@ -595,15 +496,12 @@ github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/maratori/testpackage v1.1.0 h1:GJY4wlzQhuBusMF1oahQCBtUV/AQ/k69IZ68vxaac2Q= github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= @@ -613,7 +511,6 @@ github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwM github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= @@ -623,7 +520,6 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -640,12 +536,9 @@ github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aks github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/mgechev/revive v1.2.1 h1:GjFml7ZsoR0IrQ2E2YIvWFNS5GPDV7xNwvA5GM1HZC4= github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/cli v1.1.1/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -657,9 +550,7 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-testing-interface v1.0.4/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -684,8 +575,6 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6Fx github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.7.11 h1:xV/WU3Vdwh5BUH4N06JNUznb6d5zhRPOnlgCrpNYNKA= -github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= github.com/nishanths/exhaustive v0.8.1 h1:0QKNascWv9qIHY7zRoZSxeRr6kuk5aAT3YXLTiDmjTo= github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= @@ -705,15 +594,13 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= @@ -722,22 +609,15 @@ github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJ github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.0.0 h1:P7Bq0SaI8nsexyay5UAyDo+ICWy5MQPgEZ5+l8JQTKo= -github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -750,10 +630,8 @@ github.com/polyfloyd/go-errorlint v1.0.0 h1:pDrQG0lrh68e602Wfp68BlUTRFoHn8PZYAjL github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= @@ -764,14 +642,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= @@ -795,7 +671,6 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -804,13 +679,8 @@ github.com/ryancurrah/gomodguard v1.2.3 h1:ww2fsjqocGCAFamzvv/b8IsRduuHHeK2MHTcT github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= github.com/sanposhiho/wastedassign/v2 v2.0.6 h1:+6/hQIHKNJAUixEj6EmOngGIisyeI+T3335lYTyxRoA= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.11.0 h1:+PDkpzR41OI2jrw1q6AdXZCbsNGNGT7pQjal0H0cArI= -github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/securego/gosec/v2 v2.12.0 h1:CQWdW7ATFpvLSohMVsajscfyHJ5rsGmEXmsNcsDNmAg= github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -830,8 +700,6 @@ github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYI github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/nosnakecase v1.5.0 h1:ZBvAu1H3uteN0KQ0IsLpIFOwYgPEhKLyv2ahrVkub6M= github.com/sivchari/nosnakecase v1.5.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= -github.com/sivchari/tenv v1.5.0 h1:wxW0mFpKI6DIb3s6m1jCDYvkWXCskrimXMuGd0K/kSQ= -github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sivchari/tenv v1.7.0 h1:d4laZMBK6jpe5PWepxlV9S+LC0yXqvYHiq8E6ceoVVE= github.com/sivchari/tenv v1.7.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -839,20 +707,15 @@ github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -864,8 +727,6 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= -github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= @@ -874,8 +735,6 @@ github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -886,13 +745,10 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/sylvia7788/contextcheck v1.0.4 h1:MsiVqROAdr0efZc/fOCt0c235qm9XJqHtWwM+2h2B04= @@ -910,14 +766,11 @@ github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiff github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.6.1 h1:Cf4a/iwuMp9s7kKrh74GTgijRVim0wEpKjgAsT7Wctw= -github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= github.com/tomarrell/wrapcheck/v2 v2.6.2 h1:3dI6YNcrJTQ/CJQ6M/DUkc0gnqYSIk6o0rChn9E/D0M= github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -927,8 +780,6 @@ github.com/ultraware/whitespace v0.0.5 h1:hh+/cpIcopyMYbZNVov9iSxvJU3OYQg78Sfaqz github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.5 h1:rrSex7oHr3/pPLQ0xoWq108XMU8s678FJcQ+aSfOHa4= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= github.com/uudashr/gocognit v1.0.6 h1:2Cgi6MweCsdB6kpcVQp7EW4U23iBFQWfTXiWlyp842Y= github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= @@ -952,7 +803,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -961,16 +811,11 @@ github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.2/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= -gitlab.com/bosi/decorder v0.2.1 h1:ehqZe8hI4w7O4b1vgsDZw1YU1PE7iJXrQWFMsocbQ1w= -gitlab.com/bosi/decorder v0.2.1/go.mod h1:6C/nhLSbF6qZbYD8bRmISBwc6vcWdNsiIBkRvjJFrH0= gitlab.com/bosi/decorder v0.2.2 h1:LRfb3lP6mZWjUzpMOCLTVjcnl/SqZWBWmKNqQvMocQs= gitlab.com/bosi/decorder v0.2.2/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= -go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= -go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -978,8 +823,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1003,7 +846,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1011,8 +853,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1025,8 +865,6 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e h1:qyrTQ++p1afMkO4DPEeLGq/3oTsdlvdH4vqZUBWzUKM= -golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d h1:+W8Qf4iJtMGKkyAygcKohjxTk4JPsL9DpzApJ22m5Ic= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -1055,7 +893,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -1102,22 +939,14 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5 h1:bRb386wvrE+oBNdF1d/Xh9mQrfQ4ecYhW5qJ5GvTGT4= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1127,17 +956,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1149,8 +968,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1172,7 +992,6 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1185,7 +1004,6 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1208,46 +1026,25 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220702020025-31831981b65f h1:xdsejrW/0Wf2diT5CPp3XmKUNbr7Xvw8kYilQ+6qjRY= golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1257,10 +1054,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1286,7 +1083,6 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1319,13 +1115,11 @@ golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1351,33 +1145,22 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a h1:ofrrl6c6NG5/IOSx/R1cyiQxxjqlur0h/TvbUhkH0II= -golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1 h1:NHLFZ56qCjD+0hYY3kE5Wl40Z7q4Gn9Ln/7YU0lsGko= -golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1399,23 +1182,6 @@ google.golang.org/api v0.34.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1451,7 +1217,6 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -1467,42 +1232,7 @@ google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1521,22 +1251,9 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1549,7 +1266,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1564,8 +1280,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1583,7 +1297,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1594,8 +1307,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.3.1 h1:1kJlrWJLkaGXgcaeosRXViwviqjI7nkBvU2+sZW0AYc= -honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= honnef.co/go/tools v0.3.2 h1:ytYb4rOqyp1TSa2EPvNVwtPQJctSELKaMyLfqNP4+34= honnef.co/go/tools v0.3.2/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= mvdan.cc/gofumpt v0.3.1 h1:avhhrOmv0IuvQVK7fvwV91oFSGAk5/6Po8GXTzICeu8= @@ -1604,8 +1315,6 @@ mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wp mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5 h1:Jh3LAeMt1eGpxomyu3jVkmVZWW2MxZ1qIIV2TZ/nRio= -mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 h1:seuXWbRB1qPrS3NQnHmFKLJLtskWyueeIzmLXghMGgk= mvdan.cc/unparam v0.0.0-20220706161116-678bad134442/go.mod h1:F/Cxw/6mVrNKqrR2YjFf5CaW0Bw4RL8RfbEf4GRggJk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From a4a1d47b3e879926ef981b644b7592e54905aa63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:42:33 +0000 Subject: [PATCH 22/44] build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.24.1 to 2.25.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.24.1...v2.25.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 32 +++++++++---------- go.sum | 99 ++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 81 insertions(+), 50 deletions(-) diff --git a/go.mod b/go.mod index ea0739dc7..6f737c72b 100644 --- a/go.mod +++ b/go.mod @@ -4,15 +4,14 @@ require ( github.com/aws/aws-sdk-go v1.42.16 github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 github.com/linode/linodego v1.14.1 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 - golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 + golang.org/x/crypto v0.6.0 ) require ( github.com/agext/levenshtein v1.2.2 // indirect - github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect @@ -25,19 +24,19 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.2.1 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.6 // indirect + github.com/hashicorp/go-plugin v1.4.8 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hc-install v0.4.0 // indirect - github.com/hashicorp/hcl/v2 v2.15.0 // indirect + github.com/hashicorp/hc-install v0.5.0 // indirect + github.com/hashicorp/hcl/v2 v2.16.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.17.3 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.1 // indirect - github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect - github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect + github.com/hashicorp/terraform-json v0.15.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect + github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect + github.com/hashicorp/terraform-registry-address v0.1.0 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/imdario/mergo v0.3.12 // indirect @@ -58,15 +57,16 @@ require ( github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/zclconf/go-cty v1.12.1 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.6.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect - google.golang.org/grpc v1.50.1 // indirect + google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect diff --git a/go.sum b/go.sum index a97539a65..6f86893a9 100644 --- a/go.sum +++ b/go.sum @@ -52,6 +52,9 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= @@ -67,17 +70,16 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= -github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.42.16 h1:jOUmYYpC77NZYQVHTOTFT4lwFBT1u3s8ETKciU4l6gQ= github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -106,6 +108,7 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -195,7 +198,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -239,47 +241,50 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA= -github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= +github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= -github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= -github.com/hashicorp/hcl/v2 v2.15.0 h1:CPDXO6+uORPjKflkWCCwoWc9uRp+zSIPcCQ+BrxV7m8= -github.com/hashicorp/hcl/v2 v2.15.0/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= +github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0= +github.com/hashicorp/hc-install v0.5.0/go.mod h1:JyzMfbzfSBSjoDCRPna1vi/24BEDxFaCPfdHtM5SCdo= +github.com/hashicorp/hcl/v2 v2.16.1 h1:BwuxEMD/tsYgbhIW7UuI3crjovf3MzuFWiVgiv57iHg= +github.com/hashicorp/hcl/v2 v2.16.1/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-go v0.14.1 h1:cwZzPYla82XwAqpLhSzdVsOMU+6H29tczAwrB0z9Zek= -github.com/hashicorp/terraform-plugin-go v0.14.1/go.mod h1:Bc/K6K26BQ2FHqIELPbpKtt2CzzbQou+0UQF3/0NsCQ= -github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= -github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1/go.mod h1:+tNlb0wkfdsDJ7JEiERLz4HzM19HyiuIoGzTsM7rPpw= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c h1:D8aRO6+mTqHfLsK/BC3j5OAoogv1WLRWzY1AaTo3rBg= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= +github.com/hashicorp/terraform-json v0.15.0 h1:/gIyNtR6SFw6h5yzlbDbACyGvIhKtQi8mTsbkNd79lE= +github.com/hashicorp/terraform-json v0.15.0/go.mod h1:+L1RNzjDU5leLFZkHTFTbJXaoqUC6TqXlFgDoOXrtvk= +github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= +github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= +github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= +github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 h1:iNRjaJCatQS1rIbHs/vDvJ0GECsaGgxx780chA2Irpk= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0/go.mod h1:XnVNLIS6bdMJbjSDujhX4Rlk24QpbGKbnrVFM4tZ7OU= +github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= +github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -321,12 +326,16 @@ github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +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 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -338,6 +347,7 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -351,7 +361,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= @@ -372,13 +381,16 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -407,6 +419,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= @@ -427,14 +440,17 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 h1:O8uGbHCqlTp2P6QJSLmCojM4mN6UemYv8K+dCnmHmu0= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -469,6 +485,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -512,8 +531,11 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -538,6 +560,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -594,11 +617,17 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -609,8 +638,9 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -668,6 +698,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -761,8 +792,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 961792e7ded34410d1e1a663ade694a4e74e4ead Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Mar 2023 17:20:03 -0500 Subject: [PATCH 23/44] build(deps): bump golang.org/x/net (#772) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20211209124913-491a49abca63 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6f737c72b..b722e668e 100644 --- a/go.mod +++ b/go.mod @@ -58,7 +58,7 @@ require ( github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/zclconf/go-cty v1.12.1 // indirect golang.org/x/mod v0.7.0 // indirect - golang.org/x/net v0.6.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect diff --git a/go.sum b/go.sum index 6f86893a9..29ee2bf4a 100644 --- a/go.sum +++ b/go.sum @@ -534,8 +534,8 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From f78fc10d687c6c609895dd9379b547d07f9487a7 Mon Sep 17 00:00:00 2001 From: Lena Garber Date: Tue, 7 Mar 2023 13:12:46 -0500 Subject: [PATCH 24/44] Use longer passwords in test templates --- linode/firewall/tmpl/inst.gotf | 2 +- linode/instance/tmpl/templates/disk.gotf | 2 +- linode/instance/tmpl/templates/disk_config.gotf | 2 +- linode/instance/tmpl/templates/disk_config_multiple.gotf | 2 +- linode/instance/tmpl/templates/disk_config_reordered.gotf | 4 ++-- linode/instance/tmpl/templates/disk_config_resized.gotf | 2 +- .../instance/tmpl/templates/disk_config_resized_expanded.gotf | 2 +- linode/instance/tmpl/templates/disk_multiple.gotf | 2 +- linode/instance/tmpl/templates/disk_stackscript.gotf | 2 +- linode/instance/tmpl/templates/volume_config.gotf | 2 +- linode/instancedisk/tmpl/booted_resize.gotf | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/linode/firewall/tmpl/inst.gotf b/linode/firewall/tmpl/inst.gotf index 61c84c748..4517bd818 100644 --- a/linode/firewall/tmpl/inst.gotf +++ b/linode/firewall/tmpl/inst.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "{{.ID}}" { disk { label = "disk" image = "linode/alpine3.15" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk.gotf b/linode/instance/tmpl/templates/disk.gotf index 7fb4cc425..5741829b8 100644 --- a/linode/instance/tmpl/templates/disk.gotf +++ b/linode/instance/tmpl/templates/disk.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config.gotf b/linode/instance/tmpl/templates/disk_config.gotf index b610e2ccd..ac91f7546 100644 --- a/linode/instance/tmpl/templates/disk_config.gotf +++ b/linode/instance/tmpl/templates/disk_config.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_multiple.gotf b/linode/instance/tmpl/templates/disk_config_multiple.gotf index 6b407eae9..716da64aa 100644 --- a/linode/instance/tmpl/templates/disk_config_multiple.gotf +++ b/linode/instance/tmpl/templates/disk_config_multiple.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "diska" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_reordered.gotf b/linode/instance/tmpl/templates/disk_config_reordered.gotf index 856637577..9601808dc 100644 --- a/linode/instance/tmpl/templates/disk_config_reordered.gotf +++ b/linode/instance/tmpl/templates/disk_config_reordered.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } @@ -17,7 +17,7 @@ resource "linode_instance" "foobar" { disk { label = "diskb" image = "linode/ubuntu18.04" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_resized.gotf b/linode/instance/tmpl/templates/disk_config_resized.gotf index d4e9c190f..f32478421 100644 --- a/linode/instance/tmpl/templates/disk_config_resized.gotf +++ b/linode/instance/tmpl/templates/disk_config_resized.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 6000 } diff --git a/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf b/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf index d11ff08e0..ec0ac75da 100644 --- a/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf +++ b/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 6000 } diff --git a/linode/instance/tmpl/templates/disk_multiple.gotf b/linode/instance/tmpl/templates/disk_multiple.gotf index 8a51f955b..c001b696a 100644 --- a/linode/instance/tmpl/templates/disk_multiple.gotf +++ b/linode/instance/tmpl/templates/disk_multiple.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { disk { label = "diska" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_stackscript.gotf b/linode/instance/tmpl/templates/disk_stackscript.gotf index a757534f7..bf3f63677 100644 --- a/linode/instance/tmpl/templates/disk_stackscript.gotf +++ b/linode/instance/tmpl/templates/disk_stackscript.gotf @@ -22,7 +22,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 stackscript_id = "${linode_stackscript.foo-script.id}" diff --git a/linode/instance/tmpl/templates/volume_config.gotf b/linode/instance/tmpl/templates/volume_config.gotf index 7f2f4a0d2..5f499560e 100644 --- a/linode/instance/tmpl/templates/volume_config.gotf +++ b/linode/instance/tmpl/templates/volume_config.gotf @@ -15,7 +15,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5" + root_pass = "b4d_p4s5w0rd!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instancedisk/tmpl/booted_resize.gotf b/linode/instancedisk/tmpl/booted_resize.gotf index b386b6351..6db6f55b6 100644 --- a/linode/instancedisk/tmpl/booted_resize.gotf +++ b/linode/instancedisk/tmpl/booted_resize.gotf @@ -12,7 +12,7 @@ resource "linode_instance_disk" "foobar" { size = {{ .Size }} image = "linode/alpine3.15" - root_pass = "r00tp@ss!" + root_pass = "r00tp@ssw0rd!!" } resource "linode_instance_config" "cfg" { From 1034edb7a2cc71092532f30137e2ff1713ebbf99 Mon Sep 17 00:00:00 2001 From: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Date: Tue, 14 Mar 2023 14:27:04 -0400 Subject: [PATCH 25/44] fix: Make login-related tests opt-in (#775) * Add error handling for ListLogins() * Make login-related tests opt-in --- linode/accountlogin/datasource_test.go | 5 +++++ linode/accountlogins/datasource_test.go | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/linode/accountlogin/datasource_test.go b/linode/accountlogin/datasource_test.go index c1e1ec05b..fc9e9f619 100644 --- a/linode/accountlogin/datasource_test.go +++ b/linode/accountlogin/datasource_test.go @@ -12,6 +12,7 @@ import ( ) func TestAccDataSourceLinodeAccountLogin_basic(t *testing.T) { + acceptance.OptInTest(t) t.Parallel() resourceName := "data.linode_account_login.foobar" @@ -23,6 +24,10 @@ func TestAccDataSourceLinodeAccountLogin_basic(t *testing.T) { } logins, err := client.ListLogins(context.TODO(), nil) + if err != nil { + t.Fatalf("Failed to list logins: %s", err) + } + login := logins[0] accountID := login.ID diff --git a/linode/accountlogins/datasource_test.go b/linode/accountlogins/datasource_test.go index edbf261e9..392eb1284 100644 --- a/linode/accountlogins/datasource_test.go +++ b/linode/accountlogins/datasource_test.go @@ -12,6 +12,7 @@ import ( ) func TestAccDataSourceAccountLogins_basic(t *testing.T) { + acceptance.OptInTest(t) t.Parallel() resourceName := "data.linode_account_logins.foobar" @@ -36,6 +37,7 @@ func TestAccDataSourceAccountLogins_basic(t *testing.T) { } func TestAccDataSourceAccountLogins_filterByRestricted(t *testing.T) { + acceptance.OptInTest(t) t.Parallel() resourceName := "data.linode_account_logins.foobar" @@ -47,6 +49,10 @@ func TestAccDataSourceAccountLogins_filterByRestricted(t *testing.T) { } logins, err := client.ListLogins(context.TODO(), nil) + if err != nil { + t.Fatalf("Failed to list logins: %s", err) + } + randIndex := rand.Intn(len(logins)) login := logins[randIndex] @@ -79,6 +85,7 @@ func TestAccDataSourceAccountLogins_filterByRestricted(t *testing.T) { } func TestAccDataSourceAccountLogins_filterByUsername(t *testing.T) { + acceptance.OptInTest(t) t.Parallel() resourceName := "data.linode_account_logins.foobar" @@ -90,6 +97,10 @@ func TestAccDataSourceAccountLogins_filterByUsername(t *testing.T) { } logins, err := client.ListLogins(context.TODO(), nil) + if err != nil { + t.Fatalf("Failed to list logins: %s", err) + } + randIndex := rand.Intn(len(logins)) login := logins[randIndex] @@ -122,6 +133,7 @@ func TestAccDataSourceAccountLogins_filterByUsername(t *testing.T) { } func TestAccDataSourceAccountLogins_filterByIP(t *testing.T) { + acceptance.OptInTest(t) t.Parallel() resourceName := "data.linode_account_logins.foobar" @@ -133,6 +145,10 @@ func TestAccDataSourceAccountLogins_filterByIP(t *testing.T) { } logins, err := client.ListLogins(context.TODO(), nil) + if err != nil { + t.Fatalf("Failed to list logins: %s", err) + } + randIndex := rand.Intn(len(logins)) login := logins[randIndex] From 3dbd84fb7634a77dc574a09b7cea8f1405dbd47d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Mar 2023 12:24:22 -0400 Subject: [PATCH 26/44] build(deps): bump golang.org/x/crypto from 0.6.0 to 0.7.0 (#773) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/crypto/releases) - [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 23 ++++++++++++----------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index b722e668e..072b66d70 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 github.com/linode/linodego v1.14.1 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 - golang.org/x/crypto v0.6.0 + golang.org/x/crypto v0.7.0 ) require ( @@ -57,12 +57,12 @@ require ( github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/zclconf/go-cty v1.12.1 // indirect - golang.org/x/mod v0.7.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/mod v0.8.0 // indirect + golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect diff --git a/go.sum b/go.sum index 29ee2bf4a..941536457 100644 --- a/go.sum +++ b/go.sum @@ -449,8 +449,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -486,8 +486,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -534,8 +535,8 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -620,14 +621,14 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -639,8 +640,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 4afd911156b3c98069aa84ccb499a5af83f121b6 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Tue, 21 Mar 2023 10:02:28 -0400 Subject: [PATCH 27/44] Added support for status field in login-related resources --- go.mod | 4 +- go.sum | 8 ++- linode/accountlogin/datasource.go | 1 + linode/accountlogin/datasource_test.go | 1 + linode/accountlogin/schema_datasource.go | 5 ++ linode/accountlogins/datasource.go | 1 + linode/accountlogins/datasource_test.go | 63 ++++++++++++++++++- linode/accountlogins/schema_datasource.go | 1 + .../tmpl/data_filter_by_status.gotf | 10 +++ linode/accountlogins/tmpl/template.go | 20 +++++- 10 files changed, 103 insertions(+), 11 deletions(-) create mode 100644 linode/accountlogins/tmpl/data_filter_by_status.gotf diff --git a/go.mod b/go.mod index 072b66d70..52e2d71d6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 - github.com/linode/linodego v1.14.1 + github.com/linode/linodego v1.15.0 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.7.0 ) @@ -16,7 +16,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/go-logr/logr v1.2.0 // indirect - github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gofuzz v1.1.0 // indirect diff --git a/go.sum b/go.sum index 941536457..0a0770546 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,9 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= +github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -318,8 +319,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= -github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= +github.com/linode/linodego v1.15.0 h1:7LaXTp/QfH6HRi63YUisVctCqHpgqttwy65cCIbbC9c= +github.com/linode/linodego v1.15.0/go.mod h1:f7lh/go9m8slMQ3a8B0dj5pVrZbpBFzwrRRhoX+YiV4= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -532,6 +533,7 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= diff --git a/linode/accountlogin/datasource.go b/linode/accountlogin/datasource.go index 1db62ec5f..8776d8a93 100644 --- a/linode/accountlogin/datasource.go +++ b/linode/accountlogin/datasource.go @@ -32,6 +32,7 @@ func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{ d.Set("ip", loginInfo.IP) d.Set("restricted", loginInfo.Restricted) d.Set("username", loginInfo.Username) + d.Set("status", loginInfo.Status) d.SetId(strconv.Itoa(loginInfo.ID)) return nil diff --git a/linode/accountlogin/datasource_test.go b/linode/accountlogin/datasource_test.go index fc9e9f619..fc5a1d98d 100644 --- a/linode/accountlogin/datasource_test.go +++ b/linode/accountlogin/datasource_test.go @@ -48,6 +48,7 @@ func TestAccDataSourceLinodeAccountLogin_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "username", login.Username), resource.TestCheckResourceAttr(resourceName, "datetime", login.Datetime.Format(time.RFC3339)), resource.TestCheckResourceAttr(resourceName, "restricted", strconv.FormatBool(login.Restricted)), + resource.TestCheckResourceAttr(resourceName, "status", login.Status), ), }, }, diff --git a/linode/accountlogin/schema_datasource.go b/linode/accountlogin/schema_datasource.go index 024735950..3711ac0f6 100644 --- a/linode/accountlogin/schema_datasource.go +++ b/linode/accountlogin/schema_datasource.go @@ -28,4 +28,9 @@ var dataSourceSchema = map[string]*schema.Schema{ Description: "The username of the User that was logged into.", Computed: true, }, + "status": { + Type: schema.TypeString, + Description: "Whether the login attempt succeeded or failed.", + Computed: true, + }, } diff --git a/linode/accountlogins/datasource.go b/linode/accountlogins/datasource.go index 7dd31e7b0..2f1ead8eb 100644 --- a/linode/accountlogins/datasource.go +++ b/linode/accountlogins/datasource.go @@ -55,6 +55,7 @@ func flattenLogins(data interface{}) map[string]interface{} { result["ip"] = t.IP result["restricted"] = t.Restricted result["username"] = t.Username + result["status"] = t.Status return result } diff --git a/linode/accountlogins/datasource_test.go b/linode/accountlogins/datasource_test.go index 392eb1284..9ff075dab 100644 --- a/linode/accountlogins/datasource_test.go +++ b/linode/accountlogins/datasource_test.go @@ -29,6 +29,7 @@ func TestAccDataSourceAccountLogins_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "logins.0.username"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.restricted"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.datetime"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.status"), acceptance.CheckResourceAttrGreaterThan(resourceName, "logins.#", 0), ), }, @@ -59,6 +60,7 @@ func TestAccDataSourceAccountLogins_filterByRestricted(t *testing.T) { username := login.Username ip := login.IP restricted := login.Restricted + status := login.Status if err != nil { t.Fail() @@ -70,13 +72,14 @@ func TestAccDataSourceAccountLogins_filterByRestricted(t *testing.T) { Providers: acceptance.TestAccProviders, Steps: []resource.TestStep{ { - Config: tmpl.DataFilterRestricted(t, username, ip, restricted), + Config: tmpl.DataFilterRestricted(t, username, ip, status, restricted), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "logins.0.id"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.ip"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.username"), resource.TestCheckResourceAttr(resourceName, "logins.0.restricted", strconv.FormatBool(restricted)), resource.TestCheckResourceAttrSet(resourceName, "logins.0.datetime"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.status"), acceptance.CheckResourceAttrGreaterThan(resourceName, "logins.#", 0), ), }, @@ -107,6 +110,7 @@ func TestAccDataSourceAccountLogins_filterByUsername(t *testing.T) { username := login.Username ip := login.IP restricted := login.Restricted + status := login.Status if err != nil { t.Fail() @@ -118,13 +122,14 @@ func TestAccDataSourceAccountLogins_filterByUsername(t *testing.T) { Providers: acceptance.TestAccProviders, Steps: []resource.TestStep{ { - Config: tmpl.DataFilterUsername(t, username, ip, restricted), + Config: tmpl.DataFilterUsername(t, username, ip, status, restricted), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "logins.0.id"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.ip"), resource.TestCheckResourceAttr(resourceName, "logins.0.username", username), resource.TestCheckResourceAttrSet(resourceName, "logins.0.restricted"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.datetime"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.status"), acceptance.CheckResourceAttrGreaterThan(resourceName, "logins.#", 0), ), }, @@ -155,6 +160,7 @@ func TestAccDataSourceAccountLogins_filterByIP(t *testing.T) { username := login.Username ip := login.IP restricted := login.Restricted + status := login.Status if err != nil { t.Fail() @@ -166,13 +172,64 @@ func TestAccDataSourceAccountLogins_filterByIP(t *testing.T) { Providers: acceptance.TestAccProviders, Steps: []resource.TestStep{ { - Config: tmpl.DataFilterIP(t, username, ip, restricted), + Config: tmpl.DataFilterIP(t, username, ip, status, restricted), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttrSet(resourceName, "logins.0.id"), resource.TestCheckResourceAttr(resourceName, "logins.0.ip", ip), resource.TestCheckResourceAttrSet(resourceName, "logins.0.username"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.restricted"), resource.TestCheckResourceAttrSet(resourceName, "logins.0.datetime"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.status"), + acceptance.CheckResourceAttrGreaterThan(resourceName, "logins.#", 0), + ), + }, + }, + }) +} + +func TestAccDataSourceAccountLogins_filterByStatus(t *testing.T) { + acceptance.OptInTest(t) + t.Parallel() + + resourceName := "data.linode_account_logins.foobar" + + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fail() + t.Log("Failed to get testing client.") + } + + logins, err := client.ListLogins(context.TODO(), nil) + if err != nil { + t.Fatalf("Failed to list logins: %s", err) + } + + randIndex := rand.Intn(len(logins)) + login := logins[randIndex] + + username := login.Username + ip := login.IP + restricted := login.Restricted + status := login.Status + + if err != nil { + t.Fail() + t.Log("Failed to get testing login.") + } + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: tmpl.DataFilterStatus(t, username, ip, status, restricted), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resourceName, "logins.0.id"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.ip"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.username"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.restricted"), + resource.TestCheckResourceAttrSet(resourceName, "logins.0.datetime"), + resource.TestCheckResourceAttr(resourceName, "logins.0.status", status), acceptance.CheckResourceAttrGreaterThan(resourceName, "logins.#", 0), ), }, diff --git a/linode/accountlogins/schema_datasource.go b/linode/accountlogins/schema_datasource.go index 759b473e7..de305644c 100644 --- a/linode/accountlogins/schema_datasource.go +++ b/linode/accountlogins/schema_datasource.go @@ -10,6 +10,7 @@ var filterConfig = helper.FilterConfig{ "ip": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, "restricted": {APIFilterable: false, TypeFunc: helper.FilterTypeBool}, "username": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, + "status": {APIFilterable: false, TypeFunc: helper.FilterTypeString}, } var dataSourceSchema = map[string]*schema.Schema{ diff --git a/linode/accountlogins/tmpl/data_filter_by_status.gotf b/linode/accountlogins/tmpl/data_filter_by_status.gotf new file mode 100644 index 000000000..bfd5e32f8 --- /dev/null +++ b/linode/accountlogins/tmpl/data_filter_by_status.gotf @@ -0,0 +1,10 @@ +{{ define "account_logins_data_filter_by_status" }} + +data "linode_account_logins" "foobar" { + filter { + name = "status" + values = ["{{ .Status }}"] + } +} + +{{ end }} \ No newline at end of file diff --git a/linode/accountlogins/tmpl/template.go b/linode/accountlogins/tmpl/template.go index 380400d16..37ad2c36e 100644 --- a/linode/accountlogins/tmpl/template.go +++ b/linode/accountlogins/tmpl/template.go @@ -10,6 +10,7 @@ type TemplateData struct { Username string IP string Restricted bool + Status string } func DataBasic(t *testing.T) string { @@ -17,29 +18,42 @@ func DataBasic(t *testing.T) string { "account_logins_data_basic", nil) } -func DataFilterRestricted(t *testing.T, username, ip string, restricted bool) string { +func DataFilterRestricted(t *testing.T, username, ip, status string, restricted bool) string { return acceptance.ExecuteTemplate(t, "account_logins_data_filter_by_restricted", TemplateData{ Username: username, IP: ip, Restricted: restricted, + Status: status, }) } -func DataFilterUsername(t *testing.T, username, ip string, restricted bool) string { +func DataFilterUsername(t *testing.T, username, ip, status string, restricted bool) string { return acceptance.ExecuteTemplate(t, "account_logins_data_filter_by_username", TemplateData{ Username: username, IP: ip, Restricted: restricted, + Status: status, }) } -func DataFilterIP(t *testing.T, username, ip string, restricted bool) string { +func DataFilterIP(t *testing.T, username, ip, status string, restricted bool) string { return acceptance.ExecuteTemplate(t, "account_logins_data_filter_by_ip", TemplateData{ Username: username, IP: ip, Restricted: restricted, + Status: status, + }) +} + +func DataFilterStatus(t *testing.T, username, ip, status string, restricted bool) string { + return acceptance.ExecuteTemplate(t, + "account_logins_data_filter_by_status", TemplateData{ + Username: username, + IP: ip, + Restricted: restricted, + Status: status, }) } From a28dae5d149cb4899d5cb4a2455c3f0a2eeadc74 Mon Sep 17 00:00:00 2001 From: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:28:54 -0400 Subject: [PATCH 28/44] fix: Increase complexity for root passwords used in tests (again) (#776) * Raise root password requirements * Repair test passwords * Switch more passwords --- linode/backup/datasource_test.go | 2 +- linode/firewall/tmpl/inst.gotf | 2 +- linode/instance/tmpl/templates/authorized_users.gotf | 2 +- linode/instance/tmpl/templates/basic.gotf | 2 +- linode/instance/tmpl/templates/config_interfaces.gotf | 2 +- .../instance/tmpl/templates/config_interfaces_multiple.gotf | 2 +- linode/instance/tmpl/templates/config_interfaces_update.gotf | 2 +- .../tmpl/templates/config_interfaces_update_empty.gotf | 2 +- linode/instance/tmpl/templates/data_basic.gotf | 2 +- linode/instance/tmpl/templates/data_clientfilter.gotf | 2 +- linode/instance/tmpl/templates/data_multiple_base.gotf | 2 +- linode/instance/tmpl/templates/disk.gotf | 2 +- .../instance/tmpl/templates/disk_authorized_keys_empty.gotf | 2 +- linode/instance/tmpl/templates/disk_config.gotf | 2 +- linode/instance/tmpl/templates/disk_config_expanded.gotf | 2 +- linode/instance/tmpl/templates/disk_config_multiple.gotf | 2 +- linode/instance/tmpl/templates/disk_config_reordered.gotf | 4 ++-- linode/instance/tmpl/templates/disk_config_resized.gotf | 2 +- .../instance/tmpl/templates/disk_config_resized_expanded.gotf | 2 +- linode/instance/tmpl/templates/disk_multiple.gotf | 2 +- linode/instance/tmpl/templates/disk_stackscript.gotf | 2 +- linode/instance/tmpl/templates/full_disk.gotf | 2 +- linode/instance/tmpl/templates/many_linodes.gotf | 2 +- linode/instance/tmpl/templates/power_state_config.gotf | 2 +- linode/instance/tmpl/templates/private_networking.gotf | 2 +- linode/instance/tmpl/templates/volume_config.gotf | 2 +- linode/instance/tmpl/templates/watchdog_disabled.gotf | 2 +- linode/instance/tmpl/templates/with_swapsize.gotf | 2 +- linode/instance/tmpl/templates/with_type.gotf | 2 +- linode/instanceconfig/tmpl/instance_disk.gotf | 2 +- linode/instanceconfig/tmpl/provisioner.gotf | 2 +- linode/instancedisk/tmpl/booted_resize.gotf | 2 +- linode/instancedisk/tmpl/complex.gotf | 2 +- linode/nbnode/tmpl/networking.gotf | 2 +- 34 files changed, 35 insertions(+), 35 deletions(-) diff --git a/linode/backup/datasource_test.go b/linode/backup/datasource_test.go index 121c5b002..810472c8a 100644 --- a/linode/backup/datasource_test.go +++ b/linode/backup/datasource_test.go @@ -96,7 +96,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "linode/alpine3.15" region = "%s" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 backups_enabled = true }`, label, region) diff --git a/linode/firewall/tmpl/inst.gotf b/linode/firewall/tmpl/inst.gotf index 4517bd818..c7bb22e88 100644 --- a/linode/firewall/tmpl/inst.gotf +++ b/linode/firewall/tmpl/inst.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "{{.ID}}" { disk { label = "disk" image = "linode/alpine3.15" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/authorized_users.gotf b/linode/instance/tmpl/templates/authorized_users.gotf index 3d6009d10..f6c279c61 100644 --- a/linode/instance/tmpl/templates/authorized_users.gotf +++ b/linode/instance/tmpl/templates/authorized_users.gotf @@ -13,7 +13,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 authorized_users = [ "${data.linode_profile.profile.username}" ] } diff --git a/linode/instance/tmpl/templates/basic.gotf b/linode/instance/tmpl/templates/basic.gotf index f7625d867..0b1cf9c6d 100644 --- a/linode/instance/tmpl/templates/basic.gotf +++ b/linode/instance/tmpl/templates/basic.gotf @@ -6,7 +6,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 authorized_keys = ["{{.PubKey}}"] } diff --git a/linode/instance/tmpl/templates/config_interfaces.gotf b/linode/instance/tmpl/templates/config_interfaces.gotf index ea804f437..9e4db05f1 100644 --- a/linode/instance/tmpl/templates/config_interfaces.gotf +++ b/linode/instance/tmpl/templates/config_interfaces.gotf @@ -33,7 +33,7 @@ resource "linode_instance" "foobar" { label = "boot" size = 3000 image = "{{.Image}}" - root_pass = "terr4form-test" + root_pass = "myr00tp@ssw0rd!!!" } boot_config_label = "config" diff --git a/linode/instance/tmpl/templates/config_interfaces_multiple.gotf b/linode/instance/tmpl/templates/config_interfaces_multiple.gotf index 101f18453..7c11edf8e 100644 --- a/linode/instance/tmpl/templates/config_interfaces_multiple.gotf +++ b/linode/instance/tmpl/templates/config_interfaces_multiple.gotf @@ -55,7 +55,7 @@ resource "linode_instance" "foobar" { label = "boot" size = 3000 image = "{{.Image}}" - root_pass = "terr4form-test" + root_pass = "myr00tp@ssw0rd!!!" } boot_config_label = "config" diff --git a/linode/instance/tmpl/templates/config_interfaces_update.gotf b/linode/instance/tmpl/templates/config_interfaces_update.gotf index dd277fde5..830d0c972 100644 --- a/linode/instance/tmpl/templates/config_interfaces_update.gotf +++ b/linode/instance/tmpl/templates/config_interfaces_update.gotf @@ -58,7 +58,7 @@ resource "linode_instance" "foobar" { label = "boot" size = 3000 image = "{{.Image}}" - root_pass = "terr4form-test" + root_pass = "myr00tp@ssw0rd!!!" } boot_config_label = "config" diff --git a/linode/instance/tmpl/templates/config_interfaces_update_empty.gotf b/linode/instance/tmpl/templates/config_interfaces_update_empty.gotf index a44a83c4c..2220391e2 100644 --- a/linode/instance/tmpl/templates/config_interfaces_update_empty.gotf +++ b/linode/instance/tmpl/templates/config_interfaces_update_empty.gotf @@ -26,7 +26,7 @@ resource "linode_instance" "foobar" { label = "boot" size = 3000 image = "{{.Image}}" - root_pass = "terr4form-test" + root_pass = "myr00tp@ssw0rd!!!" } boot_config_label = "config" diff --git a/linode/instance/tmpl/templates/data_basic.gotf b/linode/instance/tmpl/templates/data_basic.gotf index 51fa1136b..dfd9e0e7e 100644 --- a/linode/instance/tmpl/templates/data_basic.gotf +++ b/linode/instance/tmpl/templates/data_basic.gotf @@ -7,7 +7,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 private_ip = true diff --git a/linode/instance/tmpl/templates/data_clientfilter.gotf b/linode/instance/tmpl/templates/data_clientfilter.gotf index b240c0f5c..053300c26 100644 --- a/linode/instance/tmpl/templates/data_clientfilter.gotf +++ b/linode/instance/tmpl/templates/data_clientfilter.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" } data "linode_instances" "foobar" { diff --git a/linode/instance/tmpl/templates/data_multiple_base.gotf b/linode/instance/tmpl/templates/data_multiple_base.gotf index 58bdfd570..8cffc2daa 100644 --- a/linode/instance/tmpl/templates/data_multiple_base.gotf +++ b/linode/instance/tmpl/templates/data_multiple_base.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" } {{ end }} \ No newline at end of file diff --git a/linode/instance/tmpl/templates/disk.gotf b/linode/instance/tmpl/templates/disk.gotf index 5741829b8..8a7b50c5c 100644 --- a/linode/instance/tmpl/templates/disk.gotf +++ b/linode/instance/tmpl/templates/disk.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_authorized_keys_empty.gotf b/linode/instance/tmpl/templates/disk_authorized_keys_empty.gotf index 09030b9d9..47a8d05d5 100644 --- a/linode/instance/tmpl/templates/disk_authorized_keys_empty.gotf +++ b/linode/instance/tmpl/templates/disk_authorized_keys_empty.gotf @@ -10,7 +10,7 @@ resource "linode_instance" "foobar" { size = 4096 image = "{{.Image}}" authorized_keys = [""] - root_pass = "myc00lp@ss!" + root_pass = "myr00tp@ssw0rd!!!" } } diff --git a/linode/instance/tmpl/templates/disk_config.gotf b/linode/instance/tmpl/templates/disk_config.gotf index ac91f7546..0def0ea9f 100644 --- a/linode/instance/tmpl/templates/disk_config.gotf +++ b/linode/instance/tmpl/templates/disk_config.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_expanded.gotf b/linode/instance/tmpl/templates/disk_config_expanded.gotf index e10968b88..0eb5b42e2 100644 --- a/linode/instance/tmpl/templates/disk_config_expanded.gotf +++ b/linode/instance/tmpl/templates/disk_config_expanded.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 51200 } diff --git a/linode/instance/tmpl/templates/disk_config_multiple.gotf b/linode/instance/tmpl/templates/disk_config_multiple.gotf index 716da64aa..f972397fc 100644 --- a/linode/instance/tmpl/templates/disk_config_multiple.gotf +++ b/linode/instance/tmpl/templates/disk_config_multiple.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "diska" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_reordered.gotf b/linode/instance/tmpl/templates/disk_config_reordered.gotf index 9601808dc..b3a702ca2 100644 --- a/linode/instance/tmpl/templates/disk_config_reordered.gotf +++ b/linode/instance/tmpl/templates/disk_config_reordered.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } @@ -17,7 +17,7 @@ resource "linode_instance" "foobar" { disk { label = "diskb" image = "linode/ubuntu18.04" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_config_resized.gotf b/linode/instance/tmpl/templates/disk_config_resized.gotf index f32478421..f27db2883 100644 --- a/linode/instance/tmpl/templates/disk_config_resized.gotf +++ b/linode/instance/tmpl/templates/disk_config_resized.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 6000 } diff --git a/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf b/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf index ec0ac75da..fe89f7717 100644 --- a/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf +++ b/linode/instance/tmpl/templates/disk_config_resized_expanded.gotf @@ -9,7 +9,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 6000 } diff --git a/linode/instance/tmpl/templates/disk_multiple.gotf b/linode/instance/tmpl/templates/disk_multiple.gotf index c001b696a..48f0a3e22 100644 --- a/linode/instance/tmpl/templates/disk_multiple.gotf +++ b/linode/instance/tmpl/templates/disk_multiple.gotf @@ -8,7 +8,7 @@ resource "linode_instance" "foobar" { disk { label = "diska" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/disk_stackscript.gotf b/linode/instance/tmpl/templates/disk_stackscript.gotf index bf3f63677..5a8da32e4 100644 --- a/linode/instance/tmpl/templates/disk_stackscript.gotf +++ b/linode/instance/tmpl/templates/disk_stackscript.gotf @@ -22,7 +22,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 stackscript_id = "${linode_stackscript.foo-script.id}" diff --git a/linode/instance/tmpl/templates/full_disk.gotf b/linode/instance/tmpl/templates/full_disk.gotf index b8854686c..adbce61ca 100644 --- a/linode/instance/tmpl/templates/full_disk.gotf +++ b/linode/instance/tmpl/templates/full_disk.gotf @@ -7,7 +7,7 @@ resource "linode_instance" "foobar" { # This needs to be hardcoded to support the StackScript image = "linode/ubuntu18.04" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = {{.SwapSize}} authorized_keys = ["{{.PubKey}}"] stackscript_id = linode_stackscript.flooddisk.id diff --git a/linode/instance/tmpl/templates/many_linodes.gotf b/linode/instance/tmpl/templates/many_linodes.gotf index eee90b779..7dad91e3e 100644 --- a/linode/instance/tmpl/templates/many_linodes.gotf +++ b/linode/instance/tmpl/templates/many_linodes.gotf @@ -6,7 +6,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 authorized_keys = ["{{.PubKey}}"] } diff --git a/linode/instance/tmpl/templates/power_state_config.gotf b/linode/instance/tmpl/templates/power_state_config.gotf index e9d91bc0d..3ffd85666 100644 --- a/linode/instance/tmpl/templates/power_state_config.gotf +++ b/linode/instance/tmpl/templates/power_state_config.gotf @@ -10,7 +10,7 @@ resource "linode_instance" "foobar" { label = "boot" size = 3000 image = "{{.Image}}" - root_pass = "terr4form-test" + root_pass = "myr00tp@ssw0rd!!!" } config { diff --git a/linode/instance/tmpl/templates/private_networking.gotf b/linode/instance/tmpl/templates/private_networking.gotf index be8416341..2ff936813 100644 --- a/linode/instance/tmpl/templates/private_networking.gotf +++ b/linode/instance/tmpl/templates/private_networking.gotf @@ -5,7 +5,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 private_ip = true authorized_keys = ["{{.PubKey}}"] diff --git a/linode/instance/tmpl/templates/volume_config.gotf b/linode/instance/tmpl/templates/volume_config.gotf index 5f499560e..166a43f53 100644 --- a/linode/instance/tmpl/templates/volume_config.gotf +++ b/linode/instance/tmpl/templates/volume_config.gotf @@ -15,7 +15,7 @@ resource "linode_instance" "foobar" { disk { label = "disk" image = "{{.Image}}" - root_pass = "b4d_p4s5w0rd!!" + root_pass = "myr00tp@ssw0rd!!!" authorized_keys = ["{{.PubKey}}"] size = 3000 } diff --git a/linode/instance/tmpl/templates/watchdog_disabled.gotf b/linode/instance/tmpl/templates/watchdog_disabled.gotf index 9794e9179..346f80d7f 100644 --- a/linode/instance/tmpl/templates/watchdog_disabled.gotf +++ b/linode/instance/tmpl/templates/watchdog_disabled.gotf @@ -5,7 +5,7 @@ resource "linode_instance" "foobar" { region = "{{ .Region }}" image = "{{.Image}}" type = "g6-nanode-1" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" watchdog_enabled = false } diff --git a/linode/instance/tmpl/templates/with_swapsize.gotf b/linode/instance/tmpl/templates/with_swapsize.gotf index f68b6606f..07cfbd101 100644 --- a/linode/instance/tmpl/templates/with_swapsize.gotf +++ b/linode/instance/tmpl/templates/with_swapsize.gotf @@ -6,7 +6,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = {{.SwapSize}} authorized_keys = ["{{.PubKey}}"] } diff --git a/linode/instance/tmpl/templates/with_type.gotf b/linode/instance/tmpl/templates/with_type.gotf index d23c2d984..55f92cddf 100644 --- a/linode/instance/tmpl/templates/with_type.gotf +++ b/linode/instance/tmpl/templates/with_type.gotf @@ -6,7 +6,7 @@ resource "linode_instance" "foobar" { type = "{{.Type}}" image = "{{.Image}}" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 authorized_keys = ["{{.PubKey}}"] } diff --git a/linode/instanceconfig/tmpl/instance_disk.gotf b/linode/instanceconfig/tmpl/instance_disk.gotf index 166c6a483..86a0c30f4 100644 --- a/linode/instanceconfig/tmpl/instance_disk.gotf +++ b/linode/instanceconfig/tmpl/instance_disk.gotf @@ -6,7 +6,7 @@ resource "linode_instance_disk" "foobar" { size = linode_instance.foobar.specs.0.disk image = "linode/alpine3.15" - root_pass = "myc00lpass!" + root_pass = "myr00tp@ssw0rd!!!" } {{ end }} \ No newline at end of file diff --git a/linode/instanceconfig/tmpl/provisioner.gotf b/linode/instanceconfig/tmpl/provisioner.gotf index 6210a521c..9c472ad34 100644 --- a/linode/instanceconfig/tmpl/provisioner.gotf +++ b/linode/instanceconfig/tmpl/provisioner.gotf @@ -19,7 +19,7 @@ resource "linode_instance_config" "foobar" { connection { host = linode_instance.foobar.ip_address user = "root" - password = "myc00lpass!" + password = "myr00tp@ssw0rd!!!" } provisioner "remote-exec" { diff --git a/linode/instancedisk/tmpl/booted_resize.gotf b/linode/instancedisk/tmpl/booted_resize.gotf index 6db6f55b6..f1d8ff7fd 100644 --- a/linode/instancedisk/tmpl/booted_resize.gotf +++ b/linode/instancedisk/tmpl/booted_resize.gotf @@ -12,7 +12,7 @@ resource "linode_instance_disk" "foobar" { size = {{ .Size }} image = "linode/alpine3.15" - root_pass = "r00tp@ssw0rd!!" + root_pass = "myr00tp@ssw0rd!!!" } resource "linode_instance_config" "cfg" { diff --git a/linode/instancedisk/tmpl/complex.gotf b/linode/instancedisk/tmpl/complex.gotf index 4aa47a21f..844ea02d9 100644 --- a/linode/instancedisk/tmpl/complex.gotf +++ b/linode/instancedisk/tmpl/complex.gotf @@ -27,7 +27,7 @@ resource "linode_instance_disk" "foobar" { ] filesystem = "ext4" image = "linode/alpine3.15" - root_pass = "c00lp@ss!" + root_pass = "myr00tp@ssw0rd!!!" stackscript_id = linode_stackscript.foo.id stackscript_data = { diff --git a/linode/nbnode/tmpl/networking.gotf b/linode/nbnode/tmpl/networking.gotf index d0402863e..c83622a02 100644 --- a/linode/nbnode/tmpl/networking.gotf +++ b/linode/nbnode/tmpl/networking.gotf @@ -5,7 +5,7 @@ resource "linode_instance" "foobar" { type = "g6-nanode-1" image = "linode/ubuntu18.04" region = "{{ .Region }}" - root_pass = "terraform-test" + root_pass = "myr00tp@ssw0rd!!!" swap_size = 256 private_ip = true authorized_keys = ["{{.PubKey}}"] From dccdea0947f09863d6a0a4dc94630eec2ef0ef85 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Tue, 21 Mar 2023 14:23:05 -0400 Subject: [PATCH 29/44] init --- linode/objbucket/resource_test.go | 2 +- linode/objbucket/tmpl/data_basic.gotf | 11 +++++++---- linode/objbucket/tmpl/template.go | 8 ++++++++ linode/provider.go | 1 + 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/linode/objbucket/resource_test.go b/linode/objbucket/resource_test.go index 86632634e..7579443cf 100644 --- a/linode/objbucket/resource_test.go +++ b/linode/objbucket/resource_test.go @@ -400,7 +400,7 @@ func TestAccResourceBucket_dataSource(t *testing.T) { CheckDestroy: checkBucketDestroy, Steps: []resource.TestStep{ { - Config: tmpl.DataBasic(t, objectStorageBucketName, testCluster), + Config: tmpl.ClusterDataBasic(t, objectStorageBucketName, testCluster), Check: resource.ComposeTestCheckFunc( checkBucketExists, resource.TestCheckResourceAttr(resName, "label", objectStorageBucketName), diff --git a/linode/objbucket/tmpl/data_basic.gotf b/linode/objbucket/tmpl/data_basic.gotf index 94f399777..456ef462d 100644 --- a/linode/objbucket/tmpl/data_basic.gotf +++ b/linode/objbucket/tmpl/data_basic.gotf @@ -1,11 +1,14 @@ {{ define "object_bucket_data_basic" }} -data "linode_object_storage_cluster" "baz" { - id = "{{ .Cluster }}" -} +{{ template "object_key_basic" .Key }} resource "linode_object_storage_bucket" "foobar" { - cluster = data.linode_object_storage_cluster.baz.id + cluster = "{{ .Cluster }}" + label = "{{.Label}}" +} + +data "linode_object_storage_bucket" "foobar" { + cluster = "{{ .Cluster }}" label = "{{.Label}}" } diff --git a/linode/objbucket/tmpl/template.go b/linode/objbucket/tmpl/template.go index dade82763..54a775adc 100644 --- a/linode/objbucket/tmpl/template.go +++ b/linode/objbucket/tmpl/template.go @@ -87,6 +87,14 @@ func LifeCycleUpdates(t *testing.T, label, cluster, keyName string) string { }) } +func ClusterDataBasic(t *testing.T, label, cluster string) string { + return acceptance.ExecuteTemplate(t, + "object_bucket_cluster_data_basic", TemplateData{ + Label: label, + Cluster: cluster, + }) +} + func DataBasic(t *testing.T, label, cluster string) string { return acceptance.ExecuteTemplate(t, "object_bucket_data_basic", TemplateData{ diff --git a/linode/provider.go b/linode/provider.go index fce5760b9..e7a27cce6 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -193,6 +193,7 @@ func Provider() *schema.Provider { "linode_nodebalancer": nb.DataSource(), "linode_nodebalancer_node": nbnode.DataSource(), "linode_nodebalancer_config": nbconfig.DataSource(), + "linode_object_storage_bucket": objbucket.DataSource(), "linode_object_storage_cluster": objcluster.DataSource(), "linode_profile": profile.DataSource(), "linode_region": region.DataSource(), From 873a78787d03c265bc3f6564493335a9d626c974 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Tue, 21 Mar 2023 14:28:40 -0400 Subject: [PATCH 30/44] add untracked --- linode/objbucket/datasource.go | 50 +++++++++++++++++++ linode/objbucket/datasource_test.go | 35 +++++++++++++ linode/objbucket/schema_datasource.go | 31 ++++++++++++ linode/objbucket/tmpl/cluster_data_basic.gotf | 12 +++++ linode/objbucket/tmpl/data_basic.gotf | 1 + 5 files changed, 129 insertions(+) create mode 100644 linode/objbucket/datasource.go create mode 100644 linode/objbucket/datasource_test.go create mode 100644 linode/objbucket/schema_datasource.go create mode 100644 linode/objbucket/tmpl/cluster_data_basic.gotf diff --git a/linode/objbucket/datasource.go b/linode/objbucket/datasource.go new file mode 100644 index 000000000..3bbf30931 --- /dev/null +++ b/linode/objbucket/datasource.go @@ -0,0 +1,50 @@ +package objbucket + +import ( + "context" + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/diag" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/linode/linodego" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +func DataSource() *schema.Resource { + return &schema.Resource{ + ReadContext: readDataSource, + Schema: bucketDataSourceSchema, + } +} + +func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { + client := meta.(*helper.ProviderMeta).Client + + // cluster, label, err := DecodeBucketID(d.Id()) + cluster := d.Get("cluster").(string) + label := d.Get("label").(string) + + // if err != nil { + // return diag.Errorf("failed to parse Linode ObjectStorageBucket id %s", d.Id()) + // } + + bucket, err := client.GetObjectStorageBucket(ctx, cluster, label) + if err != nil { + if lerr, ok := err.(*linodego.Error); ok && lerr.Code == 404 { + log.Printf("[WARN] removing Object Storage Bucket %q from state because it no longer exists", d.Id()) + d.SetId("") + return nil + } + return diag.Errorf("failed to find the specified Linode ObjectStorageBucket: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", bucket.Cluster, bucket.Label)) + d.Set("cluster", bucket.Cluster) + d.Set("created", bucket.Created.Format(time.RFC3339)) + d.Set("hostname", bucket.Hostname) + d.Set("label", bucket.Label) + + return nil +} diff --git a/linode/objbucket/datasource_test.go b/linode/objbucket/datasource_test.go new file mode 100644 index 000000000..2446ad0e3 --- /dev/null +++ b/linode/objbucket/datasource_test.go @@ -0,0 +1,35 @@ +package objbucket_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/objbucket/tmpl" +) + +func TestAccDataSourceBucket_basic(t *testing.T) { + t.Parallel() + + resourceName := "data.linode_object_storage_bucket.foobar" + objectStorageBucketName := acctest.RandomWithPrefix("tf-test") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acceptance.PreCheck(t) }, + Providers: acceptance.TestAccProviders, + CheckDestroy: checkBucketDestroy, + Steps: []resource.TestStep{ + { + Config: tmpl.DataBasic(t, objectStorageBucketName, testCluster), + Check: resource.ComposeTestCheckFunc( + checkBucketExists, + resource.TestCheckResourceAttr(resourceName, "cluster", testCluster), + resource.TestCheckResourceAttr(resourceName, "label", objectStorageBucketName), + resource.TestCheckResourceAttrSet(resourceName, "hostname"), + resource.TestCheckResourceAttrSet(resourceName, "created"), + ), + }, + }, + }) +} diff --git a/linode/objbucket/schema_datasource.go b/linode/objbucket/schema_datasource.go new file mode 100644 index 000000000..7147b52c9 --- /dev/null +++ b/linode/objbucket/schema_datasource.go @@ -0,0 +1,31 @@ +package objbucket + +import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + +var bucketDataSourceSchema = map[string]*schema.Schema{ + "cluster": { + Type: schema.TypeString, + Description: "The ID of the Object Storage Cluster this bucket is in.", + Required: true, + }, + "created": { + Type: schema.TypeString, + Description: "When this bucket was created.", + Computed: true, + }, + "hostname": { + Type: schema.TypeString, + Description: "The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.", + Computed: true, + }, + "label": { + Type: schema.TypeString, + Description: "The name of this bucket.", + Required: true, + }, + "id": { + Type: schema.TypeString, + Description: "The id of this bucket.", + Computed: true, + }, +} diff --git a/linode/objbucket/tmpl/cluster_data_basic.gotf b/linode/objbucket/tmpl/cluster_data_basic.gotf new file mode 100644 index 000000000..89547a18f --- /dev/null +++ b/linode/objbucket/tmpl/cluster_data_basic.gotf @@ -0,0 +1,12 @@ +{{ define "object_bucket_cluster_data_basic" }} + +data "linode_object_storage_cluster" "baz" { + id = "{{ .Cluster }}" +} + +resource "linode_object_storage_bucket" "foobar" { + cluster = data.linode_object_storage_cluster.baz.id + label = "{{.Label}}" +} + +{{ end }} \ No newline at end of file diff --git a/linode/objbucket/tmpl/data_basic.gotf b/linode/objbucket/tmpl/data_basic.gotf index 456ef462d..d571d9042 100644 --- a/linode/objbucket/tmpl/data_basic.gotf +++ b/linode/objbucket/tmpl/data_basic.gotf @@ -10,6 +10,7 @@ resource "linode_object_storage_bucket" "foobar" { data "linode_object_storage_bucket" "foobar" { cluster = "{{ .Cluster }}" label = "{{.Label}}" + id = linode_object_storage_bucket.foobar.id } {{ end }} \ No newline at end of file From d31116a316a81b0c86ee8da6e734f0d4a0ddc54a Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Tue, 21 Mar 2023 14:50:42 -0400 Subject: [PATCH 31/44] fix bucket data basic --- linode/objbucket/datasource.go | 6 ------ linode/objbucket/schema_datasource.go | 10 +++++----- linode/objbucket/tmpl/data_basic.gotf | 7 ++----- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/linode/objbucket/datasource.go b/linode/objbucket/datasource.go index 3bbf30931..5db0e1c47 100644 --- a/linode/objbucket/datasource.go +++ b/linode/objbucket/datasource.go @@ -21,15 +21,9 @@ func DataSource() *schema.Resource { func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { client := meta.(*helper.ProviderMeta).Client - - // cluster, label, err := DecodeBucketID(d.Id()) cluster := d.Get("cluster").(string) label := d.Get("label").(string) - // if err != nil { - // return diag.Errorf("failed to parse Linode ObjectStorageBucket id %s", d.Id()) - // } - bucket, err := client.GetObjectStorageBucket(ctx, cluster, label) if err != nil { if lerr, ok := err.(*linodego.Error); ok && lerr.Code == 404 { diff --git a/linode/objbucket/schema_datasource.go b/linode/objbucket/schema_datasource.go index 7147b52c9..bccee8942 100644 --- a/linode/objbucket/schema_datasource.go +++ b/linode/objbucket/schema_datasource.go @@ -18,14 +18,14 @@ var bucketDataSourceSchema = map[string]*schema.Schema{ Description: "The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.", Computed: true, }, - "label": { - Type: schema.TypeString, - Description: "The name of this bucket.", - Required: true, - }, "id": { Type: schema.TypeString, Description: "The id of this bucket.", Computed: true, }, + "label": { + Type: schema.TypeString, + Description: "The name of this bucket.", + Required: true, + }, } diff --git a/linode/objbucket/tmpl/data_basic.gotf b/linode/objbucket/tmpl/data_basic.gotf index d571d9042..0a0a1317e 100644 --- a/linode/objbucket/tmpl/data_basic.gotf +++ b/linode/objbucket/tmpl/data_basic.gotf @@ -1,16 +1,13 @@ {{ define "object_bucket_data_basic" }} -{{ template "object_key_basic" .Key }} - resource "linode_object_storage_bucket" "foobar" { cluster = "{{ .Cluster }}" label = "{{.Label}}" } data "linode_object_storage_bucket" "foobar" { - cluster = "{{ .Cluster }}" - label = "{{.Label}}" - id = linode_object_storage_bucket.foobar.id + cluster = linode_object_storage_bucket.foobar.cluster + label = linode_object_storage_bucket.foobar.label } {{ end }} \ No newline at end of file From c25cdf333312610efee9a2aca6fb0ed1a53ff8a7 Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Tue, 21 Mar 2023 15:30:33 -0400 Subject: [PATCH 32/44] fix lint --- linode/objbucket/schema_datasource.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linode/objbucket/schema_datasource.go b/linode/objbucket/schema_datasource.go index bccee8942..b23d31860 100644 --- a/linode/objbucket/schema_datasource.go +++ b/linode/objbucket/schema_datasource.go @@ -14,9 +14,10 @@ var bucketDataSourceSchema = map[string]*schema.Schema{ Computed: true, }, "hostname": { - Type: schema.TypeString, - Description: "The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.", - Computed: true, + Type: schema.TypeString, + Description: "The hostname where this bucket can be accessed." + + "This hostname can be accessed through a browser if the bucket is made public.", + Computed: true, }, "id": { Type: schema.TypeString, From de18ea982177f65bfea88c916ce7b220744710c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 10:39:57 -0400 Subject: [PATCH 33/44] build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 (#781) Bumps [github.com/hashicorp/terraform-plugin-sdk/v2](https://github.com/hashicorp/terraform-plugin-sdk) from 2.25.0 to 2.26.1. - [Release notes](https://github.com/hashicorp/terraform-plugin-sdk/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-sdk/compare/v2.25.0...v2.26.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-sdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 52e2d71d6..baf75c242 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/aws/aws-sdk-go v1.42.16 github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 github.com/linode/linodego v1.15.0 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.7.0 @@ -30,10 +30,10 @@ require ( github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hc-install v0.5.0 // indirect - github.com/hashicorp/hcl/v2 v2.16.1 // indirect + github.com/hashicorp/hcl/v2 v2.16.2 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.17.3 // indirect - github.com/hashicorp/terraform-json v0.15.0 // indirect + github.com/hashicorp/terraform-exec v0.18.1 // indirect + github.com/hashicorp/terraform-json v0.16.0 // indirect github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect github.com/hashicorp/terraform-registry-address v0.1.0 // indirect @@ -56,7 +56,7 @@ require ( github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect github.com/vmihailenco/tagparser v0.1.1 // indirect - github.com/zclconf/go-cty v1.12.1 // indirect + github.com/zclconf/go-cty v1.13.1 // indirect golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.8.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect diff --git a/go.sum b/go.sum index 0a0770546..c0e4d2e07 100644 --- a/go.sum +++ b/go.sum @@ -259,20 +259,20 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hc-install v0.5.0 h1:D9bl4KayIYKEeJ4vUDe9L5huqxZXczKaykSRcmQ0xY0= github.com/hashicorp/hc-install v0.5.0/go.mod h1:JyzMfbzfSBSjoDCRPna1vi/24BEDxFaCPfdHtM5SCdo= -github.com/hashicorp/hcl/v2 v2.16.1 h1:BwuxEMD/tsYgbhIW7UuI3crjovf3MzuFWiVgiv57iHg= -github.com/hashicorp/hcl/v2 v2.16.1/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= +github.com/hashicorp/hcl/v2 v2.16.2 h1:mpkHZh/Tv+xet3sy3F9Ld4FyI2tUpWe9x3XtPx9f1a0= +github.com/hashicorp/hcl/v2 v2.16.2/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= -github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI= -github.com/hashicorp/terraform-json v0.15.0 h1:/gIyNtR6SFw6h5yzlbDbACyGvIhKtQi8mTsbkNd79lE= -github.com/hashicorp/terraform-json v0.15.0/go.mod h1:+L1RNzjDU5leLFZkHTFTbJXaoqUC6TqXlFgDoOXrtvk= +github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX5H8XZxHlH4= +github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= +github.com/hashicorp/terraform-json v0.16.0 h1:UKkeWRWb23do5LNAFlh/K3N0ymn1qTOO8c+85Albo3s= +github.com/hashicorp/terraform-json v0.16.0/go.mod h1:v0Ufk9jJnk6tcIZvScHvetlKfiNTC+WS21mnXIlc0B0= github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0 h1:iNRjaJCatQS1rIbHs/vDvJ0GECsaGgxx780chA2Irpk= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.25.0/go.mod h1:XnVNLIS6bdMJbjSDujhX4Rlk24QpbGKbnrVFM4tZ7OU= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= @@ -385,7 +385,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -422,11 +421,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= -github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= +github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= From e2062ad9a3c4a231fc592cd193615dcb799e7ad9 Mon Sep 17 00:00:00 2001 From: Ye Chen <127243817+yec-akamai@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:27:31 -0400 Subject: [PATCH 34/44] Get size,objects fields in object storage bucket exposed to terrafrom (#783) --- go.mod | 2 +- go.sum | 4 ++-- linode/objbucket/datasource.go | 2 ++ linode/objbucket/datasource_test.go | 2 ++ linode/objbucket/schema_datasource.go | 10 ++++++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index baf75c242..3405470d7 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/linode/linodego v1.15.0 + github.com/linode/linodego v1.16.0 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.7.0 ) diff --git a/go.sum b/go.sum index c0e4d2e07..a4c133738 100644 --- a/go.sum +++ b/go.sum @@ -319,8 +319,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.15.0 h1:7LaXTp/QfH6HRi63YUisVctCqHpgqttwy65cCIbbC9c= -github.com/linode/linodego v1.15.0/go.mod h1:f7lh/go9m8slMQ3a8B0dj5pVrZbpBFzwrRRhoX+YiV4= +github.com/linode/linodego v1.16.0 h1:ufG7cWV5GZaP6buNj0lll73+Q0K8Uk3Kdq2zfrzhUQM= +github.com/linode/linodego v1.16.0/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/linode/objbucket/datasource.go b/linode/objbucket/datasource.go index 5db0e1c47..1e94f26ba 100644 --- a/linode/objbucket/datasource.go +++ b/linode/objbucket/datasource.go @@ -39,6 +39,8 @@ func readDataSource(ctx context.Context, d *schema.ResourceData, meta interface{ d.Set("created", bucket.Created.Format(time.RFC3339)) d.Set("hostname", bucket.Hostname) d.Set("label", bucket.Label) + d.Set("objects", bucket.Objects) + d.Set("size", bucket.Size) return nil } diff --git a/linode/objbucket/datasource_test.go b/linode/objbucket/datasource_test.go index 2446ad0e3..3a9730584 100644 --- a/linode/objbucket/datasource_test.go +++ b/linode/objbucket/datasource_test.go @@ -28,6 +28,8 @@ func TestAccDataSourceBucket_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "label", objectStorageBucketName), resource.TestCheckResourceAttrSet(resourceName, "hostname"), resource.TestCheckResourceAttrSet(resourceName, "created"), + resource.TestCheckResourceAttrSet(resourceName, "objects"), + resource.TestCheckResourceAttrSet(resourceName, "size"), ), }, }, diff --git a/linode/objbucket/schema_datasource.go b/linode/objbucket/schema_datasource.go index b23d31860..8c850c24c 100644 --- a/linode/objbucket/schema_datasource.go +++ b/linode/objbucket/schema_datasource.go @@ -29,4 +29,14 @@ var bucketDataSourceSchema = map[string]*schema.Schema{ Description: "The name of this bucket.", Required: true, }, + "objects": { + Type: schema.TypeInt, + Description: "The number of objects stored in this bucket.", + Computed: true, + }, + "size": { + Type: schema.TypeInt, + Description: "The size of the bucket in bytes.", + Computed: true, + }, } From c8592580a3f9cd115075bbd9ecd4fc13ca18a676 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Wed, 12 Apr 2023 17:00:56 -0400 Subject: [PATCH 35/44] Fix `instancetype`'s Integration test (#788) * Fix test assertion about linode price * Dynamically get info from API for test assertions --- linode/instancetype/datasource_test.go | 67 ++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/linode/instancetype/datasource_test.go b/linode/instancetype/datasource_test.go index c05656520..fb3530f1f 100644 --- a/linode/instancetype/datasource_test.go +++ b/linode/instancetype/datasource_test.go @@ -1,6 +1,8 @@ package instancetype_test import ( + "context" + "strconv" "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" @@ -14,6 +16,16 @@ func TestAccDataSourceLinodeInstanceType_basic(t *testing.T) { instanceTypeID := "g6-standard-2" resourceName := "data.linode_instance_type.foobar" + client, err := acceptance.GetClientForSweepers() + if err != nil { + t.Fatal(err) + } + + typeInfo, err := client.GetType(context.Background(), instanceTypeID) + if err != nil { + t.Fatalf("failed to get instance type %s: %s", instanceTypeID, err) + } + resource.Test(t, resource.TestCase{ PreCheck: func() { acceptance.PreCheck(t) }, Providers: acceptance.TestAccProviders, @@ -22,16 +34,51 @@ func TestAccDataSourceLinodeInstanceType_basic(t *testing.T) { Config: tmpl.DataBasic(t, instanceTypeID), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(resourceName, "id", instanceTypeID), - resource.TestCheckResourceAttr(resourceName, "label", "Linode 4GB"), - resource.TestCheckResourceAttr(resourceName, "disk", "81920"), - resource.TestCheckResourceAttr(resourceName, "class", "standard"), - resource.TestCheckResourceAttr(resourceName, "memory", "4096"), - resource.TestCheckResourceAttr(resourceName, "vcpus", "2"), - resource.TestCheckResourceAttr(resourceName, "network_out", "4000"), - resource.TestCheckResourceAttr(resourceName, "price.0.hourly", "0.029999999329447746"), - resource.TestCheckResourceAttr(resourceName, "price.0.monthly", "20"), - resource.TestCheckResourceAttr(resourceName, "addons.0.backups.0.price.0.hourly", "0.00800000037997961"), - resource.TestCheckResourceAttr(resourceName, "addons.0.backups.0.price.0.monthly", "5"), + resource.TestCheckResourceAttr(resourceName, "label", typeInfo.Label), + resource.TestCheckResourceAttr( + resourceName, + "disk", + strconv.FormatInt(int64(typeInfo.Disk), 10), + ), + resource.TestCheckResourceAttr( + resourceName, + "class", + string(typeInfo.Class), + ), + resource.TestCheckResourceAttr( + resourceName, + "memory", + strconv.FormatInt(int64(typeInfo.Memory), 10), + ), + resource.TestCheckResourceAttr( + resourceName, + "vcpus", + strconv.FormatInt(int64(typeInfo.VCPUs), 10), + ), + resource.TestCheckResourceAttr( + resourceName, + "network_out", + strconv.FormatInt(int64(typeInfo.NetworkOut), 10), + ), + resource.TestCheckResourceAttr( + resourceName, + "price.0.hourly", + strconv.FormatFloat(float64(typeInfo.Price.Hourly), 'f', -1, 64)), + resource.TestCheckResourceAttr( + resourceName, + "price.0.monthly", + strconv.FormatFloat(float64(typeInfo.Price.Monthly), 'f', -1, 64), + ), + resource.TestCheckResourceAttr( + resourceName, + "addons.0.backups.0.price.0.hourly", + strconv.FormatFloat(float64(typeInfo.Addons.Backups.Price.Hourly), 'f', -1, 64), + ), + resource.TestCheckResourceAttr( + resourceName, + "addons.0.backups.0.price.0.monthly", + strconv.FormatFloat(float64(typeInfo.Addons.Backups.Price.Monthly), 'f', -1, 64), + ), ), }, }, From cd36f284f2966fea68d8d654e06500a9eab5bb48 Mon Sep 17 00:00:00 2001 From: Lena Garber <114949949+lgarber-akamai@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:12:47 -0400 Subject: [PATCH 36/44] fix: Retry on database wait operation requests (#790) * Retry on database wait operation requests --- go.mod | 4 ++-- go.sum | 4 ++-- linode/databasemongodb/resource.go | 5 +++-- linode/databasemysql/resource.go | 5 +++-- linode/databasepostgresql/resource.go | 5 +++-- linode/helper/config.go | 24 ++++++++++++++++++++++++ linode/region/datasource_test.go | 7 ++++--- 7 files changed, 41 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 3405470d7..217324fe2 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,11 @@ module github.com/linode/terraform-provider-linode require ( github.com/aws/aws-sdk-go v1.42.16 + github.com/go-resty/resty/v2 v2.7.0 github.com/google/go-cmp v0.5.9 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 - github.com/linode/linodego v1.16.0 + github.com/linode/linodego v1.16.1 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 golang.org/x/crypto v0.7.0 ) @@ -16,7 +17,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/go-logr/logr v1.2.0 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gofuzz v1.1.0 // indirect diff --git a/go.sum b/go.sum index a4c133738..a1d39a932 100644 --- a/go.sum +++ b/go.sum @@ -319,8 +319,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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= -github.com/linode/linodego v1.16.0 h1:ufG7cWV5GZaP6buNj0lll73+Q0K8Uk3Kdq2zfrzhUQM= -github.com/linode/linodego v1.16.0/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= +github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= +github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 h1:e+tpC7AIiEgfYGEDq9Rjtdybq+V10S6OXzWjeGV/CEk= github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947/go.mod h1:MWI0tFyaJqRpirMv0VO7CGYT4V3IhHvml2rs/DlRQmY= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= diff --git a/linode/databasemongodb/resource.go b/linode/databasemongodb/resource.go index 46a5de757..6fe867a7f 100644 --- a/linode/databasemongodb/resource.go +++ b/linode/databasemongodb/resource.go @@ -128,9 +128,10 @@ func createResource(ctx context.Context, d *schema.ResourceData, meta interface{ return diag.Errorf("failed to wait for mysql database creation event: %s", err) } - if err := client.WaitForDatabaseStatus( + err = client.WaitForDatabaseStatus( ctx, db.ID, linodego.DatabaseEngineTypeMongo, - linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())); err != nil { + linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())) + if err != nil { return diag.Errorf("failed to wait for database active: %s", err) } diff --git a/linode/databasemysql/resource.go b/linode/databasemysql/resource.go index 46d115133..1eaf9173b 100644 --- a/linode/databasemysql/resource.go +++ b/linode/databasemysql/resource.go @@ -123,9 +123,10 @@ func createResource(ctx context.Context, d *schema.ResourceData, meta interface{ return diag.Errorf("failed to wait for mysql database creation event: %s", err) } - if err := client.WaitForDatabaseStatus( + err = client.WaitForDatabaseStatus( ctx, db.ID, linodego.DatabaseEngineTypeMySQL, - linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())); err != nil { + linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())) + if err != nil { return diag.Errorf("failed to wait for database active: %s", err) } diff --git a/linode/databasepostgresql/resource.go b/linode/databasepostgresql/resource.go index 0f72fadca..d5dc691c5 100644 --- a/linode/databasepostgresql/resource.go +++ b/linode/databasepostgresql/resource.go @@ -125,9 +125,10 @@ func createResource(ctx context.Context, d *schema.ResourceData, meta interface{ return diag.Errorf("failed to wait for mysql database creation event: %s", err) } - if err := client.WaitForDatabaseStatus( + err = client.WaitForDatabaseStatus( ctx, db.ID, linodego.DatabaseEngineTypePostgres, - linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())); err != nil { + linodego.DatabaseStatusActive, int(d.Timeout(schema.TimeoutCreate).Seconds())) + if err != nil { return diag.Errorf("failed to wait for database active: %s", err) } diff --git a/linode/helper/config.go b/linode/helper/config.go index 541b07bdb..db0023d49 100644 --- a/linode/helper/config.go +++ b/linode/helper/config.go @@ -4,10 +4,13 @@ import ( "fmt" "log" "net/http" + "net/url" "os" + "regexp" "strings" "time" + "github.com/go-resty/resty/v2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" "github.com/hashicorp/terraform-plugin-sdk/v2/meta" "github.com/linode/linodego" @@ -105,6 +108,27 @@ func (c *Config) Client() (*linodego.Client, error) { } client.SetUserAgent(userAgent) + // Workaround for intermittent 5xx errors when retrieving a database from the API + databaseGetRegex, err := regexp.Compile("[A-Za-z0-9]+/databases/[a-z]+/instances/[0-9]+") + if err != nil { + log.Fatal(err) + } + + client.AddRetryCondition(func(response *resty.Response, err error) bool { + if response.StatusCode() != 502 || response.Request == nil { + return false + } + + requestURL, err := url.ParseRequestURI(response.Request.URL) + if err != nil { + log.Printf("[WARN] failed to parse request URL: %s", err) + return false + } + + // Check whether the string matches + return databaseGetRegex.MatchString(requestURL.Path) + }) + return &client, nil } diff --git a/linode/region/datasource_test.go b/linode/region/datasource_test.go index 9d5f75b03..019a101dd 100644 --- a/linode/region/datasource_test.go +++ b/linode/region/datasource_test.go @@ -10,8 +10,10 @@ import ( "github.com/linode/terraform-provider-linode/linode/region/tmpl" ) -var testRegion string -var testLabel string +var ( + testRegion string + testLabel string +) func init() { region, err := acceptance.GetRandomRegionWithCaps([]string{"linodes"}) @@ -32,7 +34,6 @@ func init() { } testLabel = r.Label - } func TestAccDataSourceRegion_basic(t *testing.T) { From 383e8da54485636d7e70bec8be289250c4495229 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:28:09 -0400 Subject: [PATCH 37/44] Handle defaults in config function (#786) --- linode/provider.go | 103 +++++++++++++++++++++++++++++++-------------- 1 file changed, 72 insertions(+), 31 deletions(-) diff --git a/linode/provider.go b/linode/provider.go index e7a27cce6..09807e32b 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "os" + "strconv" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -70,64 +71,48 @@ func Provider() *schema.Provider { "token": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("LINODE_TOKEN", nil), Description: "The token that allows you access to your Linode account", }, "config_path": { Type: schema.TypeString, Optional: true, - DefaultFunc: func() (interface{}, error) { - homeDir, err := os.UserHomeDir() - if err != nil { - return "", err - } - - return fmt.Sprintf("%s/.config/linode", homeDir), nil - }, }, "config_profile": { Type: schema.TypeString, Optional: true, - Default: "default", }, "url": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("LINODE_URL", nil), Description: "The HTTP(S) API address of the Linode API to use.", ValidateFunc: validation.IsURLWithHTTPorHTTPS, }, "ua_prefix": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("LINODE_UA_PREFIX", nil), Description: "An HTTP User-Agent Prefix to prepend in API requests.", }, "api_version": { Type: schema.TypeString, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("LINODE_API_VERSION", nil), Description: "An HTTP User-Agent Prefix to prepend in API requests.", }, "skip_instance_ready_poll": { Type: schema.TypeBool, Optional: true, - Default: false, Description: "Skip waiting for a linode_instance resource to be running.", }, "skip_instance_delete_poll": { Type: schema.TypeBool, Optional: true, - Default: false, Description: "Skip waiting for a linode_instance resource to finish deleting.", }, "disable_internal_cache": { Type: schema.TypeBool, Optional: true, - Default: false, Description: "Disable the internal caching system that backs certain Linode API requests.", }, @@ -144,20 +129,17 @@ func Provider() *schema.Provider { "event_poll_ms": { Type: schema.TypeInt, Optional: true, - DefaultFunc: schema.EnvDefaultFunc("LINODE_EVENT_POLL_MS", 4000), Description: "The rate in milliseconds to poll for events.", }, "lke_event_poll_ms": { Type: schema.TypeInt, Optional: true, - Default: 3000, Description: "The rate in milliseconds to poll for LKE events.", }, "lke_node_ready_poll_ms": { Type: schema.TypeInt, Optional: true, - Default: 3000, Description: "The rate in milliseconds to poll for an LKE node to be ready.", }, }, @@ -251,18 +233,79 @@ func Provider() *schema.Provider { return provider } +func handleDefault(config *helper.Config, d *schema.ResourceData) diag.Diagnostics { + if v, ok := d.GetOk("token"); ok { + config.AccessToken = v.(string) + } else { + config.AccessToken = os.Getenv("LINODE_TOKEN") + } + + if v, ok := d.GetOk("api_version"); ok { + config.APIVersion = v.(string) + } else { + config.APIVersion = os.Getenv("LINODE_API_VERSION") + } + + if v, ok := d.GetOk("config_path"); ok { + config.ConfigPath = v.(string) + } else { + homeDir, err := os.UserHomeDir() + if err != nil { + return diag.Errorf( + "Failed to get user home directory: %s", + err.Error(), + ) + } + config.ConfigPath = fmt.Sprintf("%s/.config/linode", homeDir) + } + + if v, ok := d.GetOk("config_profile"); ok { + config.ConfigProfile = v.(string) + } else { + config.ConfigProfile = "default" + } + + if v, ok := d.GetOk("url"); ok { + config.APIURL = v.(string) + } else { + config.APIURL = os.Getenv("LINODE_URL") + } + + if v, ok := d.GetOk("ua_prefix"); ok { + config.UAPrefix = v.(string) + } else { + config.UAPrefix = os.Getenv("LINODE_UA_PREFIX") + } + + if v, ok := d.GetOk("event_poll_ms"); ok { + config.EventPollMilliseconds = v.(int) + } else { + eventPollMs, err := strconv.ParseInt(os.Getenv("LINODE_EVENT_POLL_MS"), 10, 64) + if err != nil { + eventPollMs = 4000 + } + config.EventPollMilliseconds = int(eventPollMs) + } + + if v, ok := d.GetOk("lke_event_poll_ms"); ok { + config.LKEEventPollMilliseconds = v.(int) + } else { + config.LKEEventPollMilliseconds = 3000 + } + + if v, ok := d.GetOk("lke_node_ready_poll_ms"); ok { + config.LKENodeReadyPollMilliseconds = v.(int) + } else { + config.LKENodeReadyPollMilliseconds = 3000 + } + + return nil +} + func providerConfigure( ctx context.Context, d *schema.ResourceData, terraformVersion string, ) (interface{}, diag.Diagnostics) { config := &helper.Config{ - AccessToken: d.Get("token").(string), - APIURL: d.Get("url").(string), - APIVersion: d.Get("api_version").(string), - UAPrefix: d.Get("ua_prefix").(string), - - ConfigPath: d.Get("config_path").(string), - ConfigProfile: d.Get("config_profile").(string), - SkipInstanceReadyPoll: d.Get("skip_instance_ready_poll").(bool), SkipInstanceDeletePoll: d.Get("skip_instance_delete_poll").(bool), @@ -270,12 +313,10 @@ func providerConfigure( MinRetryDelayMilliseconds: d.Get("min_retry_delay_ms").(int), MaxRetryDelayMilliseconds: d.Get("max_retry_delay_ms").(int), + } - EventPollMilliseconds: d.Get("event_poll_ms").(int), - LKEEventPollMilliseconds: d.Get("lke_event_poll_ms").(int), + handleDefault(config, d) - LKENodeReadyPollMilliseconds: d.Get("lke_node_ready_poll_ms").(int), - } config.TerraformVersion = terraformVersion client, err := config.Client() if err != nil { From fd7beaff9f91f3d2eed4de90c264be77fb2d7937 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 10:41:26 -0400 Subject: [PATCH 38/44] build(deps): bump golang.org/x/crypto from 0.7.0 to 0.8.0 (#785) Dependabot couldn't find the original pull request head commit, 47a45b9758d831a56e66bf18320d15b63c157d0d. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 217324fe2..780abd7c1 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 github.com/linode/linodego v1.16.1 github.com/linode/linodego/k8s v0.0.0-20200831124119-58d5d5bb7947 - golang.org/x/crypto v0.7.0 + golang.org/x/crypto v0.8.0 ) require ( @@ -58,11 +58,11 @@ require ( github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/zclconf/go-cty v1.13.1 // indirect golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.8.0 // indirect + golang.org/x/net v0.9.0 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect diff --git a/go.sum b/go.sum index a1d39a932..9d827b16a 100644 --- a/go.sum +++ b/go.sum @@ -446,8 +446,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -533,8 +533,8 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -619,14 +619,14 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -638,8 +638,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 03fae5d0783fbebaead2a0052e037bed5de6a320 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Wed, 19 Apr 2023 10:41:40 -0400 Subject: [PATCH 39/44] Update GitHub Actions (#789) --- .github/workflows/gosec_pr.yml | 2 +- .github/workflows/integration_tests.yml | 4 ++-- .github/workflows/integration_tests_pr.yml | 6 +++--- .github/workflows/label-sync.yml | 2 +- .github/workflows/pull_request.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .github/workflows/stale.yml | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gosec_pr.yml b/.github/workflows/gosec_pr.yml index a8295c2cd..e0bdfae20 100644 --- a/.github/workflows/gosec_pr.yml +++ b/.github/workflows/gosec_pr.yml @@ -9,7 +9,7 @@ jobs: GO111MODULE: on steps: - name: Checkout Source - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 + uses: actions/checkout@v3 - name: Run Gosec Security Scanner uses: securego/gosec@master with: diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index df9ad97a9..06c051475 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -11,8 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Clone Repository - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 - - uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # pin@v2 + uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '1.18' - run: go version diff --git a/.github/workflows/integration_tests_pr.yml b/.github/workflows/integration_tests_pr.yml index 27fbf4e3d..3dda4497a 100644 --- a/.github/workflows/integration_tests_pr.yml +++ b/.github/workflows/integration_tests_pr.yml @@ -16,7 +16,7 @@ jobs: github.event.client_payload.pull_request.head.sha == github.event.client_payload.slash_command.sha steps: - - uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # pin@v2 + - uses: actions/setup-go@v4 with: go-version: '1.18' - run: go version @@ -29,7 +29,7 @@ jobs: # Check out merge commit - name: Checkout PR - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.client_payload.slash_command.sha }} @@ -38,7 +38,7 @@ jobs: env: LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 id: update-check-run if: ${{ always() }} env: diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index 03fcc2cb7..77841351f 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 + - uses: actions/checkout@v3 - uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # pin@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6a7cf593e..b183adee5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,8 +4,8 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 - - uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # pin@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '1.18' - run: go version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee738d587..15f5fe657 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # pin@v2 + uses: actions/checkout@v3 - name: Unshallow run: git fetch --prune --unshallow - name: Set up Go - uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # pin@v2 + uses: actions/setup-go@v4 with: go-version: 1.18 - name: Import GPG key diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 6bea4e270..2ecb76182 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -8,7 +8,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@8af60513daf46d35533e7d765d4553d223d810e0 # pin@main + - uses: actions/stale@v5 id: stale with: stale-issue-message: 'This issue is stale because it has been open 30 days with From 328ce358bba1c3c6d985af30b203484363f2357b Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Fri, 21 Apr 2023 15:22:27 -0400 Subject: [PATCH 40/44] Remove deprecated linters and fix some (not all) lint errors (#794) * run gci * Remove deprecated linters * Return err when occurs * Optimized if else logics * Disable unused-parameter and ireturn * Memory consumption optimized --- .golangci.yml | 19 +++++++++++++++++-- linode/acceptance/test_util.go | 2 +- linode/databasebackups/datasource_test.go | 1 - linode/firewall/resource_test.go | 3 +-- linode/firewalldevice/resource_test.go | 3 +-- linode/instanceconfig/helper.go | 14 ++++---------- linode/nb/datasource_test.go | 3 +-- linode/nb/resource.go | 2 +- linode/nb/resource_test.go | 5 ++--- linode/nbconfig/datasource_test.go | 3 +-- linode/nbconfig/resource_test.go | 5 ++--- linode/nbnode/datasource_test.go | 3 +-- linode/nbnode/resource_test.go | 6 ++---- linode/networkingip/datasource_test.go | 3 +-- linode/objkey/resource.go | 5 +++-- linode/stackscripts/datasource_test.go | 1 - 16 files changed, 38 insertions(+), 40 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 7a5ba0ced..3568dc900 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,6 +6,11 @@ run: timeout: 2m linters-settings: + revive: + rules: + - name: unused-parameter + severity: warning + disabled: true errcheck: check-type-assertions: true check-blank: true @@ -15,6 +20,7 @@ linters-settings: enable: - atomicalign + - fieldalignment enable-all: false disable: - shadow @@ -25,8 +31,6 @@ linters-settings: # min-complexity: 30 # gocognit: # min-complexity: 30 - maligned: - suggest-new: true dupl: threshold: 100 @@ -48,6 +52,17 @@ linters: - interfacer - gomnd + # not compatible with upper stream design + - ireturn + + # deprecated linters + - deadcode + - structcheck + - varcheck + - golint + - nosnakecase + - maligned + # TODO(charliekenney23): enable these rules once compliant - prealloc - funlen diff --git a/linode/acceptance/test_util.go b/linode/acceptance/test_util.go index 5f020f732..1f8085baf 100644 --- a/linode/acceptance/test_util.go +++ b/linode/acceptance/test_util.go @@ -560,7 +560,7 @@ func GetRandomRegionWithCaps(capabilities []string) (string, error) { regions, err := GetRegionsWithCaps(capabilities) if err != nil { - return "", nil + return "", err } if len(regions) < 1 { diff --git a/linode/databasebackups/datasource_test.go b/linode/databasebackups/datasource_test.go index 583319b3a..388373e03 100644 --- a/linode/databasebackups/datasource_test.go +++ b/linode/databasebackups/datasource_test.go @@ -7,7 +7,6 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/linodego" diff --git a/linode/firewall/resource_test.go b/linode/firewall/resource_test.go index 3e168f153..1d100574d 100644 --- a/linode/firewall/resource_test.go +++ b/linode/firewall/resource_test.go @@ -6,10 +6,9 @@ import ( "log" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/firewall/tmpl" diff --git a/linode/firewalldevice/resource_test.go b/linode/firewalldevice/resource_test.go index 1064fd3f6..51baa408b 100644 --- a/linode/firewalldevice/resource_test.go +++ b/linode/firewalldevice/resource_test.go @@ -6,10 +6,9 @@ import ( "strconv" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/firewalldevice/tmpl" diff --git a/linode/instanceconfig/helper.go b/linode/instanceconfig/helper.go index c07400b2c..8cae00189 100644 --- a/linode/instanceconfig/helper.go +++ b/linode/instanceconfig/helper.go @@ -198,18 +198,12 @@ func applyBootStatus(ctx context.Context, client *linodego.Client, instance *lin } if booted { - if err := bootedTrue(); err != nil { - return err - } - - return nil - } - - if err := bootedFalse(); err != nil { - return err + err = bootedTrue() + } else { + err = bootedFalse() } - return nil + return err } func expandInterfaces(ifaces []any) []linodego.InstanceConfigInterface { diff --git a/linode/nb/datasource_test.go b/linode/nb/datasource_test.go index 12c761663..52158e281 100644 --- a/linode/nb/datasource_test.go +++ b/linode/nb/datasource_test.go @@ -3,11 +3,10 @@ package nb_test import ( "testing" - "github.com/linode/terraform-provider-linode/linode/nb/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/nb/tmpl" ) func TestAccDataSourceNodeBalancer_basic(t *testing.T) { diff --git a/linode/nb/resource.go b/linode/nb/resource.go index 5499ce202..770ffb9e3 100644 --- a/linode/nb/resource.go +++ b/linode/nb/resource.go @@ -132,7 +132,7 @@ func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{ updateOpts.Tags = &tags - if nodebalancer, err = client.UpdateNodeBalancer(ctx, nodebalancer.ID, updateOpts); err != nil { + if _, err = client.UpdateNodeBalancer(ctx, nodebalancer.ID, updateOpts); err != nil { return diag.FromErr(err) } } diff --git a/linode/nb/resource_test.go b/linode/nb/resource_test.go index 00c8b1985..797aa6bfc 100644 --- a/linode/nb/resource_test.go +++ b/linode/nb/resource_test.go @@ -8,15 +8,14 @@ import ( "strconv" "testing" - "github.com/linode/terraform-provider-linode/linode/nb" - "github.com/linode/terraform-provider-linode/linode/nb/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/linode/nb" + "github.com/linode/terraform-provider-linode/linode/nb/tmpl" ) var testRegion string diff --git a/linode/nbconfig/datasource_test.go b/linode/nbconfig/datasource_test.go index de11cfa47..611c47efc 100644 --- a/linode/nbconfig/datasource_test.go +++ b/linode/nbconfig/datasource_test.go @@ -3,12 +3,11 @@ package nbconfig_test import ( "testing" - "github.com/linode/terraform-provider-linode/linode/nbconfig/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/nbconfig/tmpl" ) func TestAccDataSourceNodeBalancerConfig_basic(t *testing.T) { diff --git a/linode/nbconfig/resource_test.go b/linode/nbconfig/resource_test.go index 9e20809ce..865189c81 100644 --- a/linode/nbconfig/resource_test.go +++ b/linode/nbconfig/resource_test.go @@ -8,15 +8,14 @@ import ( "strconv" "testing" - "github.com/linode/terraform-provider-linode/linode/nbconfig" - "github.com/linode/terraform-provider-linode/linode/nbconfig/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/linode/nbconfig" + "github.com/linode/terraform-provider-linode/linode/nbconfig/tmpl" ) var testRegion string diff --git a/linode/nbnode/datasource_test.go b/linode/nbnode/datasource_test.go index 48dfcf7ec..0c8c75230 100644 --- a/linode/nbnode/datasource_test.go +++ b/linode/nbnode/datasource_test.go @@ -3,11 +3,10 @@ package nbnode_test import ( "testing" - "github.com/linode/terraform-provider-linode/linode/nbnode/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/nbnode/tmpl" ) func TestAccDataSourceNodeBalancerNode_basic(t *testing.T) { diff --git a/linode/nbnode/resource_test.go b/linode/nbnode/resource_test.go index 8c0b40fd1..f195e4293 100644 --- a/linode/nbnode/resource_test.go +++ b/linode/nbnode/resource_test.go @@ -8,16 +8,14 @@ import ( "strings" "testing" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - - "github.com/linode/terraform-provider-linode/linode/nbnode/tmpl" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/linode/nbnode/tmpl" ) var ( diff --git a/linode/networkingip/datasource_test.go b/linode/networkingip/datasource_test.go index 65149edcd..26c87fa71 100644 --- a/linode/networkingip/datasource_test.go +++ b/linode/networkingip/datasource_test.go @@ -6,11 +6,10 @@ import ( "regexp" "testing" - "github.com/linode/terraform-provider-linode/linode/helper" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/terraform-provider-linode/linode/acceptance" + "github.com/linode/terraform-provider-linode/linode/helper" "github.com/linode/terraform-provider-linode/linode/networkingip/tmpl" ) diff --git a/linode/objkey/resource.go b/linode/objkey/resource.go index 155c25839..34c0fa10e 100644 --- a/linode/objkey/resource.go +++ b/linode/objkey/resource.go @@ -97,7 +97,7 @@ func updateResource( } if d.HasChange("label") { - objectStorageKey, err := client.GetObjectStorageKey(ctx, int(id)) + _, err := client.GetObjectStorageKey(ctx, int(id)) updateOpts := linodego.ObjectStorageKeyUpdateOptions{ Label: d.Get("label").(string), @@ -107,7 +107,8 @@ func updateResource( return diag.Errorf("Error fetching data about the current Linode Object Storage Key: %s", err) } - if objectStorageKey, err = client.UpdateObjectStorageKey(ctx, int(id), updateOpts); err != nil { + objectStorageKey, err := client.UpdateObjectStorageKey(ctx, int(id), updateOpts) + if err != nil { return diag.FromErr(err) } d.Set("label", objectStorageKey.Label) diff --git a/linode/stackscripts/datasource_test.go b/linode/stackscripts/datasource_test.go index faa2bd3f6..559764dfc 100644 --- a/linode/stackscripts/datasource_test.go +++ b/linode/stackscripts/datasource_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/linode/terraform-provider-linode/linode/acceptance" "github.com/linode/terraform-provider-linode/linode/stackscripts/tmpl" From 152c99c1bb7251a2099d910900cf2d4773e5339f Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:25:44 -0400 Subject: [PATCH 41/44] Framework Migration (#791) * Add dependencies * Add framework provider and switch to mux server * Framework token resource and test * rename file * Remove linode_token resource from the sdk provider * Fix lint * Fix resp.TypeName in framework provider Metadata * Apply @lgarber-akamai's refactor suggestion for GetStringFromEnv and GetIntFromEnv * Move DateTimeStringValidator to helper module * Move definition of ProtoV5ProviderFactories to acceptance pkg * Wrap GetMetaFromProviderData * generalize update logic * Framework test provider read version number from version * Apply description fix back to sdk provider to fix an error --- go.mod | 9 +- go.sum | 13 +- linode/acceptance/provider_factories.go | 28 ++ linode/acceptance/test_util.go | 40 +-- linode/framework_provider.go | 111 ++++++++ linode/framework_provider_config.go | 298 ++++++++++++++++++++ linode/framework_provider_model.go | 32 +++ linode/framework_provider_test.go | 1 + linode/helper/config.go | 4 + linode/helper/conversion.go | 20 ++ linode/helper/framework_validators.go | 47 +++ linode/helper/resource_datasource_config.go | 27 ++ linode/provider.go | 4 +- linode/token/framework_resource.go | 267 ++++++++++++++++++ linode/token/framework_resource_schema.go | 57 ++++ linode/token/resource.go | 121 -------- linode/token/resource_test.go | 11 +- linode/token/schema_resource.go | 71 ----- main.go | 47 ++- 19 files changed, 980 insertions(+), 228 deletions(-) create mode 100644 linode/acceptance/provider_factories.go create mode 100644 linode/framework_provider.go create mode 100644 linode/framework_provider_config.go create mode 100644 linode/framework_provider_model.go create mode 100644 linode/framework_provider_test.go create mode 100644 linode/helper/framework_validators.go create mode 100644 linode/helper/resource_datasource_config.go create mode 100644 linode/token/framework_resource.go create mode 100644 linode/token/framework_resource_schema.go delete mode 100644 linode/token/resource.go delete mode 100644 linode/token/schema_resource.go diff --git a/go.mod b/go.mod index 780abd7c1..b25d37f91 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.4.8 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect @@ -34,8 +34,11 @@ require ( github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-exec v0.18.1 // indirect github.com/hashicorp/terraform-json v0.16.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect + github.com/hashicorp/terraform-plugin-framework v1.2.0 + github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 + github.com/hashicorp/terraform-plugin-go v0.14.3 github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect + github.com/hashicorp/terraform-plugin-mux v0.9.0 github.com/hashicorp/terraform-registry-address v0.1.0 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect @@ -55,7 +58,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect + github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/zclconf/go-cty v1.13.1 // indirect golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.9.0 // indirect diff --git a/go.sum b/go.sum index 9d827b16a..4eb6d8b42 100644 --- a/go.sum +++ b/go.sum @@ -242,8 +242,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= @@ -267,10 +267,16 @@ github.com/hashicorp/terraform-exec v0.18.1 h1:LAbfDvNQU1l0NOQlTuudjczVhHj061fNX github.com/hashicorp/terraform-exec v0.18.1/go.mod h1:58wg4IeuAJ6LVsLUeD2DWZZoc/bYi6dzhLHzxM41980= github.com/hashicorp/terraform-json v0.16.0 h1:UKkeWRWb23do5LNAFlh/K3N0ymn1qTOO8c+85Albo3s= github.com/hashicorp/terraform-json v0.16.0/go.mod h1:v0Ufk9jJnk6tcIZvScHvetlKfiNTC+WS21mnXIlc0B0= +github.com/hashicorp/terraform-plugin-framework v1.2.0 h1:MZjFFfULnFq8fh04FqrKPcJ/nGpHOvX4buIygT3MSNY= +github.com/hashicorp/terraform-plugin-framework v1.2.0/go.mod h1:nToI62JylqXDq84weLJ/U3umUsBhZAaTmU0HXIVUOcw= +github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 h1:4L0tmy/8esP6OcvocVymw52lY0HyQ5OxB7VNl7k4bS0= +github.com/hashicorp/terraform-plugin-framework-validators v0.10.0/go.mod h1:qdQJCdimB9JeX2YwOpItEu+IrfoJjWQ5PhLpAOMDQAE= github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= +github.com/hashicorp/terraform-plugin-mux v0.9.0 h1:a2Xh63cunDB/1GZECrV02cGA74AhQGUjY9X8W3P/L7k= +github.com/hashicorp/terraform-plugin-mux v0.9.0/go.mod h1:8NUFbgeMigms7Tma/r2Vgi5Jv5mPv4xcJ05pJtIOhwc= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= @@ -410,8 +416,9 @@ github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaU github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/linode/acceptance/provider_factories.go b/linode/acceptance/provider_factories.go new file mode 100644 index 000000000..9c3092ddf --- /dev/null +++ b/linode/acceptance/provider_factories.go @@ -0,0 +1,28 @@ +package acceptance + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" +) + +var ProtoV5ProviderFactories = map[string]func() (tfprotov5.ProviderServer, error){ + "linode": func() (tfprotov5.ProviderServer, error) { + ctx := context.Background() + providers := []func() tfprotov5.ProviderServer{ + TestAccProviders["linode"].GRPCProvider, + providerserver.NewProtocol5( + TestAccFrameworkProvider, + ), + } + + muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + if err != nil { + return nil, err + } + + return muxServer.ProviderServer(), nil + }, +} diff --git a/linode/acceptance/test_util.go b/linode/acceptance/test_util.go index 1f8085baf..8dbed17af 100644 --- a/linode/acceptance/test_util.go +++ b/linode/acceptance/test_util.go @@ -24,6 +24,7 @@ import ( "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode" "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/version" "golang.org/x/crypto/ssh" ) @@ -37,14 +38,15 @@ type AttrValidateFunc func(val string) error type ListAttrValidateFunc func(resourceName, path string, state *terraform.State) error var ( - optInTests map[string]struct{} - privateKeyMaterial string - PublicKeyMaterial string - TestAccProviders map[string]*schema.Provider - TestAccProvider *schema.Provider - ConfigTemplates *template.Template - TestImageLatest string - TestImagePrevious string + optInTests map[string]struct{} + privateKeyMaterial string + PublicKeyMaterial string + TestAccProviders map[string]*schema.Provider + TestAccProvider *schema.Provider + TestAccFrameworkProvider *linode.FrameworkProvider + ConfigTemplates *template.Template + TestImageLatest string + TestImagePrevious string ) func initOptInTests() { @@ -99,23 +101,27 @@ func init() { initOptInTests() TestAccProvider = linode.Provider() + TestAccFrameworkProvider = linode.CreateFrameworkProvider(version.ProviderVersion).(*linode.FrameworkProvider) TestAccProviders = map[string]*schema.Provider{ "linode": TestAccProvider, } var templateFiles []string - err = filepath.Walk("../", func(path string, info os.FileInfo, err error) error { - if info.IsDir() { - return nil - } + err = filepath.Walk( + "../", + func(path string, info os.FileInfo, err error) error { + if info.IsDir() { + return nil + } - if filepath.Ext(path) == ".gotf" { - templateFiles = append(templateFiles, path) - } + if filepath.Ext(path) == ".gotf" { + templateFiles = append(templateFiles, path) + } - return nil - }) + return nil + }, + ) if err != nil { log.Fatalf("failed to load template files: %v", err) diff --git a/linode/framework_provider.go b/linode/framework_provider.go new file mode 100644 index 000000000..40750585b --- /dev/null +++ b/linode/framework_provider.go @@ -0,0 +1,111 @@ +package linode + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/provider/schema" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/linode/terraform-provider-linode/linode/helper" + "github.com/linode/terraform-provider-linode/linode/token" +) + +type FrameworkProvider struct { + ProviderVersion string + Meta *helper.FrameworkProviderMeta +} + +func CreateFrameworkProvider(version string) provider.Provider { + return &FrameworkProvider{ + ProviderVersion: version, + } +} + +func (p *FrameworkProvider) Metadata( + ctx context.Context, + req provider.MetadataRequest, + resp *provider.MetadataResponse, +) { + resp.TypeName = "linodecloud" +} + +func (p *FrameworkProvider) Schema( + ctx context.Context, + req provider.SchemaRequest, + resp *provider.SchemaResponse, +) { + resp.Schema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "token": schema.StringAttribute{ + Optional: true, + Description: "The token that allows you access to your Linode account", + }, + "config_path": schema.StringAttribute{ + Optional: true, + }, + "config_profile": schema.StringAttribute{ + Optional: true, + }, + "url": schema.StringAttribute{ + Optional: true, + Description: "The HTTP(S) API address of the Linode API to use.", + }, + "ua_prefix": schema.StringAttribute{ + Optional: true, + Description: "An HTTP User-Agent Prefix to prepend in API requests.", + }, + "api_version": schema.StringAttribute{ + Optional: true, + Description: "The version of Linode API.", + }, + "skip_instance_ready_poll": schema.BoolAttribute{ + Optional: true, + Description: "Skip waiting for a linode_instance resource to be running.", + }, + "skip_instance_delete_poll": schema.BoolAttribute{ + Optional: true, + Description: "Skip waiting for a linode_instance resource to finish deleting.", + }, + "disable_internal_cache": schema.BoolAttribute{ + Optional: true, + Description: "Disable the internal caching system that backs certain Linode API requests.", + }, + "min_retry_delay_ms": schema.Int64Attribute{ + Optional: true, + Description: "Minimum delay in milliseconds before retrying a request.", + }, + "max_retry_delay_ms": schema.Int64Attribute{ + Optional: true, + Description: "Maximum delay in milliseconds before retrying a request.", + }, + "event_poll_ms": schema.Int64Attribute{ + Optional: true, + Description: "The rate in milliseconds to poll for events.", + }, + "lke_event_poll_ms": schema.Int64Attribute{ + Optional: true, + Description: "The rate in milliseconds to poll for LKE events.", + }, + "lke_node_ready_poll_ms": schema.Int64Attribute{ + Optional: true, + Description: "The rate in milliseconds to poll for an LKE node to be ready.", + }, + }, + } +} + +func (p *FrameworkProvider) Resources(ctx context.Context) []func() resource.Resource { + return []func() resource.Resource{ + token.NewResource, + } +} + +func (p *FrameworkProvider) DataSources(ctx context.Context) []func() datasource.DataSource { + // return nil + return []func() datasource.DataSource{ + // func() datasource.DataSource { + // return dataSourceExample{} + // }, + } +} diff --git a/linode/framework_provider_config.go b/linode/framework_provider_config.go new file mode 100644 index 000000000..cd02f5379 --- /dev/null +++ b/linode/framework_provider_config.go @@ -0,0 +1,298 @@ +package linode + +import ( + "context" + "fmt" + "log" + "net/http" + "net/url" + "os" + "strconv" + "strings" + "time" + + "github.com/hashicorp/terraform-plugin-framework/diag" + "github.com/hashicorp/terraform-plugin-framework/provider" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-plugin-framework/types/basetypes" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging" + "github.com/linode/linodego" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +func (fp *FrameworkProvider) Configure( + ctx context.Context, + req provider.ConfigureRequest, + resp *provider.ConfigureResponse, +) { + var data FrameworkProviderModel + var meta helper.FrameworkProviderMeta + + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + fp.HandleDefaults(&data, &resp.Diagnostics) + if resp.Diagnostics.HasError() { + return + } + + fp.InitProvider(&data, req.TerraformVersion, &resp.Diagnostics, &meta) + if resp.Diagnostics.HasError() { + return + } + + resp.ResourceData = &meta + resp.DataSourceData = &meta + fp.Meta = &meta +} + +// We should replace this with an official validator if +// HashiCorp decide to implement it in the future +// feature request track: +// https://github.com/hashicorp/terraform-plugin-framework-validators/issues/125 +func (fp *FrameworkProvider) ValidateConfig( + ctx context.Context, + req provider.ValidateConfigRequest, + resp *provider.ValidateConfigResponse, +) { + var data FrameworkProviderModel + + resp.Diagnostics.Append(req.Config.Get(ctx, &data)...) + + if resp.Diagnostics.HasError() { + return + } + + _, err := url.Parse(data.APIURL.ValueString()) + if err != nil { + resp.Diagnostics.AddError( + "Failed to parse the base API URL in the configuration", + err.Error(), + ) + } +} + +func GetIntFromEnv( + key string, + defaultValue basetypes.Int64Value, + diags *diag.Diagnostics, +) basetypes.Int64Value { + envVarVal := os.Getenv(key) + if envVarVal == "" { + return defaultValue + } + + intVal, err := strconv.ParseInt(envVarVal, 10, 64) + if err != nil { + diags.AddWarning( + fmt.Sprintf( + "Failed to parse the environment variable %v "+ + "to an integer. Will use default value: %v instead", + key, + defaultValue.ValueInt64(), + ), + err.Error(), + ) + + return defaultValue + } + + return types.Int64Value(intVal) +} + +func GetStringFromEnv(key string, defaultValue basetypes.StringValue) basetypes.StringValue { + envVarVal := os.Getenv(key) + + if envVarVal == "" { + return defaultValue + } + + return types.StringValue(envVarVal) +} + +func (fp *FrameworkProvider) HandleDefaults( + lpm *FrameworkProviderModel, + diags *diag.Diagnostics, +) { + if lpm.AccessToken.IsNull() { + lpm.AccessToken = GetStringFromEnv("LINODE_TOKEN", types.StringNull()) + } + + if lpm.ConfigPath.IsNull() { + homeDir, err := os.UserHomeDir() + if err != nil { + diags.AddError( + "Failed to get the home directory of the user for the config path.", + err.Error(), + ) + return + } + configPath := fmt.Sprintf("%s/.config/linode", homeDir) + lpm.ConfigPath = types.StringValue(configPath) + } + + if lpm.ConfigProfile.IsNull() { + lpm.ConfigProfile = types.StringValue("default") + } + + if lpm.APIURL.IsNull() { + lpm.APIURL = GetStringFromEnv( + "LINODE_URL", + types.StringValue("https://api.linode.com"), + ) + } + + if lpm.UAPrefix.IsNull() { + lpm.UAPrefix = GetStringFromEnv("LINODE_UA_PREFIX", types.StringNull()) + } + + if lpm.APIVersion.IsNull() { + lpm.APIVersion = GetStringFromEnv( + "LINODE_API_VERSION", + types.StringValue("v4"), + ) + } + + if lpm.SkipInstanceReadyPoll.IsNull() { + lpm.SkipInstanceReadyPoll = types.BoolValue(false) + } + + if lpm.SkipInstanceDeletePoll.IsNull() { + lpm.SkipInstanceDeletePoll = types.BoolValue(false) + } + + if lpm.DisableInternalCache.IsNull() { + lpm.DisableInternalCache = types.BoolValue(false) + } + + if lpm.EventPollMilliseconds.IsNull() { + lpm.EventPollMilliseconds = GetIntFromEnv( + "LINODE_EVENT_POLL_MS", + types.Int64Value(4000), + diags, + ) + } + + if lpm.LKEEventPollMilliseconds.IsNull() { + lpm.LKEEventPollMilliseconds = types.Int64Value(3000) + } + + if lpm.LKENodeReadyPollMilliseconds.IsNull() { + lpm.LKENodeReadyPollMilliseconds = types.Int64Value(3000) + } +} + +func (fp *FrameworkProvider) InitProvider( + lpm *FrameworkProviderModel, + tfVersion string, + diags *diag.Diagnostics, + meta *helper.FrameworkProviderMeta, +) { + loggingTransport := logging.NewSubsystemLoggingHTTPTransport( + "Linode", + http.DefaultTransport, + ) + + oauth2Client := &http.Client{ + Transport: loggingTransport, + } + + accessToken := lpm.AccessToken.ValueString() + APIURL := lpm.APIURL.ValueString() + APIVersion := lpm.APIVersion.ValueString() + UAPrefix := lpm.UAPrefix.ValueString() + + configPath := lpm.ConfigPath.ValueString() + configProfile := lpm.ConfigProfile.ValueString() + + // skipInstanceReadyPoll := lpm.SkipInstanceReadyPoll.ValueBool() + // skipInstanceDeletePoll := lpm.SkipInstanceDeletePoll.ValueBool() + + disableInternalCache := lpm.DisableInternalCache.ValueBool() + + minRetryDelayMilliseconds := lpm.MinRetryDelayMilliseconds.ValueInt64() + maxRetryDelayMilliseconds := lpm.MaxRetryDelayMilliseconds.ValueInt64() + + eventPollMilliseconds := lpm.EventPollMilliseconds.ValueInt64() + // LKENodeReadyPollMilliseconds := lpm.LKEEventPollMilliseconds.ValueInt64() + + client := linodego.NewClient(oauth2Client) + + client.SetBaseURL(DefaultLinodeURL) + + // Load the config file if it exists + if _, err := os.Stat(configPath); err == nil { + log.Println("[INFO] Using Linode profile: ", lpm.ConfigPath) + err = client.LoadConfig(&linodego.LoadConfigOptions{ + Path: configPath, + Profile: configProfile, + }) + if err != nil { + diags.AddError("Error occurs when loading linode profile.", err.Error()) + return + } + } else { + log.Println("[INFO] Linode config does not exist, skipping..") + } + + // Overrides + if accessToken != "" { + client.SetToken(accessToken) + } + + if APIURL != "" { + client.SetBaseURL(APIURL) + } + + if len(APIVersion) > 0 { + client.SetAPIVersion(APIVersion) + } + + client.UseCache(!disableInternalCache) + + if eventPollMilliseconds != 0 { + client.SetPollDelay(time.Duration(eventPollMilliseconds) * time.Millisecond) + } + + if minRetryDelayMilliseconds != 0 { + client.SetRetryWaitTime(time.Duration(minRetryDelayMilliseconds) * time.Millisecond) + } + if maxRetryDelayMilliseconds != 0 { + client.SetRetryMaxWaitTime(time.Duration(maxRetryDelayMilliseconds) * time.Millisecond) + } + + userAgent := fp.terraformUserAgent(tfVersion, UAPrefix) + client.SetUserAgent(userAgent) + + meta.Client = &client +} + +func (fp *FrameworkProvider) terraformUserAgent( + tfVersion string, + UAPrefix string, +) string { + userAgent := strings.TrimSpace( + fmt.Sprintf( + "HashiCorp Terraform/%s (+https://www.terraform.io) "+ + "Terraform-Plugin-SDK/terraform-plugin-framework terraform-provider-linode/%s", + tfVersion, + fp.ProviderVersion, + ), + ) + + if add := os.Getenv(uaEnvVar); add != "" { + add = strings.TrimSpace(add) + if len(add) > 0 { + userAgent += " " + add + log.Printf("[DEBUG] Using modified User-Agent: %s", userAgent) + } + } + + if UAPrefix != "" { + userAgent = UAPrefix + " " + userAgent + } + + return userAgent +} diff --git a/linode/framework_provider_model.go b/linode/framework_provider_model.go new file mode 100644 index 000000000..dbeaff828 --- /dev/null +++ b/linode/framework_provider_model.go @@ -0,0 +1,32 @@ +package linode + +import ( + "github.com/hashicorp/terraform-plugin-framework/types" +) + +const uaEnvVar = "TF_APPEND_USER_AGENT" + +const DefaultLinodeURL = "https://api.linode.com" + +type FrameworkProviderModel struct { + AccessToken types.String `tfsdk:"token"` + APIURL types.String `tfsdk:"url"` + APIVersion types.String `tfsdk:"api_version"` + UAPrefix types.String `tfsdk:"ua_prefix"` + + ConfigPath types.String `tfsdk:"config_path"` + ConfigProfile types.String `tfsdk:"config_profile"` + + SkipInstanceReadyPoll types.Bool `tfsdk:"skip_instance_ready_poll"` + SkipInstanceDeletePoll types.Bool `tfsdk:"skip_instance_delete_poll"` + + DisableInternalCache types.Bool `tfsdk:"disable_internal_cache"` + + MinRetryDelayMilliseconds types.Int64 `tfsdk:"min_retry_delay_ms"` + MaxRetryDelayMilliseconds types.Int64 `tfsdk:"max_retry_delay_ms"` + + EventPollMilliseconds types.Int64 `tfsdk:"event_poll_ms"` + LKEEventPollMilliseconds types.Int64 `tfsdk:"lke_event_poll_ms"` + + LKENodeReadyPollMilliseconds types.Int64 `tfsdk:"lke_node_ready_poll_ms"` +} diff --git a/linode/framework_provider_test.go b/linode/framework_provider_test.go new file mode 100644 index 000000000..b2cd34c62 --- /dev/null +++ b/linode/framework_provider_test.go @@ -0,0 +1 @@ +package linode_test diff --git a/linode/helper/config.go b/linode/helper/config.go index db0023d49..c008479cf 100644 --- a/linode/helper/config.go +++ b/linode/helper/config.go @@ -22,6 +22,10 @@ const uaEnvVar = "TF_APPEND_USER_AGENT" // DefaultLinodeURL is the Linode APIv4 URL to use. const DefaultLinodeURL = "https://api.linode.com" +type FrameworkProviderMeta struct { + Client *linodego.Client +} + type ProviderMeta struct { Client linodego.Client Config *Config diff --git a/linode/helper/conversion.go b/linode/helper/conversion.go index 709c43031..c58af1287 100644 --- a/linode/helper/conversion.go +++ b/linode/helper/conversion.go @@ -1,5 +1,12 @@ package helper +import ( + "fmt" + "strconv" + + "github.com/hashicorp/terraform-plugin-framework/diag" +) + func TypedSliceToAny[T any](obj []T) []any { result := make([]any, len(obj)) @@ -9,3 +16,16 @@ func TypedSliceToAny[T any](obj []T) []any { return result } + +func StringToInt64(s string, diags diag.Diagnostics) int64 { + num, err := strconv.ParseInt(s, 10, 64) + if err != nil { + diags.AddError( + fmt.Sprintf("Invalid number string: %v", s), + err.Error(), + ) + return 0 + } + + return num +} diff --git a/linode/helper/framework_validators.go b/linode/helper/framework_validators.go new file mode 100644 index 000000000..ae6f3d04f --- /dev/null +++ b/linode/helper/framework_validators.go @@ -0,0 +1,47 @@ +package helper + +import ( + "context" + "fmt" + "time" + + "github.com/hashicorp/terraform-plugin-framework-validators/helpers/validatordiag" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" +) + +type DateTimeStringValidator struct { + Format string +} + +func (dtv DateTimeStringValidator) Description(ctx context.Context) string { + return dtv.MarkdownDescription(ctx) +} + +func (dtv DateTimeStringValidator) MarkdownDescription(ctx context.Context) string { + return fmt.Sprintf("value must meet ISO 8601 standard format, e.g., '%s'.", time.RFC3339) +} + +func (dtv DateTimeStringValidator) ValidateString( + ctx context.Context, + request validator.StringRequest, + response *validator.StringResponse, +) { + if request.ConfigValue.IsNull() || request.ConfigValue.IsUnknown() { + return + } + if dtv.Format == "" { + dtv.Format = time.RFC3339 + } + v := request.ConfigValue.ValueString() + if _, err := time.Parse(time.RFC3339, v); err != nil { + response.Diagnostics.Append(validatordiag.InvalidAttributeValueDiagnostic( + request.Path, + dtv.Description(ctx), + v, + )) + } +} + +func NewDateTimeStringValidator(format string) DateTimeStringValidator { + return DateTimeStringValidator{Format: format} +} diff --git a/linode/helper/resource_datasource_config.go b/linode/helper/resource_datasource_config.go new file mode 100644 index 000000000..7f7db0d3a --- /dev/null +++ b/linode/helper/resource_datasource_config.go @@ -0,0 +1,27 @@ +package helper + +import ( + "fmt" + + "github.com/hashicorp/terraform-plugin-framework/resource" +) + +func GetMetaFromProviderData( + req resource.ConfigureRequest, + resp *resource.ConfigureResponse, +) *FrameworkProviderMeta { + meta, ok := req.ProviderData.(*FrameworkProviderMeta) + + if !ok { + resp.Diagnostics.AddError( + "Unexpected Resource Configure Type", + fmt.Sprintf( + "Expected *http.Client, got: %T. Please report this issue to the provider developers.", + req.ProviderData, + ), + ) + return nil + } + + return meta +} diff --git a/linode/provider.go b/linode/provider.go index 09807e32b..4d5c7ffc8 100644 --- a/linode/provider.go +++ b/linode/provider.go @@ -58,7 +58,6 @@ import ( "github.com/linode/terraform-provider-linode/linode/sshkey" "github.com/linode/terraform-provider-linode/linode/stackscript" "github.com/linode/terraform-provider-linode/linode/stackscripts" - "github.com/linode/terraform-provider-linode/linode/token" "github.com/linode/terraform-provider-linode/linode/user" "github.com/linode/terraform-provider-linode/linode/vlan" "github.com/linode/terraform-provider-linode/linode/volume" @@ -95,7 +94,7 @@ func Provider() *schema.Provider { "api_version": { Type: schema.TypeString, Optional: true, - Description: "An HTTP User-Agent Prefix to prepend in API requests.", + Description: "The version of Linode API.", }, "skip_instance_ready_poll": { @@ -215,7 +214,6 @@ func Provider() *schema.Provider { "linode_rdns": rdns.Resource(), "linode_sshkey": sshkey.Resource(), "linode_stackscript": stackscript.Resource(), - "linode_token": token.Resource(), "linode_user": user.Resource(), "linode_volume": volume.Resource(), }, diff --git a/linode/token/framework_resource.go b/linode/token/framework_resource.go new file mode 100644 index 000000000..a44beb84e --- /dev/null +++ b/linode/token/framework_resource.go @@ -0,0 +1,267 @@ +package token + +import ( + "context" + "fmt" + "strconv" + "time" + + "github.com/hashicorp/terraform-plugin-framework/path" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/linode/linodego" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +func NewResource() resource.Resource { + return &Resource{} +} + +type Resource struct { + client *linodego.Client +} + +func (data *ResourceModel) parseToken(token *linodego.Token) { + data.Created = types.StringValue(token.Created.Format(time.RFC3339)) + data.Expiry = types.StringValue(token.Expiry.Format(time.RFC3339)) + data.Label = types.StringValue(token.Label) + data.Scopes = types.StringValue(token.Scopes) + data.Token = types.StringValue(token.Token) + data.ID = types.StringValue(strconv.Itoa(token.ID)) +} + +func (r *Resource) Configure( + ctx context.Context, + req resource.ConfigureRequest, + resp *resource.ConfigureResponse, +) { + // Prevent panic if the provider has not been configured. + if req.ProviderData == nil { + return + } + + meta := helper.GetMetaFromProviderData(req, resp) + if resp.Diagnostics.HasError() { + return + } + + r.client = meta.Client +} + +// ResourceModel describes the Terraform resource data model to match the +// resource schema. +type ResourceModel struct { + Label types.String `tfsdk:"label"` + Scopes types.String `tfsdk:"scopes"` + Expiry types.String `tfsdk:"expiry"` + Created types.String `tfsdk:"created"` + Token types.String `tfsdk:"token"` + ID types.String `tfsdk:"id"` +} + +func (r *Resource) Metadata( + ctx context.Context, + req resource.MetadataRequest, + resp *resource.MetadataResponse, +) { + resp.TypeName = "linode_token" +} + +func (r *Resource) Schema( + ctx context.Context, + req resource.SchemaRequest, + resp *resource.SchemaResponse, +) { + resp.Schema = frameworkResourceSchema +} + +func (r *Resource) ImportState( + ctx context.Context, + req resource.ImportStateRequest, + resp *resource.ImportStateResponse, +) { + resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp) +} + +func (r *Resource) Create( + ctx context.Context, + req resource.CreateRequest, + resp *resource.CreateResponse, +) { + var data ResourceModel + client := r.client + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + expireStr := data.Expiry.ValueString() + dt, err := time.Parse(time.RFC3339, expireStr) + if err != nil { + resp.Diagnostics.AddError( + "Invalid datetime string", + fmt.Sprintf( + "Expected expiry to be an time.RFC3339 datetime string (e.g., %s), got %s", + time.RFC3339, + expireStr, + ), + ) + return + } + + createOpts := linodego.TokenCreateOptions{ + Label: data.Label.ValueString(), + Scopes: data.Scopes.ValueString(), + Expiry: &dt, + } + + token, err := client.CreateToken(ctx, createOpts) + if err != nil { + resp.Diagnostics.AddError( + "Token creation error", + err.Error(), + ) + return + } + + data.parseToken(token) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *Resource) Read( + ctx context.Context, + req resource.ReadRequest, + resp *resource.ReadResponse, +) { + client := r.client + + var data ResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + id := helper.StringToInt64(data.ID.ValueString(), resp.Diagnostics) + if resp.Diagnostics.HasError() { + return + } + + token, err := client.GetToken(ctx, int(id)) + if err != nil { + if lerr, ok := err.(*linodego.Error); ok && lerr.Code == 404 { + resp.Diagnostics.AddWarning( + "Token No Longer Exists", + fmt.Sprintf( + "Removing Linode Token with ID %v from state because it no longer exists", + data.ID, + ), + ) + resp.State.RemoveResource(ctx) + return + } + resp.Diagnostics.AddError( + "Unable to Refresh the Token", + fmt.Sprintf( + "Error finding the specified Linode Token: %s", + err.Error(), + ), + ) + } + + data.parseToken(token) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) +} + +func (r *Resource) Update( + ctx context.Context, + req resource.UpdateRequest, + resp *resource.UpdateResponse, +) { + var data ResourceModel + var tokenIDString string + resp.Diagnostics.Append( + req.State.GetAttribute(ctx, path.Root("id"), &tokenIDString)..., + ) + if resp.Diagnostics.HasError() { + return + } + + resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + tokenID := int(helper.StringToInt64(tokenIDString, resp.Diagnostics)) + if resp.Diagnostics.HasError() { + return + } + + client := r.client + token, err := client.GetToken(ctx, tokenID) + if err != nil { + resp.Diagnostics.AddError( + fmt.Sprintf("Failed to get the token with id %v", tokenID), + err.Error(), + ) + return + } + + updateOpts := token.GetUpdateOptions() + plannedTokenLabel := data.Label.ValueString() + + resourceUpdated := false + + if updateOpts.Label != plannedTokenLabel { + updateOpts.Label = plannedTokenLabel + resourceUpdated = true + } + + if resourceUpdated { + token, err = client.UpdateToken(ctx, token.ID, updateOpts) + + if err != nil { + resp.Diagnostics.AddError( + fmt.Sprintf("Failed to update the token with id %v", tokenID), + err.Error(), + ) + return + } + + data.parseToken(token) + resp.Diagnostics.Append(resp.State.Set(ctx, &data)...) + } +} + +func (r *Resource) Delete( + ctx context.Context, + req resource.DeleteRequest, + resp *resource.DeleteResponse, +) { + var data ResourceModel + + resp.Diagnostics.Append(req.State.Get(ctx, &data)...) + if resp.Diagnostics.HasError() { + return + } + + tokenID := int(helper.StringToInt64(data.ID.ValueString(), resp.Diagnostics)) + if resp.Diagnostics.HasError() { + return + } + + client := r.client + err := client.DeleteToken(ctx, tokenID) + if err != nil { + resp.Diagnostics.AddError( + fmt.Sprintf("Failed to delete the token with id %v", tokenID), + err.Error(), + ) + return + } + + // a settling cooldown to avoid expired tokens from being returned in listings + // may be switched to event poller later + time.Sleep(3 * time.Second) +} diff --git a/linode/token/framework_resource_schema.go b/linode/token/framework_resource_schema.go new file mode 100644 index 000000000..76bbf2b0b --- /dev/null +++ b/linode/token/framework_resource_schema.go @@ -0,0 +1,57 @@ +package token + +import ( + "time" + + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/linode/terraform-provider-linode/linode/helper" +) + +var frameworkResourceSchema = schema.Schema{ + Attributes: map[string]schema.Attribute{ + "label": schema.StringAttribute{ + Description: "The label of the Linode Token.", + Optional: true, + }, + "scopes": schema.StringAttribute{ + Description: "The scopes this token was created with. These define what parts of the Account the " + + "token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with " + + "access to *. Tokens with more restrictive scopes are generally more secure. Multiple scopes are " + + "separated by a space character (e.g., \"databases:read_only events:read_only\"). You can find the " + + "list of available scopes on Linode API docs site, https://www.linode.com/docs/api#oauth-reference", + Required: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + }, + "expiry": schema.StringAttribute{ + Description: "When this token will expire. Personal Access Tokens cannot be renewed, so after " + + "this time the token will be completely unusable and a new token will need to be generated. Tokens " + + "may be created with 'null' as their expiry and will never expire unless revoked. Format: " + + time.RFC3339, + Optional: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.RequiresReplace(), + }, + Validators: []validator.String{ + helper.NewDateTimeStringValidator(time.RFC3339), + }, + }, + "created": schema.StringAttribute{ + Description: "The date and time this token was created.", + Computed: true, + }, + "token": schema.StringAttribute{ + Sensitive: true, + Description: "The token used to access the API.", + Computed: true, + }, + "id": schema.StringAttribute{ + Description: "The ID of the token.", + Computed: true, + }, + }, +} diff --git a/linode/token/resource.go b/linode/token/resource.go deleted file mode 100644 index b6179fd66..000000000 --- a/linode/token/resource.go +++ /dev/null @@ -1,121 +0,0 @@ -package token - -import ( - "context" - "fmt" - "log" - "strconv" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/linode/linodego" - "github.com/linode/terraform-provider-linode/linode/helper" -) - -func Resource() *schema.Resource { - return &schema.Resource{ - Schema: resourceSchema, - ReadContext: readResource, - CreateContext: createResource, - UpdateContext: updateResource, - DeleteContext: deleteResource, - Importer: &schema.ResourceImporter{ - StateContext: schema.ImportStatePassthroughContext, - }, - } -} - -func readResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(*helper.ProviderMeta).Client - id, err := strconv.ParseInt(d.Id(), 10, 64) - if err != nil { - return diag.Errorf("Error parsing Linode Token ID %s as int: %s", d.Id(), err) - } - - token, err := client.GetToken(ctx, int(id)) - if err != nil { - if lerr, ok := err.(*linodego.Error); ok && lerr.Code == 404 { - log.Printf("[WARN] removing Linode Token ID %q from state because it no longer exists", d.Id()) - d.SetId("") - return nil - } - return diag.Errorf("Error finding the specified Linode Token: %s", err) - } - - d.Set("label", token.Label) - d.Set("scopes", token.Scopes) - d.Set("created", token.Created.Format(time.RFC3339)) - d.Set("expiry", token.Expiry.Format(time.RFC3339)) - - return nil -} - -func createResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(*helper.ProviderMeta).Client - - createOpts := linodego.TokenCreateOptions{ - Label: d.Get("label").(string), - Scopes: d.Get("scopes").(string), - } - - if expiryRaw, ok := d.GetOk("expiry"); ok { - if expiry, ok := expiryRaw.(string); !ok { - return diag.Errorf("expected expiry to be a string, got %s", expiryRaw) - } else if dt, err := time.Parse("2006-01-02T15:04:05Z", expiry); err != nil { - return diag.Errorf("expected expiry to be a datetime, got %s", expiry) - } else { - createOpts.Expiry = &dt - } - } - - token, err := client.CreateToken(ctx, createOpts) - if err != nil { - return diag.Errorf("Error creating a Linode Token: %s", err) - } - d.SetId(fmt.Sprintf("%d", token.ID)) - d.Set("token", token.Token) - - return readResource(ctx, d, meta) -} - -func updateResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(*helper.ProviderMeta).Client - - id, err := strconv.ParseInt(d.Id(), 10, 64) - if err != nil { - return diag.Errorf("Error parsing Linode Token id %s as int: %s", d.Id(), err) - } - - token, err := client.GetToken(ctx, int(id)) - if err != nil { - return diag.Errorf("Error fetching data about the current linode: %s", err) - } - - updateOpts := token.GetUpdateOptions() - if d.HasChange("label") { - updateOpts.Label = d.Get("label").(string) - - if token, err = client.UpdateToken(ctx, token.ID, updateOpts); err != nil { - return diag.FromErr(err) - } - d.Set("label", token.Label) - } - - return readResource(ctx, d, meta) -} - -func deleteResource(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - client := meta.(*helper.ProviderMeta).Client - id, err := strconv.ParseInt(d.Id(), 10, 64) - if err != nil { - return diag.Errorf("Error parsing Linode Token id %s as int", d.Id()) - } - err = client.DeleteToken(ctx, int(id)) - if err != nil { - return diag.Errorf("Error deleting Linode Token %d: %s", id, err) - } - // a settling cooldown to avoid expired tokens from being returned in listings - time.Sleep(3 * time.Second) - return nil -} diff --git a/linode/token/resource_test.go b/linode/token/resource_test.go index 46283234d..fa51f7cbc 100644 --- a/linode/token/resource_test.go +++ b/linode/token/resource_test.go @@ -11,7 +11,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/linode/linodego" "github.com/linode/terraform-provider-linode/linode/acceptance" - "github.com/linode/terraform-provider-linode/linode/helper" "github.com/linode/terraform-provider-linode/linode/token/tmpl" ) @@ -53,9 +52,9 @@ func TestAccResourceToken_basic(t *testing.T) { tokenName := acctest.RandomWithPrefix("tf_test") resource.Test(t, resource.TestCase{ - PreCheck: func() { acceptance.PreCheck(t) }, - Providers: acceptance.TestAccProviders, - CheckDestroy: checkTokenDestroy, + PreCheck: func() { acceptance.PreCheck(t) }, + CheckDestroy: checkTokenDestroy, + ProtoV5ProviderFactories: acceptance.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { Config: tmpl.Basic(t, tokenName), @@ -85,7 +84,7 @@ func TestAccResourceToken_basic(t *testing.T) { } func checkTokenExists(s *terraform.State) error { - client := acceptance.TestAccProvider.Meta().(*helper.ProviderMeta).Client + client := acceptance.TestAccFrameworkProvider.Meta.Client for _, rs := range s.RootModule().Resources { if rs.Type != "linode_token" { @@ -107,7 +106,7 @@ func checkTokenExists(s *terraform.State) error { } func checkTokenDestroy(s *terraform.State) error { - client := acceptance.TestAccProvider.Meta().(*helper.ProviderMeta).Client + client := acceptance.TestAccFrameworkProvider.Meta.Client for _, rs := range s.RootModule().Resources { if rs.Type != "linode_token" { continue diff --git a/linode/token/schema_resource.go b/linode/token/schema_resource.go deleted file mode 100644 index f13e59486..000000000 --- a/linode/token/schema_resource.go +++ /dev/null @@ -1,71 +0,0 @@ -package token - -import ( - "fmt" - "log" - "time" - - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" -) - -var resourceSchema = map[string]*schema.Schema{ - "label": { - Type: schema.TypeString, - Description: "The label of the Linode Token.", - Optional: true, - }, - "scopes": { - Type: schema.TypeString, - Description: "The scopes this token was created with. These define what parts of the Account the " + - "token can be used to access. Many command-line tools, such as the Linode CLI, require tokens with " + - "access to *. Tokens with more restrictive scopes are generally more secure.", - Required: true, - ForceNew: true, - }, - "expiry": { - Type: schema.TypeString, - Description: "When this token will expire. Personal Access Tokens cannot be renewed, so after " + - "this time the token will be completely unusable and a new token will need to be generated. Tokens " + - "may be created with 'null' as their expiry and will never expire unless revoked.", - Optional: true, - ValidateFunc: validDateTime, - ForceNew: true, - DiffSuppressFunc: equivalentDate, - }, - "created": { - Type: schema.TypeString, - Description: "The date and time this token was created.", - Computed: true, - }, - "token": { - Type: schema.TypeString, - Sensitive: true, - Description: "The token used to access the API.", - Computed: true, - }, -} - -func equivalentDate(k, old, new string, d *schema.ResourceData) bool { - if dtOld, err := time.Parse("2006-01-02T15:04:05", old); err != nil { - log.Printf("[WARN] could not parse date %s: %s", old, err) - return false - } else if dtNew, err := time.Parse("2006-01-02T15:04:05", new); err != nil { - log.Printf("[WARN] could not parse date %s: %s", new, err) - return false - } else { - return dtOld.Equal(dtNew) - } -} - -func validDateTime(i interface{}, k string) (s []string, es []error) { - v, ok := i.(string) - if !ok { - es = append(es, fmt.Errorf("expected type of %s to be string", k)) - return - } - if _, err := time.Parse("2006-01-02T15:04:05Z", v); err != nil { - es = append(es, fmt.Errorf("expected %s to be a datetime, got %s", k, v)) - } - - return -} diff --git a/main.go b/main.go index f63cb7b45..3051f7039 100644 --- a/main.go +++ b/main.go @@ -1,12 +1,51 @@ package main import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" + "context" + "flag" + "log" + + "github.com/hashicorp/terraform-plugin-framework/providerserver" + "github.com/hashicorp/terraform-plugin-go/tfprotov5" + "github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server" + "github.com/hashicorp/terraform-plugin-mux/tf5muxserver" "github.com/linode/terraform-provider-linode/linode" + "github.com/linode/terraform-provider-linode/version" ) func main() { - plugin.Serve(&plugin.ServeOpts{ - ProviderFunc: linode.Provider, - }) + ctx := context.Background() + + var debug bool + + flag.BoolVar(&debug, "debug", false, "set to true to run the provider with support for debuggers like delve") + flag.Parse() + + providers := []func() tfprotov5.ProviderServer{ + providerserver.NewProtocol5( + linode.CreateFrameworkProvider(version.ProviderVersion), + ), + linode.Provider().GRPCProvider, + } + + muxServer, err := tf5muxserver.NewMuxServer(ctx, providers...) + if err != nil { + log.Fatal(err) + } + + var serveOpts []tf5server.ServeOpt + + if debug { + serveOpts = append(serveOpts, tf5server.WithManagedDebug()) + } + + err = tf5server.Serve( + "registry.terraform.io/linode/linode", + muxServer.ProviderServer, + serveOpts..., + ) + + if err != nil { + log.Fatal(err) + } } From 0d4157f7296f3f2a661ee3a73c843b36e597fa23 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com> Date: Tue, 25 Apr 2023 12:39:41 -0400 Subject: [PATCH 42/44] Framework Provider Improvement 1 (#795) * Set default url to the constant default value * Add simple test cases * Update provider type to be ProviderWithValidateConfig * Fix test name * Disable AT004 tflint locally because explicitly needed --- linode/framework_provider.go | 2 +- linode/framework_provider_config.go | 4 +-- linode/framework_provider_test.go | 50 +++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/linode/framework_provider.go b/linode/framework_provider.go index 40750585b..a3b6664ab 100644 --- a/linode/framework_provider.go +++ b/linode/framework_provider.go @@ -16,7 +16,7 @@ type FrameworkProvider struct { Meta *helper.FrameworkProviderMeta } -func CreateFrameworkProvider(version string) provider.Provider { +func CreateFrameworkProvider(version string) provider.ProviderWithValidateConfig { return &FrameworkProvider{ ProviderVersion: version, } diff --git a/linode/framework_provider_config.go b/linode/framework_provider_config.go index cd02f5379..405910070 100644 --- a/linode/framework_provider_config.go +++ b/linode/framework_provider_config.go @@ -140,7 +140,7 @@ func (fp *FrameworkProvider) HandleDefaults( if lpm.APIURL.IsNull() { lpm.APIURL = GetStringFromEnv( "LINODE_URL", - types.StringValue("https://api.linode.com"), + types.StringValue(DefaultLinodeURL), ) } @@ -220,8 +220,6 @@ func (fp *FrameworkProvider) InitProvider( client := linodego.NewClient(oauth2Client) - client.SetBaseURL(DefaultLinodeURL) - // Load the config file if it exists if _, err := os.Stat(configPath); err == nil { log.Println("[INFO] Using Linode profile: ", lpm.ConfigPath) diff --git a/linode/framework_provider_test.go b/linode/framework_provider_test.go index b2cd34c62..8bcf9d39d 100644 --- a/linode/framework_provider_test.go +++ b/linode/framework_provider_test.go @@ -1 +1,51 @@ package linode_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/linode/terraform-provider-linode/linode" + "github.com/linode/terraform-provider-linode/linode/acceptance" +) + +func TestCreatingFrameworkProvider(t *testing.T) { + _ = linode.CreateFrameworkProvider("test") +} + +func TestAccFrameworkProvider_AlternativeEndpoint(t *testing.T) { + t.Parallel() + + resource.Test(t, resource.TestCase{ + ProtoV5ProviderFactories: acceptance.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: alternativeAPIURLTemplate( + "https://api.linode.com", + "v4_cooler_version", + ), + }, + }, + }, + ) +} + +func alternativeAPIURLTemplate( + url string, + apiVersion string, +) string { + return fmt.Sprintf(` +terraform { + required_providers { + linode = { + source = "linode/linode" + } + } +} + +provider "linode" { + url = "%s" + api_version = "%s" +} +`, url, apiVersion) //lintignore:AT004 +} From 9c30c7e135e999b2c131c6a58a8bdfb4affa2461 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 13:00:59 -0400 Subject: [PATCH 43/44] build(deps): bump github.com/hashicorp/terraform-plugin-go from 0.14.3 to 0.15.0 (#796) * build(deps): bump github.com/hashicorp/terraform-plugin-go Bumps [github.com/hashicorp/terraform-plugin-go](https://github.com/hashicorp/terraform-plugin-go) from 0.14.3 to 0.15.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-go/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-go/compare/v0.14.3...v0.15.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update go to 1.19 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zhiwei Liang --- .github/workflows/integration_tests.yml | 2 +- .github/workflows/integration_tests_pr.yml | 2 +- .github/workflows/pull_request.yml | 2 +- .github/workflows/release.yml | 2 +- go.mod | 25 ++++++------ go.sum | 46 ++++++++++------------ tools/go.mod | 2 +- 7 files changed, 39 insertions(+), 42 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 06c051475..2f0def42e 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: '1.19' - run: go version - run: make testacc env: diff --git a/.github/workflows/integration_tests_pr.yml b/.github/workflows/integration_tests_pr.yml index 3dda4497a..65afea93c 100644 --- a/.github/workflows/integration_tests_pr.yml +++ b/.github/workflows/integration_tests_pr.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: '1.19' - run: go version - uses: actions-ecosystem/action-regex-match@v2 id: validate-pkg diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b183adee5..c28dc8721 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -7,7 +7,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '1.18' + go-version: '1.19' - run: go version - run: make tooldeps diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15f5fe657..5178fc38f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.18 + go-version: 1.19 - name: Import GPG key id: import_gpg uses: paultyng/ghaction-import-gpg@53deb67fe3b05af114ad9488a4da7b782455d588 # pin@v2.1.0 diff --git a/go.mod b/go.mod index b25d37f91..f4d4e8df8 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,11 @@ require ( golang.org/x/crypto v0.8.0 ) +require ( + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect +) + require ( github.com/agext/levenshtein v1.2.2 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect @@ -26,7 +31,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.8 // indirect + github.com/hashicorp/go-plugin v1.4.9 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/hc-install v0.5.0 // indirect @@ -36,11 +41,11 @@ require ( github.com/hashicorp/terraform-json v0.16.0 // indirect github.com/hashicorp/terraform-plugin-framework v1.2.0 github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 - github.com/hashicorp/terraform-plugin-go v0.14.3 + github.com/hashicorp/terraform-plugin-go v0.15.0 github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect github.com/hashicorp/terraform-plugin-mux v0.9.0 - github.com/hashicorp/terraform-registry-address v0.1.0 // indirect - github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect + github.com/hashicorp/terraform-registry-address v0.2.0 // indirect + github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -57,20 +62,18 @@ require ( github.com/oklog/run v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/zclconf/go-cty v1.13.1 // indirect golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.9.0 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/term v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 // indirect - google.golang.org/grpc v1.51.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + google.golang.org/grpc v1.54.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -86,4 +89,4 @@ require ( sigs.k8s.io/yaml v1.2.0 // indirect ) -go 1.18 +go 1.19 diff --git a/go.sum b/go.sum index 4eb6d8b42..991cd2ad3 100644 --- a/go.sum +++ b/go.sum @@ -70,7 +70,6 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= @@ -237,7 +236,6 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= @@ -247,12 +245,11 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= -github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.9 h1:ESiK220/qE0aGxWdzKIvRH69iLiuN/PjoLTm69RoWtU= +github.com/hashicorp/go-plugin v1.4.9/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -271,18 +268,18 @@ github.com/hashicorp/terraform-plugin-framework v1.2.0 h1:MZjFFfULnFq8fh04FqrKPc github.com/hashicorp/terraform-plugin-framework v1.2.0/go.mod h1:nToI62JylqXDq84weLJ/U3umUsBhZAaTmU0HXIVUOcw= github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 h1:4L0tmy/8esP6OcvocVymw52lY0HyQ5OxB7VNl7k4bS0= github.com/hashicorp/terraform-plugin-framework-validators v0.10.0/go.mod h1:qdQJCdimB9JeX2YwOpItEu+IrfoJjWQ5PhLpAOMDQAE= -github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= -github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= +github.com/hashicorp/terraform-plugin-go v0.15.0 h1:1BJNSUFs09DS8h/XNyJNJaeusQuWc/T9V99ylU9Zwp0= +github.com/hashicorp/terraform-plugin-go v0.15.0/go.mod h1:tk9E3/Zx4RlF/9FdGAhwxHExqIHHldqiQGt20G6g+nQ= github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= github.com/hashicorp/terraform-plugin-mux v0.9.0 h1:a2Xh63cunDB/1GZECrV02cGA74AhQGUjY9X8W3P/L7k= github.com/hashicorp/terraform-plugin-mux v0.9.0/go.mod h1:8NUFbgeMigms7Tma/r2Vgi5Jv5mPv4xcJ05pJtIOhwc= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= -github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= -github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= -github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= +github.com/hashicorp/terraform-registry-address v0.2.0 h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s= +github.com/hashicorp/terraform-registry-address v0.2.0/go.mod h1:478wuzJPzdmqT6OGbB/iH82EDcI8VFM4yujknh/1nIs= +github.com/hashicorp/terraform-svchost v0.0.1 h1:Zj6fR5wnpOHnJUmLyWozjMeDaVuE+cstMPj41/eKmSQ= +github.com/hashicorp/terraform-svchost v0.0.1/go.mod h1:ut8JaH0vumgdCfJaihdcZULqkAwHdQNwNH7taIDdsZM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -322,7 +319,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 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/linode/linodego v0.20.1/go.mod h1:XOWXRHjqeU2uPS84tKLgfWIfTlv3TYzCS0io4GOQzEI= github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= @@ -414,11 +410,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -427,7 +422,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.13.1 h1:0a6bRwuiSHtAmqCqNOE+c2oHgepv0ctoxU4FUe43kwc= github.com/zclconf/go-cty v1.13.1/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -495,7 +489,6 @@ golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -510,7 +503,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -553,8 +545,9 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -778,8 +771,9 @@ google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1 h1:E7wSQBXkH3T3diucK+9Z1kjn4+/9tNG7lZLr75oOhh8= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -798,8 +792,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -813,8 +807,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/tools/go.mod b/tools/go.mod index e1dc67806..7293090b7 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/linode/terraform-provider-linode/tools -go 1.18 +go 1.19 require ( github.com/bflad/tfproviderlint v0.28.1 From 241cd326c1ea167aac0deb53ec0e788e74d8639b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 13:12:50 -0400 Subject: [PATCH 44/44] build(deps): bump github.com/hashicorp/terraform-plugin-mux (#797) Bumps [github.com/hashicorp/terraform-plugin-mux](https://github.com/hashicorp/terraform-plugin-mux) from 0.9.0 to 0.10.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-mux/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-mux/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-mux/compare/v0.9.0...v0.10.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-mux dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f4d4e8df8..ca212b99c 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 github.com/hashicorp/terraform-plugin-go v0.15.0 github.com/hashicorp/terraform-plugin-log v0.8.0 // indirect - github.com/hashicorp/terraform-plugin-mux v0.9.0 + github.com/hashicorp/terraform-plugin-mux v0.10.0 github.com/hashicorp/terraform-registry-address v0.2.0 // indirect github.com/hashicorp/terraform-svchost v0.0.1 // indirect github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect diff --git a/go.sum b/go.sum index 991cd2ad3..2accc11dc 100644 --- a/go.sum +++ b/go.sum @@ -272,8 +272,8 @@ github.com/hashicorp/terraform-plugin-go v0.15.0 h1:1BJNSUFs09DS8h/XNyJNJaeusQuW github.com/hashicorp/terraform-plugin-go v0.15.0/go.mod h1:tk9E3/Zx4RlF/9FdGAhwxHExqIHHldqiQGt20G6g+nQ= github.com/hashicorp/terraform-plugin-log v0.8.0 h1:pX2VQ/TGKu+UU1rCay0OlzosNKe4Nz1pepLXj95oyy0= github.com/hashicorp/terraform-plugin-log v0.8.0/go.mod h1:1myFrhVsBLeylQzYYEV17VVjtG8oYPRFdaZs7xdW2xs= -github.com/hashicorp/terraform-plugin-mux v0.9.0 h1:a2Xh63cunDB/1GZECrV02cGA74AhQGUjY9X8W3P/L7k= -github.com/hashicorp/terraform-plugin-mux v0.9.0/go.mod h1:8NUFbgeMigms7Tma/r2Vgi5Jv5mPv4xcJ05pJtIOhwc= +github.com/hashicorp/terraform-plugin-mux v0.10.0 h1:VejY1BffxGy2iYOaa8DDHavY4k9jbvAE8F3lhruspKY= +github.com/hashicorp/terraform-plugin-mux v0.10.0/go.mod h1:9sdnpmY20xIsl4ItsfODZYE+MgpSy/osXpSf+RwaZCY= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1 h1:G9WAfb8LHeCxu7Ae8nc1agZlQOSCUWsb610iAogBhCs= github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1/go.mod h1:xcOSYlRVdPLmDUoqPhO9fiO/YCN/l6MGYeTzGt5jgkQ= github.com/hashicorp/terraform-registry-address v0.2.0 h1:92LUg03NhfgZv44zpNTLBGIbiyTokQCDcdH5BhVHT3s=