From 8c90b044c5a678078c989e24282ae026a30c288d Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:22:58 -0600 Subject: [PATCH 1/7] fix: Default dbt_version to latest and treat latest and versionless as equivalents when diffing --- docs/resources/environment.md | 2 +- pkg/sdkv2/resources/environment.go | 20 ++++-- .../resources/environment_acceptance_test.go | 67 ++++++++++++++++--- 3 files changed, 74 insertions(+), 15 deletions(-) diff --git a/docs/resources/environment.md b/docs/resources/environment.md index 572e5c4..4359fa0 100644 --- a/docs/resources/environment.md +++ b/docs/resources/environment.md @@ -70,7 +70,7 @@ resource "dbtcloud_environment" "dev_environment" { - To avoid Terraform state issues, when using this field, the `dbtcloud_project_connection` resource should be removed from the project or you need to make sure that the `connection_id` is the same in `dbtcloud_project_connection` and in the `connection_id` of the Development environment of the project - `credential_id` (Number) Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments - `custom_branch` (String) Which custom branch to use in this environment -- `dbt_version` (String) Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre` or `versionless`. Defaults to`versionless` if no version is provided +- `dbt_version` (String) Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to`latest` if no version is provided - `deployment_type` (String) The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments - `enable_model_query_history` (Boolean) Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery. - `extended_attributes_id` (Number) ID of the extended attributes for the environment diff --git a/pkg/sdkv2/resources/environment.go b/pkg/sdkv2/resources/environment.go index 5fb688e..1037199 100644 --- a/pkg/sdkv2/resources/environment.go +++ b/pkg/sdkv2/resources/environment.go @@ -51,10 +51,22 @@ func ResourceEnvironment() *schema.Resource { Description: "Environment name", }, "dbt_version": { - Type: schema.TypeString, - Optional: true, - Default: "versionless", - Description: "Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre` or `versionless`. Defaults to`versionless` if no version is provided", + Type: schema.TypeString, + Optional: true, + Default: "latest", + Description: "Version number of dbt to use in this environment. " + + "It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), " + + "`major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, " + + "using `latest` is recommended. Defaults to`latest` if no version is provided", + DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool { + if (oldValue == "latest" || oldValue == "versionless") && + (newValue == "latest" || newValue == "versionless") { + return true + } + + return oldValue == newValue + + }, }, "type": { Type: schema.TypeString, diff --git a/pkg/sdkv2/resources/environment_acceptance_test.go b/pkg/sdkv2/resources/environment_acceptance_test.go index dec33b6..ef58099 100644 --- a/pkg/sdkv2/resources/environment_acceptance_test.go +++ b/pkg/sdkv2/resources/environment_acceptance_test.go @@ -17,6 +17,7 @@ import ( // testing for the historical use case where connection_id is not configured at the env level func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { + dbtVersionLatest := "latest" environmentName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) environmentName2 := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) projectName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) @@ -30,6 +31,7 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { Config: testAccDbtCloudEnvironmentResourceNoConnectionBasicConfig( projectName, environmentName, + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -50,6 +52,7 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { Config: testAccDbtCloudEnvironmentResourceNoConnectionBasicConfig( projectName, environmentName2, + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -78,7 +81,7 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", "dbt_version", - DBT_CLOUD_VERSION, + dbtVersionLatest, ), resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", @@ -124,7 +127,7 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", "dbt_version", - DBT_CLOUD_VERSION, + dbtVersionLatest, ), resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", @@ -159,7 +162,9 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { } func testAccDbtCloudEnvironmentResourceNoConnectionBasicConfig( - projectName, environmentName string, + projectName string, + environmentName string, + dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { @@ -173,7 +178,7 @@ resource "dbtcloud_environment" "test_env" { project_id = dbtcloud_project.test_project.id deployment_type = "production" } -`, projectName, environmentName, DBT_CLOUD_VERSION) +`, projectName, environmentName, dbtVersion) } func testAccDbtCloudEnvironmentResourceNoConnectionModifiedConfig( @@ -206,6 +211,7 @@ resource "dbtcloud_bigquery_credential" "test_credential" { // testing for the global connection use case where connection_id is added at the env level func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { + dbtVersionLatest := "latest" environmentName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) environmentName2 := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) projectName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) @@ -219,6 +225,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { Config: testAccDbtCloudEnvironmentResourceConnectionBasicConfig( projectName, environmentName, + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -239,6 +246,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { Config: testAccDbtCloudEnvironmentResourceConnectionBasicConfig( projectName, environmentName2, + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -256,6 +264,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { environmentName2, "", "false", + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -267,7 +276,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", "dbt_version", - DBT_CLOUD_VERSION, + dbtVersionLatest, ), resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", @@ -297,6 +306,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { environmentName2, "main", "true", + dbtVersionLatest, ), Check: resource.ComposeTestCheckFunc( testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), @@ -308,7 +318,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", "dbt_version", - DBT_CLOUD_VERSION, + dbtVersionLatest, ), resource.TestCheckResourceAttr( "dbtcloud_environment.test_env", @@ -339,7 +349,9 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { } func testAccDbtCloudEnvironmentResourceConnectionBasicConfig( - projectName, environmentName string, + projectName string, + environmentName string, + dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { @@ -367,11 +379,15 @@ resource "dbtcloud_environment" "test_env" { connection_id = dbtcloud_global_connection.test.id } - `, projectName, environmentName, DBT_CLOUD_VERSION) + `, projectName, environmentName, dbtVersion) } func testAccDbtCloudEnvironmentResourceConnectionModifiedConfig( - projectName, environmentName, customBranch, useCustomBranch string, + projectName string, + environmentName string, + customBranch string, + useCustomBranch string, + dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { @@ -419,7 +435,38 @@ resource "dbtcloud_bigquery_credential" "test_credential" { num_threads = 16 } -`, projectName, environmentName, DBT_CLOUD_VERSION, customBranch, useCustomBranch) +`, projectName, environmentName, dbtVersion, customBranch, useCustomBranch) +} + +// TestAccDbtCloudEnvironmentResourceVersionless tests the environment resource with dbt_version set to versionless +// This is a special case where if the dbt_version is set to `versionless`, the dbt Cloud API may return `latest` +func TestAccDbtCloudEnvironmentResourceVersionless(t *testing.T) { + dbtVersionless := "versionless" + environmentName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) + projectName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + ProtoV6ProviderFactories: acctest_helper.TestAccProtoV6ProviderFactories, + CheckDestroy: testAccCheckDbtCloudEnvironmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccDbtCloudEnvironmentResourceNoConnectionBasicConfig( + projectName, + environmentName, + dbtVersionless, + ), + Check: resource.ComposeTestCheckFunc( + testAccCheckDbtCloudEnvironmentExists("dbtcloud_environment.test_env"), + resource.TestMatchResourceAttr( + "dbtcloud_environment.test_env", + "dbt_version", + regexp.MustCompile("^versionless|latest$"), + ), + ), + }, + }, + }) } func testAccCheckDbtCloudEnvironmentExists(resource string) resource.TestCheckFunc { From 6a61ea20cd0e498cae16790ffd4fe96eff788989 Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:25:17 -0600 Subject: [PATCH 2/7] fix: Update docstring --- docs/resources/environment.md | 2 +- pkg/sdkv2/resources/environment.go | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/resources/environment.md b/docs/resources/environment.md index 4359fa0..b2854a0 100644 --- a/docs/resources/environment.md +++ b/docs/resources/environment.md @@ -70,7 +70,7 @@ resource "dbtcloud_environment" "dev_environment" { - To avoid Terraform state issues, when using this field, the `dbtcloud_project_connection` resource should be removed from the project or you need to make sure that the `connection_id` is the same in `dbtcloud_project_connection` and in the `connection_id` of the Development environment of the project - `credential_id` (Number) Credential ID to create the environment with. A credential is not required for development environments but is required for deployment environments - `custom_branch` (String) Which custom branch to use in this environment -- `dbt_version` (String) Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to`latest` if no version is provided +- `dbt_version` (String) Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to `latest` if no version is provided - `deployment_type` (String) The type of environment. Only valid for environments of type 'deployment' and for now can only be 'production', 'staging' or left empty for generic environments - `enable_model_query_history` (Boolean) Whether to enable model query history in this environment. As of Oct 2024, works only for Snowflake and BigQuery. - `extended_attributes_id` (Number) ID of the extended attributes for the environment diff --git a/pkg/sdkv2/resources/environment.go b/pkg/sdkv2/resources/environment.go index 1037199..bf2c42f 100644 --- a/pkg/sdkv2/resources/environment.go +++ b/pkg/sdkv2/resources/environment.go @@ -51,13 +51,10 @@ func ResourceEnvironment() *schema.Resource { Description: "Environment name", }, "dbt_version": { - Type: schema.TypeString, - Optional: true, - Default: "latest", - Description: "Version number of dbt to use in this environment. " + - "It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), " + - "`major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, " + - "using `latest` is recommended. Defaults to`latest` if no version is provided", + Type: schema.TypeString, + Optional: true, + Default: "latest", + Description: "Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to `latest` if no version is provided", DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool { if (oldValue == "latest" || oldValue == "versionless") && (newValue == "latest" || newValue == "versionless") { From 1464f2f7b2b1ab5c4afbb4c4109a7ed42c85ec9e Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:40:56 -0600 Subject: [PATCH 3/7] fix: DiffSuppressFunc can just return false --- pkg/sdkv2/resources/environment.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/sdkv2/resources/environment.go b/pkg/sdkv2/resources/environment.go index bf2c42f..dd10174 100644 --- a/pkg/sdkv2/resources/environment.go +++ b/pkg/sdkv2/resources/environment.go @@ -60,9 +60,7 @@ func ResourceEnvironment() *schema.Resource { (newValue == "latest" || newValue == "versionless") { return true } - - return oldValue == newValue - + return false }, }, "type": { From dcb5c9b114e9ff556d898eee963b7e818a7e8d10 Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:55:47 -0600 Subject: [PATCH 4/7] fix: DiffSuppressFunc --- pkg/sdkv2/resources/environment.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/sdkv2/resources/environment.go b/pkg/sdkv2/resources/environment.go index dd10174..9a3e526 100644 --- a/pkg/sdkv2/resources/environment.go +++ b/pkg/sdkv2/resources/environment.go @@ -56,11 +56,14 @@ func ResourceEnvironment() *schema.Resource { Default: "latest", Description: "Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to `latest` if no version is provided", DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool { - if (oldValue == "latest" || oldValue == "versionless") && - (newValue == "latest" || newValue == "versionless") { - return true + switch oldValue { + case "versionless": + return newValue == "latest" + case "latest": + return newValue == "versionless" + default: + return false } - return false }, }, "type": { From 7a60217f960a6385935490c9a635664b5c1c5ecd Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:01:03 -0600 Subject: [PATCH 5/7] fix: DiffSuppressFunc --- pkg/sdkv2/resources/environment_acceptance_test.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pkg/sdkv2/resources/environment_acceptance_test.go b/pkg/sdkv2/resources/environment_acceptance_test.go index ef58099..5608141 100644 --- a/pkg/sdkv2/resources/environment_acceptance_test.go +++ b/pkg/sdkv2/resources/environment_acceptance_test.go @@ -162,9 +162,7 @@ func TestAccDbtCloudEnvironmentResourceNoConnection(t *testing.T) { } func testAccDbtCloudEnvironmentResourceNoConnectionBasicConfig( - projectName string, - environmentName string, - dbtVersion string, + projectName, environmentName, dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { @@ -349,9 +347,7 @@ func TestAccDbtCloudEnvironmentResourceConnection(t *testing.T) { } func testAccDbtCloudEnvironmentResourceConnectionBasicConfig( - projectName string, - environmentName string, - dbtVersion string, + projectName, environmentName, dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { @@ -383,11 +379,7 @@ resource "dbtcloud_environment" "test_env" { } func testAccDbtCloudEnvironmentResourceConnectionModifiedConfig( - projectName string, - environmentName string, - customBranch string, - useCustomBranch string, - dbtVersion string, + projectName, environmentName, customBranch, useCustomBranch, dbtVersion string, ) string { return fmt.Sprintf(` resource "dbtcloud_project" "test_project" { From ef30164dad796e7755fbcd2e62091b9cc62cd71a Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:37:32 -0600 Subject: [PATCH 6/7] fix: Update examples --- docs/guides/1_getting_started.md | 4 ++-- docs/resources/environment.md | 6 +++--- docs/resources/extended_attributes.md | 2 +- examples/resources/dbtcloud_environment/resource.tf | 6 +++--- examples/resources/dbtcloud_extended_attributes/resource.tf | 2 +- templates/guides/1_getting_started.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/guides/1_getting_started.md b/docs/guides/1_getting_started.md index 2fa4c81..305e08b 100644 --- a/docs/guides/1_getting_started.md +++ b/docs/guides/1_getting_started.md @@ -99,7 +99,7 @@ resource "dbtcloud_project_repository" "my_project_repository" { // here both are linked to the same Data Warehouse connection // for Prod, we need to create a credential as well resource "dbtcloud_environment" "my_dev" { - dbt_version = "versionless" + dbt_version = "latest" name = "Dev" project_id = dbtcloud_project.my_project.id type = "development" @@ -107,7 +107,7 @@ resource "dbtcloud_environment" "my_dev" { } resource "dbtcloud_environment" "my_prod" { - dbt_version = "versionless" + dbt_version = "latest" name = "Prod" project_id = dbtcloud_project.my_project.id type = "deployment" diff --git a/docs/resources/environment.md b/docs/resources/environment.md index b2854a0..edc8d19 100644 --- a/docs/resources/environment.md +++ b/docs/resources/environment.md @@ -22,8 +22,8 @@ This version of the provider has the `connection_id` as an optional field but it ```terraform resource "dbtcloud_environment" "ci_environment" { - // the dbt_version is major.minor.0-latest , major.minor.0-pre or versionless (by default, it is set to versionless if not configured) - dbt_version = "versionless" + // the dbt_version is major.minor.0-latest , major.minor.0-pre or latest (by default, it is set to latest if not configured) + dbt_version = "latest" name = "CI" project_id = dbtcloud_project.dbt_project.id type = "deployment" @@ -44,7 +44,7 @@ resource "dbtcloud_environment" "prod_environment" { // Creating a development environment resource "dbtcloud_environment" "dev_environment" { - dbt_version = "versionless" + dbt_version = "latest" name = "Dev" project_id = dbtcloud_project.dbt_project.id type = "development" diff --git a/docs/resources/extended_attributes.md b/docs/resources/extended_attributes.md index e4dd334..bc41188 100644 --- a/docs/resources/extended_attributes.md +++ b/docs/resources/extended_attributes.md @@ -30,7 +30,7 @@ resource "dbtcloud_extended_attributes" "my_attributes" { } resource "dbtcloud_environment" "issue_depl" { - dbt_version = "versionless" + dbt_version = "latest" name = "My environment" project_id = var.dbt_project.id type = "deployment" diff --git a/examples/resources/dbtcloud_environment/resource.tf b/examples/resources/dbtcloud_environment/resource.tf index 59e69b1..509e873 100644 --- a/examples/resources/dbtcloud_environment/resource.tf +++ b/examples/resources/dbtcloud_environment/resource.tf @@ -1,6 +1,6 @@ resource "dbtcloud_environment" "ci_environment" { - // the dbt_version is major.minor.0-latest , major.minor.0-pre or versionless (by default, it is set to versionless if not configured) - dbt_version = "versionless" + // the dbt_version is major.minor.0-latest , major.minor.0-pre or latest (by default, it is set to latest if not configured) + dbt_version = "latest" name = "CI" project_id = dbtcloud_project.dbt_project.id type = "deployment" @@ -21,7 +21,7 @@ resource "dbtcloud_environment" "prod_environment" { // Creating a development environment resource "dbtcloud_environment" "dev_environment" { - dbt_version = "versionless" + dbt_version = "latest" name = "Dev" project_id = dbtcloud_project.dbt_project.id type = "development" diff --git a/examples/resources/dbtcloud_extended_attributes/resource.tf b/examples/resources/dbtcloud_extended_attributes/resource.tf index 673ad00..df093e8 100644 --- a/examples/resources/dbtcloud_extended_attributes/resource.tf +++ b/examples/resources/dbtcloud_extended_attributes/resource.tf @@ -15,7 +15,7 @@ resource "dbtcloud_extended_attributes" "my_attributes" { } resource "dbtcloud_environment" "issue_depl" { - dbt_version = "versionless" + dbt_version = "latest" name = "My environment" project_id = var.dbt_project.id type = "deployment" diff --git a/templates/guides/1_getting_started.md b/templates/guides/1_getting_started.md index 2fa4c81..305e08b 100644 --- a/templates/guides/1_getting_started.md +++ b/templates/guides/1_getting_started.md @@ -99,7 +99,7 @@ resource "dbtcloud_project_repository" "my_project_repository" { // here both are linked to the same Data Warehouse connection // for Prod, we need to create a credential as well resource "dbtcloud_environment" "my_dev" { - dbt_version = "versionless" + dbt_version = "latest" name = "Dev" project_id = dbtcloud_project.my_project.id type = "development" @@ -107,7 +107,7 @@ resource "dbtcloud_environment" "my_dev" { } resource "dbtcloud_environment" "my_prod" { - dbt_version = "versionless" + dbt_version = "latest" name = "Prod" project_id = dbtcloud_project.my_project.id type = "deployment" From eaaf642bfc700b052fe168e20c23653235863225 Mon Sep 17 00:00:00 2001 From: Craig Squire <677724+csquire@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:54:08 -0600 Subject: [PATCH 7/7] fix: Update tests to use latest instead of versionless --- pkg/framework/acctest_helper/acctest_helper.go | 2 +- pkg/sdkv2/data_sources/helpers_test.go | 2 +- pkg/sdkv2/resources/helpers_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/framework/acctest_helper/acctest_helper.go b/pkg/framework/acctest_helper/acctest_helper.go index 610f3f4..1cf88f5 100644 --- a/pkg/framework/acctest_helper/acctest_helper.go +++ b/pkg/framework/acctest_helper/acctest_helper.go @@ -41,7 +41,7 @@ func SharedClient() (*dbt_cloud.Client, error) { } const ( - DBT_CLOUD_VERSION = "versionless" + DBT_CLOUD_VERSION = "latest" ) var TestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){ diff --git a/pkg/sdkv2/data_sources/helpers_test.go b/pkg/sdkv2/data_sources/helpers_test.go index 5717c65..4680b32 100644 --- a/pkg/sdkv2/data_sources/helpers_test.go +++ b/pkg/sdkv2/data_sources/helpers_test.go @@ -8,7 +8,7 @@ import ( ) const ( - DBT_CLOUD_VERSION = "versionless" + DBT_CLOUD_VERSION = "latest" ) func providers() map[string]*schema.Provider { diff --git a/pkg/sdkv2/resources/helpers_test.go b/pkg/sdkv2/resources/helpers_test.go index bea0742..485bf6a 100644 --- a/pkg/sdkv2/resources/helpers_test.go +++ b/pkg/sdkv2/resources/helpers_test.go @@ -9,7 +9,7 @@ import ( ) const ( - DBT_CLOUD_VERSION = "versionless" + DBT_CLOUD_VERSION = "latest" ) var testAccProviders map[string]*schema.Provider