Skip to content

Commit

Permalink
Adding #9951
Browse files Browse the repository at this point in the history
  • Loading branch information
WodansSon authored Dec 20, 2020
1 parent 78ae494 commit 28dccb4
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
22 changes: 22 additions & 0 deletions azurerm/internal/services/compute/dedicated_host_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,28 @@ func resourceArmDedicatedHost() *schema.Resource {
"ESv3-Type1",
"ESv3-Type2",
"FSv2-Type2",
"DASv4-Type1",
"DCSv2-Type1",
"DDSv4-Type1",
"DSv3-Type1",
"DSv3-Type2",
"DSv3-Type3",
"DSv4-Type1",
"EASv4-Type1",
"EDSv4-Type1",
"ESv3-Type1",
"ESv3-Type2",
"ESv3-Type3",
"ESv4-Type1",
"FSv2-Type2",
"FSv2-Type3",
"LSv2-Type1",
"MS-Type1",
"MSm-Type1",
"MSmv2-Type1",
"MSv2-Type1",
"NVASv4-Type1",
"NVSv3-Type1",
}, false),
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ func TestAccAzureRMDedicatedHost_basic(t *testing.T) {
})
}

func TestAccAzureRMDedicatedHost_basicNewSku(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_dedicated_host", "test")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.PreCheck(t) },
Providers: acceptance.SupportedProviders,
CheckDestroy: testCheckAzureRMDedicatedHostDestroy,
Steps: []resource.TestStep{
{
Config: testAccAzureRMDedicatedHost_basicNewSku(data),
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMDedicatedHostExists(data.ResourceName),
),
},
data.ImportStep(),
},
})
}

func TestAccAzureRMDedicatedHost_autoReplaceOnFailure(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_dedicated_host", "test")

Expand Down Expand Up @@ -241,6 +260,21 @@ resource "azurerm_dedicated_host" "test" {
`, template, data.RandomInteger)
}

func testAccAzureRMDedicatedHost_basicNewSku(data acceptance.TestData) string {
template := testAccAzureRMDedicatedHost_template(data)
return fmt.Sprintf(`
%s
resource "azurerm_dedicated_host" "test" {
name = "acctest-DH-%d"
location = azurerm_resource_group.test.location
dedicated_host_group_id = azurerm_dedicated_host_group.test.id
sku_name = "DCSv2-Type1"
platform_fault_domain = 1
}
`, template, data.RandomInteger)
}

func testAccAzureRMDedicatedHost_autoReplaceOnFailure(data acceptance.TestData, replace bool) string {
template := testAccAzureRMDedicatedHost_template(data)
return fmt.Sprintf(`
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/dedicated_host.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following arguments are supported:

* `location` - (Required) Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created.

* `sku_name` - (Required) Specify the sku name of the Dedicated Host. Possible values are `DSv3-Type1`, `DSv3-Type2`, `DSv4-Type1`, `ESv3-Type1`, `ESv3-Type2`,`FSv2-Type2`. Changing this forces a new resource to be created.
* `sku_name` - (Required) Specify the sku name of the Dedicated Host. Possible values are `DSv3-Type1`, `DSv3-Type2`, `DSv4-Type1`, `ESv3-Type1`, `ESv3-Type2`,`FSv2-Type2`, `DASv4-Type1`, `DCSv2-Type1`, `DDSv4-Type1`, `DSv3-Type1`, `DSv3-Type2`, `DSv3-Type3`, `DSv4-Type1`, `EASv4-Type1`, `EDSv4-Type1`, `ESv3-Type1`, `ESv3-Type2`, `ESv3-Type3`, `ESv4-Type1`, `FSv2-Type2`, `FSv2-Type3`, `LSv2-Type1`, `MS-Type1`, `MSm-Type1`, `MSmv2-Type1`, `MSv2-Type1`, `NVASv4-Type1`, and `NVSv3-Type1`. Changing this forces a new resource to be created.

* `platform_fault_domain` - (Required) Specify the fault domain of the Dedicated Host Group in which to create the Dedicated Host. Changing this forces a new resource to be created.

Expand Down

0 comments on commit 28dccb4

Please sign in to comment.