@@ -10,6 +10,33 @@ import (
1010)
1111
1212var  (
13+ 	testHostSet  =  ` 
14+ resource "boundary_host_catalog" "foo" { 
15+ 	depends_on  = [boundary_role.proj1_admin] 
16+ 	type 		= "static" 
17+ 	name        = "foo" 
18+ 	description = "bar" 
19+ 	scope_id    = boundary_scope.proj1.id 
20+ } 
21+ 
22+ resource "boundary_host" "foo" { 
23+ 	depends_on  	= [boundary_host_catalog.foo] 
24+ 	type            = "static" 
25+ 	host_catalog_id = boundary_host_catalog.foo.id 
26+ 	name            = "host_1" 
27+ 	description     = "My first host!" 
28+ 	address         = "10.0.0.1" 
29+ } 
30+ 
31+ resource "boundary_host_set" "foo" { 
32+ 	host_catalog_id = boundary_host_catalog.foo.id 
33+ 	type            = "static" 
34+ 	host_ids = [ 
35+ 		boundary_host.foo.id, 
36+ 	] 
37+ } 
38+ ` 
39+ 
1340	fooHostSetsDataMissingHostCatalogId  =  ` 
1441data "boundary_host_sets" "foo" {} 
1542` 
@@ -35,7 +62,7 @@ func TestAccDataSourceHostSets(t *testing.T) {
3562				ExpectError : regexp .MustCompile ("host_catalog_id: The field is incorrectly formatted." ),
3663			},
3764			{
38- 				Config : testConfig (url , fooOrg , firstProjectFoo , fooHostset , fooHostSetsData ),
65+ 				Config : testConfig (url , fooOrg , firstProjectFoo , testHostSet , fooHostSetsData ),
3966				Check : resource .ComposeAggregateTestCheckFunc (
4067					resource .TestCheckResourceAttrSet ("data.boundary_host_sets.foo" , "host_catalog_id" ),
4168					resource .TestCheckResourceAttr ("data.boundary_host_sets.foo" , "items.#" , "1" ),
0 commit comments