From 44838443ebc25b08b5cda90f89ef6eda50afffc5 Mon Sep 17 00:00:00 2001 From: Tomer Heber Date: Thu, 17 Aug 2023 03:07:38 -0500 Subject: [PATCH] Chore: improve integration tests output and reduce noise (#693) --- DEVELOPMENT.md | 41 +-- env0/credentials.go | 12 +- env0/data_environment.go | 2 +- env0/errors.go | 7 +- env0/provider.go | 21 +- env0/resource_agent_project_assignment.go | 4 +- env0/resource_api_key.go | 12 +- env0/resource_approval_policy.go | 14 +- env0/resource_approval_policy_assignment.go | 6 +- ...ce_cloud_credentials_project_assignment.go | 4 +- env0/resource_configuration_variable.go | 2 +- env0/resource_cost_credentials.go | 2 +- env0/resource_custom_flow.go | 12 +- env0/resource_custom_flow_assignment.go | 4 +- env0/resource_custom_role.go | 12 +- env0/resource_drift_detection.go | 4 +- env0/resource_environment.go | 21 +- env0/resource_environment_state_access.go | 2 +- env0/resource_git_token.go | 12 +- env0/resource_gpg_key.go | 12 +- env0/resource_module.go | 12 +- env0/resource_notification.go | 12 +- ...esource_notification_project_assignment.go | 6 +- env0/resource_project.go | 8 +- env0/resource_provider.go | 12 +- env0/resource_sshkey.go | 9 +- env0/resource_team.go | 9 +- env0/resource_team_environment_assignment.go | 4 +- env0/resource_team_project_assignment.go | 4 +- env0/resource_template.go | 9 +- env0/resource_template_project_assignment.go | 6 +- env0/resource_user_environment_assignment.go | 4 +- env0/resource_user_organization_assignment.go | 4 +- env0/resource_user_project_assignment.go | 4 +- env0/resource_user_team_assignment.go | 6 +- env0/resource_workflow_trigger.go | 4 +- go.mod | 68 ++--- go.sum | 265 ++++++++---------- tests/harness.go | 13 +- 39 files changed, 327 insertions(+), 338 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a68697bb..ada86c09 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -4,20 +4,21 @@ This document intends to give guidelines for developing new resources for the en ## Project Structure -* client - Contains code for using the [env0 API](https://developer.env0.com/docs/api) + unit tests. -* env0 - Contains code that implements the env0 Terraform "resources" and "data" + acceptance tests. -* docs - Contains auto-generated md files derived from the "resources" and "data" go files. Deployed as part of the terraform provider documentation. -* tests - Contains integration tests (executed by harness.go). -* examples - Contains examples files for resources and data. Deployed as part of the documentation. Deployed as part of the terraform provider documentation. +- client - Contains code for using the [env0 API](https://developer.env0.com/docs/api) + unit tests. +- env0 - Contains code that implements the env0 Terraform "resources" and "data" + acceptance tests. +- docs - Contains auto-generated md files derived from the "resources" and "data" go files. Deployed as part of the terraform provider documentation. +- tests - Contains integration tests (executed by harness.go). +- examples - Contains examples files for resources and data. Deployed as part of the documentation. Deployed as part of the terraform provider documentation. ## Client The first step to adding a new resource is implementing the client API calls under the folder client. Review the API documentation. And pay attention to the following details: -* URL Path (path parameters) and HTTP method (GET, POST, PUT, PATCH, etc...). -* Request Body (pay special attention to required fields). -* Response Body. + +- URL Path (path parameters) and HTTP method (GET, POST, PUT, PATCH, etc...). +- Request Body (pay special attention to required fields). +- Response Body. The env0 website uses the API as well. Therefore, if examples are required. The easiest way to understand the API is to make the calls from the GUI itself. Use Chrome developer tools and review the relevant API requests and responses. @@ -36,9 +37,10 @@ After the client API calls are implemented, the next step is implementing the re Create a new file under the env0 directory. Use existing implementations as templates for implementing the new resource. Check [resource_module.go](./env0/resource_module.go) for reference. Start by defining the schema. Use the API documentation to identify: -* what fields are required vs. optional. -* what fields require custom validators (see existing [validators](./env0/validators.go)) -* what fields force a new resource if modified. + +- what fields are required vs. optional. +- what fields require custom validators (see existing [validators](./env0/validators.go)) +- what fields force a new resource if modified. For all resources: CreateContext, ReadContext and DeleteContext are required. Most resources also implement UpdateContext and Importer (for imports). @@ -59,8 +61,9 @@ The writeResourceData function receives a golang struct and a Terraform configur Check [resource_module.go](./env0/resource_module.go) that uses the utilities vs [resource_environment.go](./env0/resource_environment.go) that does not. Pay attention to the following caveats: -* The golang fields are in CamalCase, while the terraform fields are in snake_case. They must match. E.g., ProjectName (golang) == project_name (Terraform). To override the default CamalCase to snake_case conversion you may use the tag `tfschema`. To ignore a field set the `tfschema` tag value to `-`. -* In some cases if a field's value is empty (string: "", boolean: false, int: 0) it may be desired to ignore it. To apply this behavior add `omitempty` to the tfschema tag. + +- The golang fields are in CamalCase, while the terraform fields are in snake_case. They must match. E.g., ProjectName (golang) == project_name (Terraform). To override the default CamalCase to snake_case conversion you may use the tag `tfschema`. To ignore a field set the `tfschema` tag value to `-`. +- In some cases if a field's value is empty (string: "", boolean: false, int: 0) it may be desired to ignore it. To apply this behavior add `omitempty` to the tfschema tag. #### writeResourceDataSlice @@ -82,7 +85,7 @@ apiClient := meta.(client.ApiClientInterface) module, err := apiClient.Module(d.Id()) if err != nil { - return ResourceGetFailure("module", d, err) + return ResourceGetFailure(ctx, "module", d, err) } . @@ -91,7 +94,7 @@ if err != nil { func ResourceGetFailure(resourceName string, d *schema.ResourceData, err error) diag.Diagnostics { if frerr, ok := err.(*http.FailedResponseError); ok && frerr.NotFound() { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -110,6 +113,7 @@ Check [data_gcp_credentials.go](./env0/data_gcp_credentials.go) for an example. Finally create acceptance tests for data. Check [data_gcp_credentials_test.go](./env0/data_gcp_credentials_test.go) for an example. **Note** In most cases, data is calculated by name or id. Names may not be unique. If searching by name and more than one resource is returned, it's considered an error. + ``` func getGcpCredentialsByName(name interface{}, meta interface{}) (client.Credentials, diag.Diagnostics) { apiClient := meta.(client.ApiClientInterface) @@ -141,9 +145,10 @@ If applicable, create an integration test for the new resource and data. The folder tests/integration contains a list of folders. One folder for each resource. Each numbered resource folder contains the following files: -* conf.tf - The provider configuration. In most cases, this doesn't change. -* main.tf - The terraform instructions to run. -* expected_outputs.json - The Terraform outputs (using the `output` Terraform functionality). + +- conf.tf - The provider configuration. In most cases, this doesn't change. +- main.tf - The terraform instructions to run. +- expected_outputs.json - The Terraform outputs (using the `output` Terraform functionality). Note: if there is no expected output, set expected_outputs.json contents to `{}`. diff --git a/env0/credentials.go b/env0/credentials.go index a39667cf..539f34c7 100644 --- a/env0/credentials.go +++ b/env0/credentials.go @@ -4,10 +4,10 @@ import ( "context" "errors" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -75,13 +75,13 @@ func getCredentialsById(id string, prefixList []string, meta interface{}) (clien return credentials, nil } -func getCredentials(id string, prefixList []string, meta interface{}) (client.Credentials, error) { +func getCredentials(ctx context.Context, id string, prefixList []string, meta interface{}) (client.Credentials, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving credentials by id: ", id) + tflog.Info(ctx, "Resolving credentials by id", map[string]interface{}{"id": id}) return getCredentialsById(id, prefixList, meta) } else { - log.Println("[INFO] Resolving credentials by name: ", id) + tflog.Info(ctx, "Resolving credentials by name", map[string]interface{}{"name": id}) return getCredentialsByName(id, prefixList, meta) } } @@ -103,7 +103,7 @@ func resourceCredentialsRead(cloudType CloudType) schema.ReadContextFunc { credentials, err := apiClient.CloudCredentials(d.Id()) if err != nil { - return ResourceGetFailure(string(cloudType)+" credentials", d, err) + return ResourceGetFailure(ctx, string(cloudType)+" credentials", d, err) } if err := writeResourceData(&credentials, d); err != nil { @@ -116,7 +116,7 @@ func resourceCredentialsRead(cloudType CloudType) schema.ReadContextFunc { func resourceCredentialsImport(cloudType CloudType) schema.StateContextFunc { return func(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - credentials, err := getCredentials(d.Id(), credentialsTypeToPrefixList[cloudType], meta) + credentials, err := getCredentials(ctx, d.Id(), credentialsTypeToPrefixList[cloudType], meta) if err != nil { if _, ok := err.(*client.NotFoundError); ok { return nil, fmt.Errorf(string(cloudType)+" credentials resource with id %v not found", d.Id()) diff --git a/env0/data_environment.go b/env0/data_environment.go index f7d47ae7..d5cf510b 100644 --- a/env0/data_environment.go +++ b/env0/data_environment.go @@ -120,7 +120,7 @@ func dataEnvironmentRead(ctx context.Context, d *schema.ResourceData, meta inter } } - setEnvironmentSchema(d, environment, client.ConfigurationChanges{}) + setEnvironmentSchema(ctx, d, environment, client.ConfigurationChanges{}) templateId := environment.LatestDeploymentLog.BlueprintId diff --git a/env0/errors.go b/env0/errors.go index 9638afda..0df19189 100644 --- a/env0/errors.go +++ b/env0/errors.go @@ -1,10 +1,11 @@ package env0 import ( - "log" + "context" "github.com/env0/terraform-provider-env0/client" "github.com/env0/terraform-provider-env0/client/http" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -21,9 +22,9 @@ func driftDetected(err error) bool { return false } -func ResourceGetFailure(resourceName string, d *schema.ResourceData, err error) diag.Diagnostics { +func ResourceGetFailure(ctx context.Context, resourceName string, d *schema.ResourceData, err error) diag.Diagnostics { if driftDetected(err) { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/provider.go b/env0/provider.go index 2ce4ee8f..d0f693ec 100644 --- a/env0/provider.go +++ b/env0/provider.go @@ -2,13 +2,13 @@ package env0 import ( "context" - "log" "os" "time" "github.com/env0/terraform-provider-env0/client" "github.com/env0/terraform-provider-env0/client/http" "github.com/go-resty/resty/v2" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" @@ -155,26 +155,37 @@ func configureProvider(version string, p *schema.Provider) schema.ConfigureConte isIntegrationTest = true } - restyClient. + subCtx := tflog.NewSubsystem(ctx, "env0_api_client") + + restyClient = restyClient. SetRetryCount(5). SetRetryWaitTime(time.Second). SetRetryMaxWaitTime(time.Second * 5). + OnBeforeRequest(func(c *resty.Client, r *resty.Request) error { + tflog.SubsystemInfo(subCtx, "env0_api_client", "Sending request", map[string]interface{}{"method": r.Method, "url": r.URL}) + return nil + }). + OnAfterResponse(func(c *resty.Client, r *resty.Response) error { + tflog.SubsystemInfo(subCtx, "env0_api_client", "Received respose", map[string]interface{}{"method": r.Request.Method, "url": r.Request.URL, "status": r.Status()}) + return nil + }). + AddRetryAfterErrorCondition(). AddRetryCondition(func(r *resty.Response, err error) bool { if r == nil { // No response. Possiblly a networking issue (E.g. DNS lookup failure). - log.Printf("[WARN] No response, retrying request: %s %s", r.Request.Method, r.Request.URL) + tflog.SubsystemWarn(subCtx, "env0_api_client", "No response, retrying request", map[string]interface{}{"method": r.Request.Method, "url": r.Request.URL}) return true } // When running integration tests 404 may occur due to "database eventual consistency". // Retry when there's a 5xx error. Otherwise do not retry. if r.StatusCode() >= 500 || (isIntegrationTest && r.StatusCode() == 404) { - log.Printf("[WARN] Received %d status code, retrying request: %s %s", r.StatusCode(), r.Request.Method, r.Request.URL) + tflog.SubsystemWarn(subCtx, "env0_api_client", "Received a failed or not found response, retrying request", map[string]interface{}{"method": r.Request.Method, "url": r.Request.URL, "status code": r.StatusCode()}) return true } if r.StatusCode() == 200 && isIntegrationTest && r.String() == "[]" { - log.Printf("[WARN] Received an empty list for an integration test, retrying request: %s %s", r.Request.Method, r.Request.URL) + tflog.SubsystemWarn(subCtx, "env0_api_client", "Received an empty list , retrying request", map[string]interface{}{"method": r.Request.Method, "url": r.Request.URL}) return true } diff --git a/env0/resource_agent_project_assignment.go b/env0/resource_agent_project_assignment.go index ffa88a46..d464fba4 100644 --- a/env0/resource_agent_project_assignment.go +++ b/env0/resource_agent_project_assignment.go @@ -3,11 +3,11 @@ package env0 import ( "context" "fmt" - "log" "strings" "sync" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -112,7 +112,7 @@ func resourceAgentProjectAssignmentRead(ctx context.Context, d *schema.ResourceD } if assignment == nil { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_api_key.go b/env0/resource_api_key.go index 9b108225..41b41350 100644 --- a/env0/resource_api_key.go +++ b/env0/resource_api_key.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -88,7 +88,7 @@ func resourceApiKeyRead(ctx context.Context, d *schema.ResourceData, meta interf return diag.Errorf("could not get api key: %v", err) } if apiKey == nil { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -153,19 +153,19 @@ func getApiKeyByName(name string, meta interface{}) (*client.ApiKey, error) { return &foundApiKeys[0], nil } -func getApiKey(id string, meta interface{}) (*client.ApiKey, error) { +func getApiKey(ctx context.Context, id string, meta interface{}) (*client.ApiKey, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving api key by id: ", id) + tflog.Info(ctx, "Resolving api key by id", map[string]interface{}{"id": id}) return getApiKeyById(id, meta) } else { - log.Println("[INFO] Resolving api key by name: ", id) + tflog.Info(ctx, "Resolving api key by name", map[string]interface{}{"name": id}) return getApiKeyByName(id, meta) } } func resourceApiKeyImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - apiKey, err := getApiKey(d.Id(), meta) + apiKey, err := getApiKey(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_approval_policy.go b/env0/resource_approval_policy.go index 28d1a6eb..8161bf3c 100644 --- a/env0/resource_approval_policy.go +++ b/env0/resource_approval_policy.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -49,11 +49,11 @@ func resourceApprovalPolicyRead(ctx context.Context, d *schema.ResourceData, met approvalPolicy, err := apiClient.Template(d.Id()) if err != nil { - return ResourceGetFailure("approval policy", d, err) + return ResourceGetFailure(ctx, "approval policy", d, err) } if approvalPolicy.IsDeleted && !d.IsNewResource() { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -112,9 +112,9 @@ func getApprovalPolicyByName(name string, meta interface{}) (*client.ApprovalPol return &approvalPolicies[0], nil } -func getApprovalPolicy(id string, meta interface{}) (interface{}, error) { +func getApprovalPolicy(ctx context.Context, id string, meta interface{}) (interface{}, error) { if _, err := uuid.Parse(id); err == nil { - log.Println("[INFO] Resolving approval policy by id: ", id) + tflog.Info(ctx, "Resolving approval policy by id", map[string]interface{}{"id": id}) template, err := meta.(client.ApiClientInterface).Template(id) if err != nil { @@ -127,14 +127,14 @@ func getApprovalPolicy(id string, meta interface{}) (interface{}, error) { return &template, nil } else { - log.Println("[INFO] Resolving approval policy by name: ", id) + tflog.Info(ctx, "Resolving approval policy by name", map[string]interface{}{"name": id}) return getApprovalPolicyByName(id, meta) } } func resourceApprovalPolicyImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - approvalPolicy, err := getApprovalPolicy(d.Id(), meta) + approvalPolicy, err := getApprovalPolicy(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_approval_policy_assignment.go b/env0/resource_approval_policy_assignment.go index 50479215..198e081d 100644 --- a/env0/resource_approval_policy_assignment.go +++ b/env0/resource_approval_policy_assignment.go @@ -3,9 +3,9 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -84,7 +84,7 @@ func resourceApprovalPolicyAssignmentRead(ctx context.Context, d *schema.Resourc approvalPolicyByScopeArr, err := apiClient.ApprovalPolicyByScope(scope, scopeId) if err != nil { - return ResourceGetFailure("approval policy assignment", d, err) + return ResourceGetFailure(ctx, "approval policy assignment", d, err) } found := false @@ -96,7 +96,7 @@ func resourceApprovalPolicyAssignmentRead(ctx context.Context, d *schema.Resourc } if !found { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_cloud_credentials_project_assignment.go b/env0/resource_cloud_credentials_project_assignment.go index b0dcfe00..e2605563 100644 --- a/env0/resource_cloud_credentials_project_assignment.go +++ b/env0/resource_cloud_credentials_project_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -66,7 +66,7 @@ func resourceCloudCredentialsProjectAssignmentRead(ctx context.Context, d *schem } } if !found && !d.IsNewResource() { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_configuration_variable.go b/env0/resource_configuration_variable.go index 157ac352..4666cb1a 100644 --- a/env0/resource_configuration_variable.go +++ b/env0/resource_configuration_variable.go @@ -207,7 +207,7 @@ func resourceConfigurationVariableRead(ctx context.Context, d *schema.ResourceDa variable, err := apiClient.ConfigurationVariablesById(id) if err != nil { - return ResourceGetFailure("configuration variable", d, err) + return ResourceGetFailure(ctx, "configuration variable", d, err) } d.Set("type", "environment") diff --git a/env0/resource_cost_credentials.go b/env0/resource_cost_credentials.go index 86660797..f5350021 100644 --- a/env0/resource_cost_credentials.go +++ b/env0/resource_cost_credentials.go @@ -113,7 +113,7 @@ func resourceCostCredentialsRead(ctx context.Context, d *schema.ResourceData, me id := d.Id() _, err := apiClient.CloudCredentials(id) if err != nil { - return ResourceGetFailure("cost credentials", d, err) + return ResourceGetFailure(ctx, "cost credentials", d, err) } return nil diff --git a/env0/resource_custom_flow.go b/env0/resource_custom_flow.go index 1c638d53..3237e2f7 100644 --- a/env0/resource_custom_flow.go +++ b/env0/resource_custom_flow.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -47,7 +47,7 @@ func resourceCustomFlowRead(ctx context.Context, d *schema.ResourceData, meta in customFlow, err := apiClient.CustomFlow(d.Id()) if err != nil { - return ResourceGetFailure("custom flow", d, err) + return ResourceGetFailure(ctx, "custom flow", d, err) } if err := writeResourceData(customFlow, d); err != nil { @@ -101,18 +101,18 @@ func getCustomFlowByName(name string, meta interface{}) (*client.CustomFlow, err return &customFlows[0], nil } -func getCustomFlow(id string, meta interface{}) (*client.CustomFlow, error) { +func getCustomFlow(ctx context.Context, id string, meta interface{}) (*client.CustomFlow, error) { if _, err := uuid.Parse(id); err == nil { - log.Println("[INFO] Resolving custom flow by id: ", id) + tflog.Info(ctx, "Resolving custom flow by id", map[string]interface{}{"id": id}) return meta.(client.ApiClientInterface).CustomFlow(id) } else { - log.Println("[INFO] Resolving custom flow by name: ", id) + tflog.Info(ctx, "Resolving custom flow by name", map[string]interface{}{"name": id}) return getCustomFlowByName(id, meta) } } func resourceCustomFlowImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - customFlow, err := getCustomFlow(d.Id(), meta) + customFlow, err := getCustomFlow(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_custom_flow_assignment.go b/env0/resource_custom_flow_assignment.go index cdc66321..4c9492a6 100644 --- a/env0/resource_custom_flow_assignment.go +++ b/env0/resource_custom_flow_assignment.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "strings" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -102,7 +102,7 @@ func resourceCustomFlowAssignmentRead(ctx context.Context, d *schema.ResourceDat } if !found && !d.IsNewResource() { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_custom_role.go b/env0/resource_custom_role.go index e14cce24..a53111ed 100644 --- a/env0/resource_custom_role.go +++ b/env0/resource_custom_role.go @@ -3,11 +3,11 @@ package env0 import ( "context" "fmt" - "log" "strings" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -101,7 +101,7 @@ func resourceCustomRoleRead(ctx context.Context, d *schema.ResourceData, meta in role, err := apiClient.Role(d.Id()) if err != nil { - return ResourceGetFailure("role", d, err) + return ResourceGetFailure(ctx, "role", d, err) } if err := writeResourceData(role, d); err != nil { @@ -169,19 +169,19 @@ func getCustomRoleByName(name string, meta interface{}) (*client.Role, error) { return &foundRoles[0], nil } -func getCustomRole(id string, meta interface{}) (*client.Role, error) { +func getCustomRole(ctx context.Context, id string, meta interface{}) (*client.Role, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving custom role by id: ", id) + tflog.Info(ctx, "Resolving custom role by id", map[string]interface{}{"id": id}) return getCustomRoleById(id, meta) } else { - log.Println("[INFO] Resolving custom role by name: ", id) + tflog.Info(ctx, "Resolving custom role by name", map[string]interface{}{"name": id}) return getCustomRoleByName(id, meta) } } func resourceCustomRoleImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - role, err := getCustomRole(d.Id(), meta) + role, err := getCustomRole(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_drift_detection.go b/env0/resource_drift_detection.go index a4147e89..a83fa9ae 100644 --- a/env0/resource_drift_detection.go +++ b/env0/resource_drift_detection.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -47,7 +47,7 @@ func resourceEnvironmentDriftRead(ctx context.Context, d *schema.ResourceData, m } if !drift.Enabled { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", environmentId) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_environment.go b/env0/resource_environment.go index a31f2838..6c64560e 100644 --- a/env0/resource_environment.go +++ b/env0/resource_environment.go @@ -4,11 +4,11 @@ import ( "context" "errors" "fmt" - "log" "regexp" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -335,7 +335,7 @@ func resourceEnvironment() *schema.Resource { } } -func setEnvironmentSchema(d *schema.ResourceData, environment client.Environment, configurationVariables client.ConfigurationChanges) error { +func setEnvironmentSchema(ctx context.Context, d *schema.ResourceData, environment client.Environment, configurationVariables client.ConfigurationChanges) error { if err := writeResourceData(&environment, d); err != nil { return fmt.Errorf("schema resource data serialization failed: %v", err) } @@ -391,7 +391,7 @@ func setEnvironmentSchema(d *schema.ResourceData, environment client.Environment } } - setEnvironmentConfigurationSchema(d, configurationVariables) + setEnvironmentConfigurationSchema(ctx, d, configurationVariables) return nil } @@ -437,7 +437,7 @@ func createVariable(configurationVariable *client.ConfigurationVariable) interfa return variable } -func setEnvironmentConfigurationSchema(d *schema.ResourceData, configurationVariables []client.ConfigurationVariable) { +func setEnvironmentConfigurationSchema(ctx context.Context, d *schema.ResourceData, configurationVariables []client.ConfigurationVariable) { ivariables, ok := d.GetOk("configuration") if !ok { return @@ -486,7 +486,7 @@ func setEnvironmentConfigurationSchema(d *schema.ResourceData, configurationVari } if !found { - log.Printf("[WARN] Drift Detected for configuration: %s", configurationVariable.Name) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"configuration name": configurationVariable.Name}) newVariables = append(newVariables, createVariable(&configurationVariable)) } } @@ -561,7 +561,7 @@ func resourceEnvironmentCreate(ctx context.Context, d *schema.ResourceData, meta d.Set("auto_deploy_on_path_changes_only", *environment.AutoDeployOnPathChangesOnly) } - setEnvironmentSchema(d, environment, environmentConfigurationVariables) + setEnvironmentSchema(ctx, d, environment, environmentConfigurationVariables) return nil } @@ -579,7 +579,7 @@ func resourceEnvironmentRead(ctx context.Context, d *schema.ResourceData, meta i return diag.Errorf("could not get environment configuration variables: %v", err) } - setEnvironmentSchema(d, environment, environmentConfigurationVariables) + setEnvironmentSchema(ctx, d, environment, environmentConfigurationVariables) if isTemplateless(d) { // envrionment with no template. @@ -1097,11 +1097,10 @@ func resourceEnvironmentImport(ctx context.Context, d *schema.ResourceData, meta var environment client.Environment _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving Environment by id: ", id) + tflog.Info(ctx, "Resolving environment by id", map[string]interface{}{"id": id}) environment, getErr = getEnvironmentById(id, meta) } else { - log.Println("[DEBUG] ID is not a valid env0 id ", id) - log.Println("[INFO] Resolving Environment by name: ", id) + tflog.Info(ctx, "Resolving environment by name", map[string]interface{}{"name": id}) environment, getErr = getEnvironmentByName(id, meta, false) } @@ -1113,7 +1112,7 @@ func resourceEnvironmentImport(ctx context.Context, d *schema.ResourceData, meta } d.Set("deployment_id", environment.LatestDeploymentLogId) - setEnvironmentSchema(d, environment, environmentConfigurationVariables) + setEnvironmentSchema(ctx, d, environment, environmentConfigurationVariables) if environment.IsRemoteBackend != nil { d.Set("is_remote_backend", *environment.IsRemoteBackend) diff --git a/env0/resource_environment_state_access.go b/env0/resource_environment_state_access.go index 7b0b5006..51997897 100644 --- a/env0/resource_environment_state_access.go +++ b/env0/resource_environment_state_access.go @@ -72,7 +72,7 @@ func resourceEnvironmentStateAccessRead(ctx context.Context, d *schema.ResourceD remoteStateAccess, err := apiClient.RemoteStateAccessConfiguration(environmentId) if err != nil { - return ResourceGetFailure("remote state access configation", d, err) + return ResourceGetFailure(ctx, "remote state access configation", d, err) } if err := writeResourceData(remoteStateAccess, d); err != nil { diff --git a/env0/resource_git_token.go b/env0/resource_git_token.go index 8fa8b11c..cb76d418 100644 --- a/env0/resource_git_token.go +++ b/env0/resource_git_token.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -60,7 +60,7 @@ func resourceGitTokenRead(ctx context.Context, d *schema.ResourceData, meta inte gitToken, err := apiClient.GitToken(d.Id()) if err != nil { - return ResourceGetFailure("git token", d, err) + return ResourceGetFailure(ctx, "git token", d, err) } if err := writeResourceData(gitToken, d); err != nil { @@ -106,19 +106,19 @@ func getGitTokenByName(name string, meta interface{}) (*client.GitToken, error) return &foundGitTokens[0], nil } -func getGitToken(id string, meta interface{}) (*client.GitToken, error) { +func getGitToken(ctx context.Context, id string, meta interface{}) (*client.GitToken, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving git token by id: ", id) + tflog.Info(ctx, "Resolving git token by id", map[string]interface{}{"id": id}) return meta.(client.ApiClientInterface).GitToken(id) } else { - log.Println("[INFO] Resolving git token by name: ", id) + tflog.Info(ctx, "Resolving git token by name", map[string]interface{}{"name": id}) return getGitTokenByName(id, meta) } } func resourceGitTokenImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - gitToken, err := getGitToken(d.Id(), meta) + gitToken, err := getGitToken(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_gpg_key.go b/env0/resource_gpg_key.go index 1ea43186..ba511777 100644 --- a/env0/resource_gpg_key.go +++ b/env0/resource_gpg_key.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -64,7 +64,7 @@ func resourceGpgKeyCreate(ctx context.Context, d *schema.ResourceData, meta inte func resourceGpgKeyRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { gpgKey, err := getGpgKeyById(d.Id(), meta) if err != nil { - return ResourceGetFailure("gpg key", d, err) + return ResourceGetFailure(ctx, "gpg key", d, err) } if err := writeResourceData(gpgKey, d); err != nil { @@ -127,19 +127,19 @@ func getGpgKeyByName(name string, meta interface{}) (*client.GpgKey, error) { return &foundGpgKeys[0], nil } -func getGpgKey(idOrName string, meta interface{}) (*client.GpgKey, error) { +func getGpgKey(ctx context.Context, idOrName string, meta interface{}) (*client.GpgKey, error) { _, err := uuid.Parse(idOrName) if err == nil { - log.Println("[INFO] Resolving gpg key by id: ", idOrName) + tflog.Info(ctx, "Resolving gpg key by id", map[string]interface{}{"id": idOrName}) return getGpgKeyById(idOrName, meta) } else { - log.Println("[INFO] Resolving gpg key by name: ", idOrName) + tflog.Info(ctx, "Resolving gpg key by name", map[string]interface{}{"name": idOrName}) return getGpgKeyByName(idOrName, meta) } } func resourceGpgKeyImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - gpgKey, err := getGpgKey(d.Id(), meta) + gpgKey, err := getGpgKey(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_module.go b/env0/resource_module.go index 4dd7cb5d..b2752d0c 100644 --- a/env0/resource_module.go +++ b/env0/resource_module.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -114,7 +114,7 @@ func resourceModuleRead(ctx context.Context, d *schema.ResourceData, meta interf module, err := apiClient.Module(d.Id()) if err != nil { - return ResourceGetFailure("module", d, err) + return ResourceGetFailure(ctx, "module", d, err) } if err := writeResourceData(module, d); err != nil { @@ -175,19 +175,19 @@ func getModuleByName(name string, meta interface{}) (*client.Module, error) { return &foundModules[0], nil } -func getModule(id string, meta interface{}) (*client.Module, error) { +func getModule(ctx context.Context, id string, meta interface{}) (*client.Module, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving module by id: ", id) + tflog.Info(ctx, "Resolving module by id", map[string]interface{}{"id": id}) return meta.(client.ApiClientInterface).Module(id) } else { - log.Println("[INFO] Resolving module by name: ", id) + tflog.Info(ctx, "Resolving module by name", map[string]interface{}{"name": id}) return getModuleByName(id, meta) } } func resourceModuleImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - module, err := getModule(d.Id(), meta) + module, err := getModule(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_notification.go b/env0/resource_notification.go index 3d6aa50d..7af57ed6 100644 --- a/env0/resource_notification.go +++ b/env0/resource_notification.go @@ -3,11 +3,11 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" "github.com/hashicorp/go-cty/cty" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -115,7 +115,7 @@ func resourceNotificationRead(ctx context.Context, d *schema.ResourceData, meta return diag.Errorf("could not get notification: %v", err) } if notification == nil { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -154,19 +154,19 @@ func resourceNotificationDelete(ctx context.Context, d *schema.ResourceData, met return nil } -func getNotification(id string, meta interface{}) (*client.Notification, error) { +func getNotification(ctx context.Context, id string, meta interface{}) (*client.Notification, error) { _, err := uuid.Parse(id) if err == nil { - log.Println("[INFO] Resolving notification by id: ", id) + tflog.Info(ctx, "Resolving notifcation by id", map[string]interface{}{"id": id}) return getNotificationById(id, meta) } else { - log.Println("[INFO] Resolving notification by name: ", id) + tflog.Info(ctx, "Resolving notifcation by name", map[string]interface{}{"name ": id}) return getNotificationByName(id, meta) } } func resourceNotificationImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - notification, err := getNotification(d.Id(), meta) + notification, err := getNotification(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_notification_project_assignment.go b/env0/resource_notification_project_assignment.go index 1648f8b4..5c5eab3e 100644 --- a/env0/resource_notification_project_assignment.go +++ b/env0/resource_notification_project_assignment.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "strings" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -104,11 +104,11 @@ func getNotificationProjectAssignment(d *schema.ResourceData, meta interface{}) func resourceNotificationProjectAssignmentRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { assignment, err := getNotificationProjectAssignment(d, meta) if err != nil { - return ResourceGetFailure("notification project assignment", d, err) + return ResourceGetFailure(ctx, "notification project assignment", d, err) } if assignment == nil { // Notification endpoint not found. - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_project.go b/env0/resource_project.go index 987dac81..e7744b3a 100644 --- a/env0/resource_project.go +++ b/env0/resource_project.go @@ -3,12 +3,12 @@ package env0 import ( "context" "fmt" - "log" "os" "time" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -95,7 +95,7 @@ func resourceProjectRead(ctx context.Context, d *schema.ResourceData, meta inter project, err := apiClient.Project(d.Id()) if err != nil { - return ResourceGetFailure("project", d, err) + return ResourceGetFailure(ctx, "project", d, err) } if err := writeResourceData(&project, d); err != nil { @@ -215,12 +215,12 @@ func resourceProjectImport(ctx context.Context, d *schema.ResourceData, meta int var project client.Project if err == nil { - log.Println("[INFO] Resolving Project by id: ", id) + tflog.Info(ctx, "Resolving project by id", map[string]interface{}{"id": id}) if project, err = getProjectById(id, meta); err != nil { return nil, err } } else { - log.Println("[INFO] Resolving Project by name: ", id) + tflog.Info(ctx, "Resolving project by name", map[string]interface{}{"name": id}) if project, err = getProjectByName(id, "", meta); err != nil { return nil, err diff --git a/env0/resource_provider.go b/env0/resource_provider.go index ec642cd8..3ca53e3b 100644 --- a/env0/resource_provider.go +++ b/env0/resource_provider.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -60,7 +60,7 @@ func resourceProviderRead(ctx context.Context, d *schema.ResourceData, meta inte provider, err := apiClient.Provider(d.Id()) if err != nil { - return ResourceGetFailure("provider", d, err) + return ResourceGetFailure(ctx, "provider", d, err) } if err := writeResourceData(provider, d); err != nil { @@ -121,19 +121,19 @@ func getProviderByName(name string, meta interface{}) (*client.Provider, error) return &foundProviders[0], nil } -func getProvider(idOrName string, meta interface{}) (*client.Provider, error) { +func getProvider(ctx context.Context, idOrName string, meta interface{}) (*client.Provider, error) { _, err := uuid.Parse(idOrName) if err == nil { - log.Println("[INFO] Resolving provider by id: ", idOrName) + tflog.Info(ctx, "Resolving provider by id", map[string]interface{}{"id": idOrName}) return meta.(client.ApiClientInterface).Provider(idOrName) } else { - log.Println("[INFO] Resolving provider by name: ", idOrName) + tflog.Info(ctx, "Resolving provider by name", map[string]interface{}{"name": idOrName}) return getProviderByName(idOrName, meta) } } func resourceProviderImport(ctx context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - provider, err := getProvider(d.Id(), meta) + provider, err := getProvider(ctx, d.Id(), meta) if err != nil { return nil, err } diff --git a/env0/resource_sshkey.go b/env0/resource_sshkey.go index 1fd8f596..84c186b7 100644 --- a/env0/resource_sshkey.go +++ b/env0/resource_sshkey.go @@ -2,10 +2,10 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -60,7 +60,7 @@ func resourceSshKeyRead(ctx context.Context, d *schema.ResourceData, meta interf return diag.Errorf("could not get ssh key: %v", err) } if sshKey == nil { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") } return nil @@ -82,11 +82,10 @@ func resourceSshKeyImport(ctx context.Context, d *schema.ResourceData, meta inte var getErr error _, uuidErr := uuid.Parse(id) if uuidErr == nil { - log.Println("[INFO] Resolving SSH Key by id: ", id) + tflog.Info(ctx, "Resolving SSH key by id", map[string]interface{}{"id": id}) _, getErr = getSshKeyById(id, meta) } else { - log.Println("[DEBUG] ID is not a valid env0 id ", id) - log.Println("[INFO] Resolving SSH Key by name: ", id) + tflog.Info(ctx, "Resolving SSH key by name", map[string]interface{}{"name": id}) var sshKey *client.SshKey sshKey, getErr = getSshKeyByName(id, meta) d.SetId(sshKey.Id) diff --git a/env0/resource_team.go b/env0/resource_team.go index bd3ea768..354c7f40 100644 --- a/env0/resource_team.go +++ b/env0/resource_team.go @@ -3,10 +3,10 @@ package env0 import ( "context" "errors" - "log" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -58,7 +58,7 @@ func resourceTeamRead(ctx context.Context, d *schema.ResourceData, meta interfac team, err := apiClient.Team(d.Id()) if err != nil { - return ResourceGetFailure("team", d, err) + return ResourceGetFailure(ctx, "team", d, err) } if err := writeResourceData(&team, d); err != nil { @@ -98,11 +98,10 @@ func resourceTeamImport(ctx context.Context, d *schema.ResourceData, meta interf var getErr diag.Diagnostics _, uuidErr := uuid.Parse(id) if uuidErr == nil { - log.Println("[INFO] Resolving team by id: ", id) + tflog.Info(ctx, "Resolving team by id", map[string]interface{}{"id": id}) _, getErr = getTeamById(id, meta) } else { - log.Println("[DEBUG] ID is not a valid env0 id ", id) - log.Println("[INFO] Resolving team by name: ", id) + tflog.Info(ctx, "Resolving team by name", map[string]interface{}{"name": id}) var team client.Team team, getErr = getTeamByName(id, meta) d.SetId(team.Id) diff --git a/env0/resource_team_environment_assignment.go b/env0/resource_team_environment_assignment.go index 8111e77e..88443396 100644 --- a/env0/resource_team_environment_assignment.go +++ b/env0/resource_team_environment_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -80,7 +80,7 @@ func resourceTeamEnvironmentAssignmentRead(ctx context.Context, d *schema.Resour } } - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/env0/resource_team_project_assignment.go b/env0/resource_team_project_assignment.go index cabdee2b..28069856 100644 --- a/env0/resource_team_project_assignment.go +++ b/env0/resource_team_project_assignment.go @@ -3,10 +3,10 @@ package env0 import ( "context" "fmt" - "log" "strings" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -78,7 +78,7 @@ func resourceTeamProjectAssignmentRead(ctx context.Context, d *schema.ResourceDa } } - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/env0/resource_template.go b/env0/resource_template.go index e50039f7..74fb4b70 100644 --- a/env0/resource_template.go +++ b/env0/resource_template.go @@ -4,11 +4,11 @@ import ( "context" "errors" "fmt" - "log" "strings" "github.com/env0/terraform-provider-env0/client" "github.com/google/uuid" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -284,7 +284,7 @@ func resourceTemplateRead(ctx context.Context, d *schema.ResourceData, meta inte } if template.IsDeleted && !d.IsNewResource() { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -327,11 +327,10 @@ func resourceTemplateImport(ctx context.Context, d *schema.ResourceData, meta in var getErr diag.Diagnostics _, uuidErr := uuid.Parse(id) if uuidErr == nil { - log.Println("[INFO] Resolving Template by id: ", id) + tflog.Info(ctx, "Resolving template by id", map[string]interface{}{"id": id}) _, getErr = getTemplateById(id, meta) } else { - log.Println("[DEBUG] ID is not a valid env0 id ", id) - log.Println("[INFO] Resolving Template by name: ", id) + tflog.Info(ctx, "Resolving template by name", map[string]interface{}{"name": id}) var template client.Template template, getErr = getTemplateByName(id, meta) d.SetId(template.Id) diff --git a/env0/resource_template_project_assignment.go b/env0/resource_template_project_assignment.go index 5c526691..85528466 100644 --- a/env0/resource_template_project_assignment.go +++ b/env0/resource_template_project_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -66,7 +66,7 @@ func resourceTemplateProjectAssignmentRead(ctx context.Context, d *schema.Resour } if template.IsDeleted { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } @@ -79,7 +79,7 @@ func resourceTemplateProjectAssignmentRead(ctx context.Context, d *schema.Resour } } if !isProjectIdInTemplate { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_user_environment_assignment.go b/env0/resource_user_environment_assignment.go index 201ed9c4..db507f96 100644 --- a/env0/resource_user_environment_assignment.go +++ b/env0/resource_user_environment_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -80,7 +80,7 @@ func resourceUserEnvironmentAssignmentRead(ctx context.Context, d *schema.Resour } } - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/env0/resource_user_organization_assignment.go b/env0/resource_user_organization_assignment.go index d6999634..0c86f051 100644 --- a/env0/resource_user_organization_assignment.go +++ b/env0/resource_user_organization_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -67,7 +67,7 @@ func resourceUserOrganizationAssignmentRead(ctx context.Context, d *schema.Resou } if user == nil { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/env0/resource_user_project_assignment.go b/env0/resource_user_project_assignment.go index 142f8362..a74f5dc2 100644 --- a/env0/resource_user_project_assignment.go +++ b/env0/resource_user_project_assignment.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -100,7 +100,7 @@ func resourceUserProjectAssignmentRead(ctx context.Context, d *schema.ResourceDa } } - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/env0/resource_user_team_assignment.go b/env0/resource_user_team_assignment.go index 29b253f0..c86390cb 100644 --- a/env0/resource_user_team_assignment.go +++ b/env0/resource_user_team_assignment.go @@ -3,11 +3,11 @@ package env0 import ( "context" "fmt" - "log" "sync" "github.com/env0/terraform-provider-env0/client" "github.com/env0/terraform-provider-env0/client/http" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -120,7 +120,7 @@ func resourceUserTeamAssignmentRead(ctx context.Context, d *schema.ResourceData, team, err := apiClient.Team(assignment.TeamId) if err != nil { - return ResourceGetFailure("team", d, err) + return ResourceGetFailure(ctx, "team", d, err) } found := false @@ -132,7 +132,7 @@ func resourceUserTeamAssignmentRead(ctx context.Context, d *schema.ResourceData, } if !found { - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil } diff --git a/env0/resource_workflow_trigger.go b/env0/resource_workflow_trigger.go index 25d43f71..a26dfa78 100644 --- a/env0/resource_workflow_trigger.go +++ b/env0/resource_workflow_trigger.go @@ -2,9 +2,9 @@ package env0 import ( "context" - "log" "github.com/env0/terraform-provider-env0/client" + "github.com/hashicorp/terraform-plugin-log/tflog" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" ) @@ -51,7 +51,7 @@ func resourceWorkflowTriggerRead(ctx context.Context, d *schema.ResourceData, me } } - log.Printf("[WARN] Drift Detected: Terraform will remove %s from state", d.Id()) + tflog.Warn(ctx, "Drift Detected: Terraform will remove id from state", map[string]interface{}{"id": d.Id()}) d.SetId("") return nil diff --git a/go.mod b/go.mod index 5e97872c..a9b1f16a 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,15 @@ module github.com/env0/terraform-provider-env0 go 1.19 require ( - github.com/Masterminds/semver/v3 v3.1.1 - github.com/adhocore/gronx v0.2.7 + github.com/Masterminds/semver/v3 v3.2.1 + github.com/adhocore/gronx v1.6.5 github.com/go-resty/resty/v2 v2.7.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 - github.com/hashicorp/terraform-plugin-docs v0.13.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.22.0 + github.com/hashicorp/terraform-plugin-docs v0.16.0 + github.com/hashicorp/terraform-plugin-log v0.9.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 github.com/jarcoal/httpmock v1.0.8 github.com/jinzhu/copier v0.3.2 github.com/onsi/ginkgo v1.16.2 @@ -20,39 +21,40 @@ require ( require ( github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.2 // indirect + github.com/Masterminds/sprig/v3 v3.2.3 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/hashicorp/errwrap v1.1.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.3.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.5 // indirect + github.com/hashicorp/go-plugin v1.4.10 // 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.14.0 // indirect + github.com/hashicorp/hc-install v0.5.2 // indirect + github.com/hashicorp/hcl/v2 v2.17.0 // 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.0 // 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-svchost v0.0.0-20200729002733-f050f53b9734 // indirect + github.com/hashicorp/terraform-exec v0.18.1 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.18.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/huandu/xstrings v1.3.2 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mitchellh/cli v1.1.4 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mitchellh/cli v1.1.5 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect @@ -64,19 +66,21 @@ require ( github.com/posener/complete v1.2.3 // indirect github.com/russross/blackfriday v1.6.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cast v1.5.1 // 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.11.0 // indirect - golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/zclconf/go-cty v1.13.2 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a // indirect + google.golang.org/grpc v1.57.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 514e2571..2f3190cc 100644 --- a/go.sum +++ b/go.sum @@ -1,58 +1,46 @@ -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= -github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= -github.com/Masterminds/sprig/v3 v3.2.2/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= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/adhocore/gronx v0.2.7 h1:nbe2SEgE/6OnxDJjk6kid/Owa7jcvj7iHcMd4/Uy8TY= -github.com/adhocore/gronx v0.2.7/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= +github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs= +github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/adhocore/gronx v1.6.5 h1:/pryEagBKz3WqUgpgvtL51eBN2rJLXowuW7rpS+jrew= +github.com/adhocore/gronx v1.6.5/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -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-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= 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= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= 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= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= +github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= +github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= 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-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -62,7 +50,6 @@ github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+Licev 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= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -70,13 +57,13 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -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/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/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/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -89,78 +76,68 @@ github.com/hashicorp/errwrap v1.1.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= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.3.0 h1:G0ACM8Z2WilWgPv3Vdzwm3V0BQu/kSmrkVtpe1fy9do= -github.com/hashicorp/go-hclog v1.3.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= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= +github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= 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/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.14.0 h1:jX6+Q38Ly9zaAJlAjnFVyeNSNCKKW8D0wvyg7vij5Wc= -github.com/hashicorp/hcl/v2 v2.14.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hc-install v0.5.2 h1:SfwMFnEXVVirpwkDuSF5kymUOhrUxrTq3udEseZdOD0= +github.com/hashicorp/hc-install v0.5.2/go.mod h1:9QISwe6newMWIfEiXpzuu1k9HAGtQYgnSH8H9T8wmoI= +github.com/hashicorp/hcl/v2 v2.17.0 h1:z1XvSUyXd1HP10U4lrLg5e0JMVz6CPaJvAgxM0KNZVY= +github.com/hashicorp/hcl/v2 v2.17.0/go.mod h1:gJyW2PTShkJqQBKpAmPO3yxMxIuoXkOF2TpqXzrQyx4= 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-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY= -github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -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.22.0 h1:MzfNfrheTt24xbEbA4npUSbX3GYu4xjXS7czcpJFyQY= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.22.0/go.mod h1:q1XKSxXg9nDmhV0IvNZNZxe3gcTAHzMqrjs8wX1acng= -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-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-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.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-docs v0.16.0 h1:UmxFr3AScl6Wged84jndJIfFccGyBZn52KtMNsS12dI= +github.com/hashicorp/terraform-plugin-docs v0.16.0/go.mod h1:M3ZrlKBJAbPMtNOPwHicGi1c+hZUh7/g0ifT/z7TVfA= +github.com/hashicorp/terraform-plugin-go v0.18.0 h1:IwTkOS9cOW1ehLd/rG0y+u/TGLK9y6fGoBjXVUquzpE= +github.com/hashicorp/terraform-plugin-go v0.18.0/go.mod h1:l7VK+2u5Kf2y+A+742GX0ouLut3gttudmvMgN0PA74Y= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0 h1:I8efBnjuDrgPjNF1MEypHy48VgcTIUY4X6rOFunrR3Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0/go.mod h1:cUEP4ly/nxlHy5HzD6YRrHydtlheGvGRJDhiWqqVik4= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= 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 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jarcoal/httpmock v1.0.8 h1:8kI16SoO6LQKgPE7PvQuV+YuD/inwHd7fOOe2zMbo4k= github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= github.com/jinzhu/copier v0.3.2 h1:QdBOCbaouLDYaIPFfi1bKv5F5tPpeTwXe4sD0jqtz5w= github.com/jinzhu/copier v0.3.2/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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/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/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -169,15 +146,14 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk 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/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= -github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= +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= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -187,8 +163,6 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR 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/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/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -202,146 +176,144 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.12.0 h1:p4oGGk2M2UJc0wWN4lHFvIB71lxsh0T/UiKCCgFADY8= github.com/onsi/gomega v1.12.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= 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/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= -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/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= github.com/spf13/cast v1.3.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/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= 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/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 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.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= 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/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +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.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= 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/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.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= -github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zclconf/go-cty v1.13.2 h1:4GvrUxe/QUDYuJKAav4EYqdM47/kZa672LwmXFmEKT0= +github.com/zclconf/go-cty v1.13.2/go.mod h1:YKQzy/7pZ7iq2jNFzy5go57xdxdWoLLpaEp4u238AE0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-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-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/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.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -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-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-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -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-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/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-20210615035016-665e8c7367d1/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-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-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.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= 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.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -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.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a h1:5rTPHLf5eLPfqGvw3fLpEmUpko2Ky91ft14LxGs5BZc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230814215434-ca7cfce7776a/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= 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= @@ -350,25 +322,20 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.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 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 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= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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/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= diff --git a/tests/harness.go b/tests/harness.go index 64569058..59b4f2ef 100644 --- a/tests/harness.go +++ b/tests/harness.go @@ -1,6 +1,8 @@ package main import ( + "bufio" + "bytes" "encoding/json" "fmt" "log" @@ -165,16 +167,19 @@ func terraformCommand(testName string, arg ...string) ([]byte, error) { cmd.Env = os.Environ() cmd.Env = append(cmd.Env, "INTEGRATION_TESTS=1") cmd.Env = append(cmd.Env, "TF_LOG_PROVIDER=info") + var output, errOutput bytes.Buffer + cmd.Stderr = bufio.NewWriter(&errOutput) + cmd.Stdout = bufio.NewWriter(&output) log.Println("Running terraform ", arg, " in ", testName) - outputBytes, err := cmd.CombinedOutput() - output := string(outputBytes) - log.Println(output) + err := cmd.Run() + + log.Println(errOutput.String()) if err != nil { log.Println("error running terraform ", arg, " in ", testName, " error: ", err) } else { log.Println("Completed successfully terraform", arg, "in", testName) } - return outputBytes, err + return output.Bytes(), err } func printTerraformVersion() {