@@ -13,8 +13,10 @@ func TestAccChronicleReferenceList_chronicleReferencelistBasicExample_update(t *
1313 t .Parallel ()
1414
1515 context := map [string ]interface {}{
16- "chronicle_id" : envvar .GetTestChronicleInstanceIdFromEnv (t ),
17- "random_suffix" : acctest .RandString (t , 10 ),
16+ "chronicle_id" : envvar .GetTestChronicleInstanceIdFromEnv (t ),
17+ "random_suffix" : acctest .RandString (t , 10 ),
18+ "data_access_scope_id" : "test-scope-id" + acctest .RandString (t , 5 ),
19+ "data_access_scope_id_new" : "new-test-scope-id" + acctest .RandString (t , 5 ),
1820 }
1921
2022 acctest .VcrTest (t , resource.TestCase {
@@ -45,6 +47,16 @@ func TestAccChronicleReferenceList_chronicleReferencelistBasicExample_update(t *
4547
4648func testAccChronicleReferenceList_chronicleReferencelistBasicExample_basic (context map [string ]interface {}) string {
4749 return acctest .Nprintf (`
50+ resource "google_chronicle_data_access_scope" "test_scope" {
51+ location = "us"
52+ instance = "%{chronicle_id}"
53+ data_access_scope_id = "%{data_access_scope_id}"
54+ description = "test scope description"
55+ allowed_data_access_labels {
56+ log_type = "GCP_CLOUDAUDIT"
57+ }
58+ }
59+
4860resource "google_chronicle_reference_list" "example" {
4961 location = "us"
5062 instance = "%{chronicle_id}"
@@ -54,12 +66,29 @@ resource "google_chronicle_reference_list" "example" {
5466 value = "referencelist-entry-value"
5567 }
5668 syntax_type = "REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING"
69+ scope_info {
70+ reference_list_scope {
71+ scope_names = [
72+ google_chronicle_data_access_scope.test_scope.name
73+ ]
74+ }
75+ }
5776}
5877` , context )
5978}
6079
6180func testAccChronicleReferenceList_chronicleReferencelistBasicExample_update (context map [string ]interface {}) string {
6281 return acctest .Nprintf (`
82+ resource "google_chronicle_data_access_scope" "test_scope" {
83+ location = "us"
84+ instance = "%{chronicle_id}"
85+ data_access_scope_id = "%{data_access_scope_id_new}"
86+ description = "test scope description"
87+ allowed_data_access_labels {
88+ log_type = "GITHUB"
89+ }
90+ }
91+
6392resource "google_chronicle_reference_list" "example" {
6493 location = "us"
6594 instance = "%{chronicle_id}"
@@ -69,6 +98,13 @@ resource "google_chronicle_reference_list" "example" {
6998 value = "referencelist-entry-value-updated"
7099 }
71100 syntax_type = "REFERENCE_LIST_SYNTAX_TYPE_REGEX"
101+ scope_info {
102+ reference_list_scope {
103+ scope_names = [
104+ google_chronicle_data_access_scope.test_scope.name
105+ ]
106+ }
107+ }
72108}
73109` , context )
74110}
0 commit comments