diff --git a/internal/services/streamanalytics/stream_analytics_output_servicebus_topic_resource_test.go b/internal/services/streamanalytics/stream_analytics_output_servicebus_topic_resource_test.go index 43c3d5c0d745..6541acc9fdee 100644 --- a/internal/services/streamanalytics/stream_analytics_output_servicebus_topic_resource_test.go +++ b/internal/services/streamanalytics/stream_analytics_output_servicebus_topic_resource_test.go @@ -114,13 +114,13 @@ func TestAccStreamAnalyticsOutputServiceBusTopic_requiresImport(t *testing.T) { }) } -func TestAccStreamAnalyticsOutputServiceBusTopic_authenticationMode(t *testing.T) { +func TestAccStreamAnalyticsOutputServiceBusTopic_authenticationModeMsi(t *testing.T) { data := acceptance.BuildTestData(t, "azurerm_stream_analytics_output_servicebus_topic", "test") r := StreamAnalyticsOutputServiceBusTopicResource{} data.ResourceTest(t, r, []acceptance.TestStep{ { - Config: r.json(data), + Config: r.authenticationModeMsi(data), Check: acceptance.ComposeTestCheckFunc( check.That(data.ResourceName).ExistsInAzure(r), ), @@ -248,6 +248,28 @@ resource "azurerm_stream_analytics_output_servicebus_topic" "test" { `, template, data.RandomInteger) } +func (r StreamAnalyticsOutputServiceBusTopicResource) authenticationModeMsi(data acceptance.TestData) string { + template := r.template(data) + return fmt.Sprintf(` +%s + +resource "azurerm_stream_analytics_output_servicebus_topic" "test" { + name = "acctestinput-%d" + stream_analytics_job_name = azurerm_stream_analytics_job.test.name + resource_group_name = azurerm_stream_analytics_job.test.resource_group_name + topic_name = azurerm_servicebus_topic.test.name + servicebus_namespace = azurerm_servicebus_namespace.test.name + authentication_mode = "Msi" + + serialization { + type = "Json" + encoding = "UTF8" + format = "LineSeparated" + } +} +`, template, data.RandomInteger) +} + func (r StreamAnalyticsOutputServiceBusTopicResource) propertyColumns(data acceptance.TestData) string { template := r.template(data) return fmt.Sprintf(`