Skip to content

Commit

Permalink
Upgrade Bot Service API version from 2021-03-01 to 2021-05-01-preview (
Browse files Browse the repository at this point in the history
…#16665)

Co-authored-by: Neil Ye (PACTERA TECHNOLOGIES INC) <v-cheye@microsoft.com>
  • Loading branch information
Neil Ye and Neil Ye (PACTERA TECHNOLOGIES INC) authored May 26, 2022
1 parent 5ba0455 commit 9a5bbd9
Show file tree
Hide file tree
Showing 50 changed files with 2,232 additions and 134 deletions.
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_alexa_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/bot/bot_channel_alexa_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/google/uuid"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
Expand Down Expand Up @@ -36,7 +36,7 @@ func testAccBotChannelAlexa_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_alexa", "test")
r := BotChannelAlexaResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -35,7 +35,7 @@ func testAccBotChannelDirectLineSpeech_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_direct_line_speech", "test")
r := BotChannelDirectLineSpeechResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down Expand Up @@ -151,8 +151,8 @@ resource "azurerm_bot_channel_direct_line_speech" "test" {
resource_group_name = azurerm_resource_group.test.name
cognitive_service_location = azurerm_cognitive_account.test.location
cognitive_service_access_key = azurerm_cognitive_account.test.primary_access_key
custom_speech_model_id = "0830f48d-f592-4709-b408-d723c0973fb1"
custom_voice_deployment_id = "4fc2752c-7e8e-4852-85a9-0f28fffa3edd"
custom_speech_model_id = "a9316355-7b04-4468-9f6e-114419e6c9cc"
custom_voice_deployment_id = "58dd86d4-31e3-4cf7-9b17-ee1d3dd77695"
}
`, BotChannelsRegistrationResource{}.basicConfig(data), data.RandomInteger)
}
Expand Down Expand Up @@ -188,8 +188,8 @@ resource "azurerm_bot_channel_direct_line_speech" "test" {
resource_group_name = azurerm_resource_group.test.name
cognitive_service_location = azurerm_cognitive_account.test2.location
cognitive_service_access_key = azurerm_cognitive_account.test2.primary_access_key
custom_speech_model_id = "4560f48d-f592-4709-b408-d723c0973fb1"
custom_voice_deployment_id = "8up2752c-7e8e-4852-85a9-0f28fffa3edd"
custom_speech_model_id = "cf7a4202-9be3-4195-9619-5a747260626d"
custom_voice_deployment_id = "b815f623-c217-4327-b765-f6e0fd7dceef"
}
`, BotChannelsRegistrationResource{}.basicConfig(data), data.RandomInteger, data.RandomInteger, data.Locations.Secondary, data.RandomInteger)
}
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_directline_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_email_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
6 changes: 3 additions & 3 deletions internal/services/bot/bot_channel_email_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand All @@ -17,7 +17,7 @@ import (

type BotChannelEmailResource struct{}

func TestAccBotChannelEmail_basic(t *testing.T) {
func testAccBotChannelEmail_basic(t *testing.T) {
if ok := skipEmailChannel(); ok {
t.Skip("Skipping as one of `ARM_TEST_EMAIL`, AND `ARM_TEST_EMAIL_PASSWORD` was not specified")
}
Expand All @@ -35,7 +35,7 @@ func TestAccBotChannelEmail_basic(t *testing.T) {
})
}

func TestAccBotChannelEmail_update(t *testing.T) {
func testAccBotChannelEmail_update(t *testing.T) {
if ok := skipEmailChannel(); ok {
t.Skip("Skipping as one of `ARM_TEST_EMAIL`, AND `ARM_TEST_EMAIL_PASSWORD` was not specified")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_facebook_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/bot/bot_channel_facebook_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -40,7 +40,7 @@ func testAccBotChannelFacebook_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_facebook", "test")
r := BotChannelFacebookResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_line_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/bot/bot_channel_line_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -40,7 +40,7 @@ func testAccBotChannelLine_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_line", "test")
r := BotChannelLineResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_ms_teams_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_slack_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_slack_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_sms_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/bot/bot_channel_sms_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -40,7 +40,7 @@ func testAccBotChannelSMS_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_sms", "test")
r := BotChannelSMSResource{}

data.ResourceTest(t, r, []acceptance.TestStep{
data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
7 changes: 7 additions & 0 deletions internal/services/bot/bot_channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ func TestAccBotChannelsRegistration(t *testing.T) {
"update": testAccBotChannelsRegistration_update,
"complete": testAccBotChannelsRegistration_complete,
},
"bot": {
"basic": testAccBotServiceAzureBot_basic,
"completeUpdate": testAccBotServiceAzureBot_completeUpdate,
"requiresImport": testAccBotServiceAzureBot_requiresImport,
},
"connection": {
"basic": testAccBotConnection_basic,
"complete": testAccBotConnection_complete,
Expand All @@ -23,6 +28,8 @@ func TestAccBotChannelsRegistration(t *testing.T) {
"alexaBasic": testAccBotChannelAlexa_basic,
"alexaUpdate": testAccBotChannelAlexa_update,
"alexaRequiresImport": testAccBotChannelAlexa_requiresImport,
"emailBasic": testAccBotChannelEmail_basic,
"emailUpdate": testAccBotChannelEmail_update,
"slackBasic": testAccBotChannelSlack_basic,
"slackComplete": testAccBotChannelSlack_complete,
"slackUpdate": testAccBotChannelSlack_update,
Expand Down
2 changes: 1 addition & 1 deletion internal/services/bot/bot_channel_web_chat_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/terraform-provider-azurerm/helpers/azure"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
Expand Down
5 changes: 3 additions & 2 deletions internal/services/bot/bot_channel_web_chat_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"testing"

"github.com/Azure/azure-sdk-for-go/services/botservice/mgmt/2021-03-01/botservice"
"github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2021-05-01-preview/botservice"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -34,7 +34,8 @@ func testAccBotChannelWebChat_basic(t *testing.T) {
func testAccBotChannelWebChat_requiresImport(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_bot_channel_web_chat", "test")
r := BotChannelWebChatResource{}
data.ResourceTest(t, r, []acceptance.TestStep{

data.ResourceSequentialTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
Loading

0 comments on commit 9a5bbd9

Please sign in to comment.