Skip to content

Commit

Permalink
changed account_name to automation_account_name
Browse files Browse the repository at this point in the history
  • Loading branch information
bgelens committed Jul 29, 2018
1 parent 142ef0b commit 4b23f8f
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions azurerm/resource_arm_automation_dsc_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func resourceArmAutomationDscConfiguration() *schema.Resource {
ForceNew: true,
},

"account_name": {
"automation_account_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand All @@ -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))

Expand Down Expand Up @@ -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
}
Expand Down
14 changes: 7 additions & 7 deletions azurerm/resource_arm_automation_dsc_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
6 changes: 3 additions & 3 deletions azurerm/resource_arm_automation_dsc_nodeconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func resourceArmAutomationDscNodeConfiguration() *schema.Resource {
ForceNew: true,
},

"account_name": {
"automation_account_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand All @@ -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, ".")
Expand Down Expand Up @@ -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
}
Expand Down
22 changes: 11 additions & 11 deletions azurerm/resource_arm_automation_dsc_nodeconfiguration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = <<mofcontent
name = "test.localhost"
resource_group_name = "${azurerm_resource_group.test.name}"
automation_account_name = "${azurerm_automation_account.test.name}"
depends_on = ["azurerm_automation_dsc_configuration.test"]
content = <<mofcontent
instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
{
ResourceID = "[File]bla";
Expand Down
6 changes: 3 additions & 3 deletions azurerm/resource_arm_automation_module.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func resourceArmAutomationModule() *schema.Resource {
ForceNew: true,
},

"account_name": {
"automation_account_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Expand Down Expand Up @@ -78,7 +78,7 @@ func resourceArmAutomationModuleCreateUpdate(d *schema.ResourceData, meta interf

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)
contentLink := expandModuleLink(d)

parameters := automation.ModuleCreateOrUpdateParameters{
Expand Down Expand Up @@ -130,7 +130,7 @@ func resourceArmAutomationModuleRead(d *schema.ResourceData, meta interface{}) e

d.Set("name", resp.Name)
d.Set("resource_group_name", resGroup)
d.Set("account_name", accName)
d.Set("automation_account_name", accName)

return nil
}
Expand Down
10 changes: 5 additions & 5 deletions azurerm/resource_arm_automation_module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func testCheckAzureRMAutomationModuleDestroy(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 {
Expand Down Expand Up @@ -79,7 +79,7 @@ func testCheckAzureRMAutomationModuleExists(name string) resource.TestCheckFunc
}

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 {
Expand Down Expand Up @@ -120,9 +120,9 @@ resource "azurerm_automation_account" "test" {
}
resource "azurerm_automation_module" "test" {
name = "xActiveDirectory"
resource_group_name = "${azurerm_resource_group.test.name}"
account_name = "${azurerm_automation_account.test.name}"
name = "xActiveDirectory"
resource_group_name = "${azurerm_resource_group.test.name}"
automation_account_name = "${azurerm_automation_account.test.name}"
module_link = {
uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"
Expand Down

0 comments on commit 4b23f8f

Please sign in to comment.