diff --git a/azurerm/helpers/azure/servicebus.go b/azurerm/helpers/azure/servicebus.go index 67732ac54d55e..4543948b406f5 100644 --- a/azurerm/helpers/azure/servicebus.go +++ b/azurerm/helpers/azure/servicebus.go @@ -28,8 +28,8 @@ func ValidateServiceBusSubscriptionName() schema.SchemaValidateFunc { func ValidateServiceBusTopicName() schema.SchemaValidateFunc { return validation.StringMatch( - regexp.MustCompile("^[a-zA-Z0-9][-._/a-zA-Z0-9]{0,258}[a-zA-Z0-9]$"), - "The topic name can contain only letters, numbers, periods, hyphens, slashes and underscores. The namespace must start with a letter or number, and it must end with a letter or number and be less then 260 characters long.", + regexp.MustCompile("^[a-zA-Z0-9][-._~a-zA-Z0-9]{0,258}([a-zA-Z0-9])?$"), + "The topic name can contain only letters, numbers, periods, hyphens, tildas and underscores. The namespace must start with a letter or number, and it must end with a letter or number and be less then 260 characters long.", ) }