@@ -60,6 +60,59 @@ func TestAccCreateSplunkConfigsConf(t *testing.T) {
60
60
})
61
61
}
62
62
63
+ const newConfigsConfSpecialChars = `
64
+ resource "splunk_configs_conf" "tftest-stanza-special-chars" {
65
+ name = "tf_test/sqs://tftest_stanza_special_chars"
66
+ variables = {
67
+ "disabled": "false"
68
+ "key": "value"
69
+ }
70
+ }
71
+ `
72
+
73
+ const updateConfigsConfSpecialChars = `
74
+ resource "splunk_configs_conf" "tftest-stanza-special-chars" {
75
+ name = "tf_test/sqs://tftest_stanza_special_chars"
76
+ variables = {
77
+ "disabled": "false"
78
+ "key": "new-value"
79
+ }
80
+ }
81
+ `
82
+
83
+ func TestAccCreateSplunkConfigsConfSpecialChars (t * testing.T ) {
84
+ resourceName := "splunk_configs_conf.tftest-stanza-special-chars"
85
+ resource .Test (t , resource.TestCase {
86
+ PreCheck : func () {
87
+ testAccPreCheck (t )
88
+ },
89
+ Providers : testAccProviders ,
90
+ CheckDestroy : testAccSplunkConfigsConfDestroyResources ,
91
+ Steps : []resource.TestStep {
92
+ {
93
+ Config : newConfigsConfSpecialChars ,
94
+ Check : resource .ComposeTestCheckFunc (
95
+ resource .TestCheckResourceAttr (resourceName , "variables.%" , "2" ),
96
+ resource .TestCheckResourceAttr (resourceName , "variables.key" , "value" ),
97
+ ),
98
+ },
99
+ {
100
+ Config : updateConfigsConfSpecialChars ,
101
+ Check : resource .ComposeTestCheckFunc (
102
+ resource .TestCheckResourceAttr (resourceName , "variables.%" , "2" ),
103
+ resource .TestCheckResourceAttr (resourceName , "variables.key" , "new-value" ),
104
+ ),
105
+ },
106
+ {
107
+ ResourceName : resourceName ,
108
+ ImportState : true ,
109
+ ImportStateVerify : true ,
110
+ },
111
+ },
112
+ })
113
+ }
114
+
115
+
63
116
func testAccSplunkConfigsConfDestroyResources (s * terraform.State ) error {
64
117
client , err := newTestClient ()
65
118
if err != nil {
0 commit comments