Skip to content

Commit 5b01b5c

Browse files
committed
Allow whitespace in custom properties
1 parent c35efc5 commit 5b01b5c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

synthetics/resource_api_check_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func resourceApiCheckV2() *schema.Resource {
209209
"value": {
210210
Type: schema.TypeString,
211211
Optional: true,
212-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters with no whitespace"),
212+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_| ){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters and whitespace"),
213213
},
214214
},
215215
},

synthetics/resource_browser_check_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func resourceBrowserCheckV2() *schema.Resource {
312312
"value": {
313313
Type: schema.TypeString,
314314
Optional: true,
315-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters with no whitespace"),
315+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_| ){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters and whitespace"),
316316
},
317317
},
318318
},

synthetics/resource_browser_check_v2_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" {
241241
scheduling_strategy = "concurrent"
242242
custom_properties {
243243
key = "beepkey"
244-
value = "boopvalue"
244+
value = "boop value 2"
245245
}
246246
advanced_settings {
247247
verify_certificates = false
@@ -505,7 +505,7 @@ func TestAccCreateUpdateBrowserCheckV2(t *testing.T) {
505505
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.name", "01-acceptance-updated-Terraform-Browser-V2"),
506506
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.scheduling_strategy", "concurrent"),
507507
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.custom_properties.0.key", "beepkey"),
508-
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.custom_properties.0.value", "boopvalue"),
508+
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.custom_properties.0.value", "boop value 2"),
509509
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.advanced_settings.0.verify_certificates", "false"),
510510
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.advanced_settings.0.user_agent", "Jozilla/5.0"),
511511
resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.advanced_settings.0.collect_interactive_metrics", "false"),

synthetics/resource_http_check_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func resourceHttpCheckV2() *schema.Resource {
182182
"value": {
183183
Type: schema.TypeString,
184184
Optional: true,
185-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters with no whitespace"),
185+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_| ){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters and whitespace"),
186186
},
187187
},
188188
},

synthetics/resource_port_check_v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func resourcePortCheckV2() *schema.Resource {
114114
"value": {
115115
Type: schema.TypeString,
116116
Optional: true,
117-
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters with no whitespace"),
117+
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9](\w|-|_| ){1,128}$`), "custom_properties value can only consist of alphanumeric and underscore characters and whitespace"),
118118
},
119119
},
120120
},

0 commit comments

Comments
 (0)