From 6e968be7fa7e9397595f8fef41a58c2a3825f9af Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 6 Sep 2018 11:24:43 +0200 Subject: [PATCH] `azurerm_application_insights` - support for the MobileCenter kind ``` $ acctests azurerm TestAccAzureRMApplicationInsights_basicMobileCenter === RUN TestAccAzureRMApplicationInsights_basicMobileCenter --- PASS: TestAccAzureRMApplicationInsights_basicMobileCenter (76.28s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 76.616s ``` Fixes #1815 --- azurerm/resource_arm_application_insights.go | 1 + .../resource_arm_application_insights_test.go | 21 +++++++++++++++++++ .../docs/r/application_insights.html.markdown | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/azurerm/resource_arm_application_insights.go b/azurerm/resource_arm_application_insights.go index dbd74eedabcf..a54c580f5a21 100644 --- a/azurerm/resource_arm_application_insights.go +++ b/azurerm/resource_arm_application_insights.go @@ -41,6 +41,7 @@ func resourceArmApplicationInsights() *schema.Resource { "web", "other", "java", + "MobileCenter", "phone", "store", "ios", diff --git a/azurerm/resource_arm_application_insights_test.go b/azurerm/resource_arm_application_insights_test.go index c5e5a2523d49..2243021ffb02 100644 --- a/azurerm/resource_arm_application_insights_test.go +++ b/azurerm/resource_arm_application_insights_test.go @@ -52,6 +52,27 @@ func TestAccAzureRMApplicationInsights_basicJava(t *testing.T) { }) } +func TestAccAzureRMApplicationInsights_basicMobileCenter(t *testing.T) { + + ri := acctest.RandInt() + config := testAccAzureRMApplicationInsights_basic(ri, testLocation(), "MobileCenter") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMApplicationInsightsDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMApplicationInsightsExists("azurerm_application_insights.test"), + resource.TestCheckResourceAttr("azurerm_application_insights.test", "application_type", "MobileCenter"), + ), + }, + }, + }) +} + func TestAccAzureRMApplicationInsights_basicOther(t *testing.T) { ri := acctest.RandInt() diff --git a/website/docs/r/application_insights.html.markdown b/website/docs/r/application_insights.html.markdown index ec3abddcb539..96a23053fcf4 100644 --- a/website/docs/r/application_insights.html.markdown +++ b/website/docs/r/application_insights.html.markdown @@ -46,7 +46,7 @@ The following arguments are supported: * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -* `application_type` - (Required) Specifies the type of Application Insights to create. Valid values are `Web`, `Java`, `Phone`, `Store`, `iOS` and `Other`. +* `application_type` - (Required) Specifies the type of Application Insights to create. Valid values are `Java`, `iOS`, `MobileCenter`, `Other`, `Phone`, `Store` and `Web`. * `tags` - (Optional) A mapping of tags to assign to the resource.