Skip to content

Commit

Permalink
Merge pull request #13797 from aristosvo/servicebus/__subscription__n…
Browse files Browse the repository at this point in the history
…ame__

`azurerm_servicebus_subscription`: Support for `name="_somename_"`
  • Loading branch information
tombuildsstuff authored Oct 20, 2021
2 parents f310f7a + 0b9e781 commit 9d58430
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ resource "azurerm_servicebus_topic" "test" {
}
resource "azurerm_servicebus_subscription" "test" {
name = "acctestservicebussubscription-%d"
name = "_acctestservicebussubscription-%d_"
namespace_name = "${azurerm_servicebus_namespace.test.name}"
topic_name = "${azurerm_servicebus_topic.test.name}"
resource_group_name = "${azurerm_resource_group.test.name}"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/servicebus/validate/subscription_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func SubscriptionName() pluginsdk.SchemaValidateFunc {
return validation.StringMatch(
regexp.MustCompile("^[a-zA-Z0-9][-._a-zA-Z0-9]{0,48}([a-zA-Z0-9])?$"),
"The name can contain only letters, numbers, periods, hyphens and underscores. The name must start and end with a letter or number and be a maximum of 50 characters long.",
regexp.MustCompile("^[_a-zA-Z0-9][-._a-zA-Z0-9]{0,48}([_a-zA-Z0-9])?$"),
"The name can contain only letters, numbers, periods, hyphens and underscores. The name must start and end with a letter, number or underscore and be a maximum of 50 characters long.",
)
}

0 comments on commit 9d58430

Please sign in to comment.