Skip to content

Commit

Permalink
streaming: handle importing topics with dot (#350)
Browse files Browse the repository at this point in the history
Handle dots and underscore in topic name. Make sure we match the full
topic ID string instead of partial.
  • Loading branch information
pgier authored Jan 25, 2024
1 parent 4bb97e3 commit 749565a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/resource_streaming_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,8 @@ func (t *StreamingTopicResourceModel) generateStreamingTopicID() string {
}

var (
streamingTopicIDPattern = `([a-z][a-z0-9-]*):(persistent|non-persistent)://` +
`([a-z][a-z0-9-]*)/([a-z][a-z0-9-]*)/([a-z][a-z0-9-]*)`
streamingTopicIDPattern = `^([a-z][a-z0-9-]*):(persistent|non-persistent)://` +
`([a-z][a-z0-9-]*)/([a-z][a-z0-9-]*)/([a-z][a-z0-9-._]*)$`
streamingTopicIDRegex = regexp.MustCompile(streamingTopicIDPattern)
)

Expand Down

0 comments on commit 749565a

Please sign in to comment.