@@ -61,6 +61,22 @@ func TestAccResourceExceptionList(t *testing.T) {
6161 resource .TestCheckResourceAttr ("elasticstack_kibana_security_exception_list.test" , "tags.1" , "updated" ),
6262 ),
6363 },
64+ { // Import
65+ SkipFunc : versionutils .CheckIfVersionIsUnsupported (minExceptionListAPISupport ),
66+ ProtoV6ProviderFactories : acctest .Providers ,
67+ ConfigDirectory : acctest .NamedTestCaseDirectory ("update" ),
68+ ConfigVariables : config.Variables {
69+ "list_id" : config .StringVariable ("test-exception-list" ),
70+ "name" : config .StringVariable ("Test Exception List Updated" ),
71+ "description" : config .StringVariable ("Updated description" ),
72+ "type" : config .StringVariable ("detection" ),
73+ "namespace_type" : config .StringVariable ("single" ),
74+ "tags" : config .ListVariable (config .StringVariable ("test" ), config .StringVariable ("updated" )),
75+ },
76+ ResourceName : "elasticstack_kibana_security_exception_list.test" ,
77+ ImportState : true ,
78+ ImportStateVerify : true ,
79+ },
6480 },
6581 })
6682}
@@ -131,6 +147,22 @@ func TestAccResourceExceptionListWithSpace(t *testing.T) {
131147 resource .TestCheckResourceAttr (resourceName , "tags.2" , "updated" ),
132148 ),
133149 },
150+ { // Import
151+ SkipFunc : versionutils .CheckIfVersionIsUnsupported (minExceptionListAPISupport ),
152+ ConfigDirectory : acctest .NamedTestCaseDirectory ("update" ),
153+ ConfigVariables : config.Variables {
154+ "space_id" : config .StringVariable (spaceID ),
155+ "list_id" : config .StringVariable ("test-exception-list-space" ),
156+ "name" : config .StringVariable ("Test Exception List in Space Updated" ),
157+ "description" : config .StringVariable ("Updated description in space" ),
158+ "type" : config .StringVariable ("detection" ),
159+ "namespace_type" : config .StringVariable ("single" ),
160+ "tags" : config .ListVariable (config .StringVariable ("test" ), config .StringVariable ("space" ), config .StringVariable ("updated" )),
161+ },
162+ ResourceName : resourceName ,
163+ ImportState : true ,
164+ ImportStateVerify : true ,
165+ },
134166 },
135167 })
136168}
0 commit comments