diff --git a/azurerm/resource_arm_automation_dsc_configuration.go b/azurerm/resource_arm_automation_dsc_configuration.go index 7f1aeec973112..5fb153c0194a9 100644 --- a/azurerm/resource_arm_automation_dsc_configuration.go +++ b/azurerm/resource_arm_automation_dsc_configuration.go @@ -27,7 +27,7 @@ func resourceArmAutomationDscConfiguration() *schema.Resource { ForceNew: true, }, - "account_name": { + "automation_account_name": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -53,7 +53,7 @@ func resourceArmAutomationDscConfigurationCreateUpdate(d *schema.ResourceData, m name := d.Get("name").(string) resGroup := d.Get("resource_group_name").(string) - accName := d.Get("account_name").(string) + accName := d.Get("automation_account_name").(string) content := d.Get("content").(string) location := azureRMNormalizeLocation(d.Get("location").(string)) @@ -111,7 +111,7 @@ func resourceArmAutomationDscConfigurationRead(d *schema.ResourceData, meta inte d.Set("name", resp.Name) d.Set("resource_group_name", resGroup) - d.Set("account_name", accName) + d.Set("automation_account_name", accName) return nil } diff --git a/azurerm/resource_arm_automation_dsc_configuration_test.go b/azurerm/resource_arm_automation_dsc_configuration_test.go index c4e4dea0099b6..562d103d04f1c 100644 --- a/azurerm/resource_arm_automation_dsc_configuration_test.go +++ b/azurerm/resource_arm_automation_dsc_configuration_test.go @@ -45,7 +45,7 @@ func testCheckAzureRMAutomationDscConfigurationDestroy(s *terraform.State) error } name := rs.Primary.Attributes["name"] - accName := rs.Primary.Attributes["account_name"] + accName := rs.Primary.Attributes["automation_account_name"] resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] if !hasResourceGroup { @@ -79,7 +79,7 @@ func testCheckAzureRMAutomationDscConfigurationExists(name string) resource.Test } name := rs.Primary.Attributes["name"] - accName := rs.Primary.Attributes["account_name"] + accName := rs.Primary.Attributes["automation_account_name"] resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] if !hasResourceGroup { @@ -120,11 +120,11 @@ resource "azurerm_automation_account" "test" { } resource "azurerm_automation_dsc_configuration" "test" { - name = "test" - resource_group_name = "${azurerm_resource_group.test.name}" - account_name = "${azurerm_automation_account.test.name}" - location = "${azurerm_resource_group.test.location}" - content = "configuration test {}" + name = "test" + resource_group_name = "${azurerm_resource_group.test.name}" + automation_account_name = "${azurerm_automation_account.test.name}" + location = "${azurerm_resource_group.test.location}" + content = "configuration test {}" } `, rInt, location, rInt) } diff --git a/azurerm/resource_arm_automation_dsc_nodeconfiguration.go b/azurerm/resource_arm_automation_dsc_nodeconfiguration.go index dd11bae81e4b2..b8945d9e5acee 100644 --- a/azurerm/resource_arm_automation_dsc_nodeconfiguration.go +++ b/azurerm/resource_arm_automation_dsc_nodeconfiguration.go @@ -28,7 +28,7 @@ func resourceArmAutomationDscNodeConfiguration() *schema.Resource { ForceNew: true, }, - "account_name": { + "automation_account_name": { Type: schema.TypeString, Required: true, ForceNew: true, @@ -52,7 +52,7 @@ func resourceArmAutomationDscNodeConfigurationCreateUpdate(d *schema.ResourceDat name := d.Get("name").(string) resGroup := d.Get("resource_group_name").(string) - accName := d.Get("account_name").(string) + accName := d.Get("automation_account_name").(string) content := d.Get("content").(string) s := strings.Split(name, ".") @@ -111,7 +111,7 @@ func resourceArmAutomationDscNodeConfigurationRead(d *schema.ResourceData, meta d.Set("name", resp.Name) d.Set("resource_group_name", resGroup) - d.Set("account_name", accName) + d.Set("automation_account_name", accName) return nil } diff --git a/azurerm/resource_arm_automation_dsc_nodeconfiguration_test.go b/azurerm/resource_arm_automation_dsc_nodeconfiguration_test.go index d1a8db8639edc..7b031185f67f8 100644 --- a/azurerm/resource_arm_automation_dsc_nodeconfiguration_test.go +++ b/azurerm/resource_arm_automation_dsc_nodeconfiguration_test.go @@ -45,7 +45,7 @@ func testCheckAzureRMAutomationDscNodeConfigurationDestroy(s *terraform.State) e } name := rs.Primary.Attributes["name"] - accName := rs.Primary.Attributes["account_name"] + accName := rs.Primary.Attributes["automation_account_name"] resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] if !hasResourceGroup { @@ -79,7 +79,7 @@ func testCheckAzureRMAutomationDscNodeConfigurationExists(name string) resource. } name := rs.Primary.Attributes["name"] - accName := rs.Primary.Attributes["account_name"] + accName := rs.Primary.Attributes["automation_account_name"] resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] if !hasResourceGroup { @@ -120,19 +120,19 @@ resource "azurerm_automation_account" "test" { } resource "azurerm_automation_dsc_configuration" "test" { - name = "test" - resource_group_name = "${azurerm_resource_group.test.name}" - account_name = "${azurerm_automation_account.test.name}" - location = "${azurerm_resource_group.test.location}" + name = "test" + resource_group_name = "${azurerm_resource_group.test.name}" + automation_account_name = "${azurerm_automation_account.test.name}" + location = "${azurerm_resource_group.test.location}" content = "configuration test {}" } resource "azurerm_automation_dsc_nodeconfiguration" "test" { - name = "test.localhost" - resource_group_name = "${azurerm_resource_group.test.name}" - account_name = "${azurerm_automation_account.test.name}" - depends_on = ["azurerm_automation_dsc_configuration.test"] - content = <