-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DWX-19297 Extend hive virtual warehouse with all available properties (…
…#186) This change exposes all properties required for creating a Hive virtual warehouse in a data warehouse CDP cluster. In addition to creation, it introduces the capability to delete the virtual warehouse. However, update and import functionalities are not included in this change. The virtual warehouse is dependent on the data warehouse cluster and a data lake object. Conflicting properties have been validated using the validation framework. Testing The changes have been tested using new unit and acceptance tests: - The acceptance tests create a CDP environment, a data lake, and an AWS-based Kubernetes cluster for the data warehouse. The Hive virtual warehouse is deployed on this Kubernetes cluster. - Both failure and success scenarios have been verified with the new unit tests. Examples and documentation have been generated for this change.
- Loading branch information
Showing
11 changed files
with
791 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,7 +143,6 @@ func TestAccDwCluster_Basic(t *testing.T) { | |
StorageLocationBase: os.Getenv(AwsStorageLocationBase), | ||
Runtime: os.Getenv(AwsRuntime), | ||
} | ||
resourceName := "cdp_dw_aws_cluster.test_data_warehouse_aws" | ||
resource.Test(t, resource.TestCase{ | ||
PreCheck: func() { | ||
cdpacctest.PreCheck(t) | ||
|
@@ -168,8 +167,12 @@ func TestAccDwCluster_Basic(t *testing.T) { | |
testAccDwCatalog(), | ||
testAccHiveVirtualWarehouse(cdpacctest.RandomShortWithPrefix("tf-hive"))), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestCheckResourceAttr(resourceName, "name", envParams.Name), | ||
resource.TestCheckResourceAttr(resourceName, "status", "Accepted"), | ||
resource.TestCheckResourceAttr("cdp_dw_aws_cluster.test_data_warehouse_aws", "name", envParams.Name), | ||
resource.TestCheckResourceAttr("cdp_dw_aws_cluster.test_data_warehouse_aws", "status", "Accepted"), | ||
resource.TestCheckResourceAttrSet("cdp_dw_vw_hive.test_hive", "compactor"), | ||
resource.TestCheckResourceAttrSet("cdp_dw_vw_hive.test_hive", "jdbc_url"), | ||
resource.TestCheckResourceAttrSet("cdp_dw_vw_hive.test_hive", "hue_url"), | ||
resource.TestCheckResourceAttrSet("cdp_dw_vw_hive.test_hive", "jwt_token_gen_url"), | ||
), | ||
}, | ||
// Delete testing automatically occurs in TestCase | ||
|
@@ -283,6 +286,23 @@ func testAccHiveVirtualWarehouse(name string) string { | |
cluster_id = cdp_dw_aws_cluster.test_data_warehouse_aws.cluster_id | ||
database_catalog_id = cdp_dw_database_catalog.test_catalog.id | ||
name = %[1]q | ||
group_size = 2 | ||
platform_jwt_auth = true | ||
enable_sso = true | ||
min_group_count = 2 | ||
max_group_count = 5 | ||
disable_auto_suspend = false | ||
auto_suspend_timeout_seconds = 100 | ||
scale_wait_time_seconds = 230 | ||
max_concurrent_isolated_queries = 10 | ||
max_nodes_per_isolated_query = 10 | ||
aws_options = { | ||
availability_zone = "us-west-2a" | ||
ebs_llap_spill_gb = 300 | ||
tags = { | ||
owner = "[email protected]" | ||
} | ||
} | ||
} | ||
`, name) | ||
} | ||
|
Oops, something went wrong.