azurermDedicatedHost
Manage a Dedicated Host within a Dedicated Host Group.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermDedicatedHostGroupExample =
new azurerm.dedicatedHostGroup.DedicatedHostGroup(this, "example_1", {
location: azurermResourceGroupExample.location,
name: "example-host-group",
platform_fault_domain_count: 2,
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDedicatedHostGroupExample.overrideLogicalId("example");
const azurermDedicatedHostExample = new azurerm.dedicatedHost.DedicatedHost(
this,
"example_2",
{
dedicated_host_group_id: azurermDedicatedHostGroupExample.id,
location: azurermResourceGroupExample.location,
name: "example-host",
platform_fault_domain: 1,
sku_name: "DSv3-Type1",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDedicatedHostExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
-
name- (Required) Specifies the name of this Dedicated Host. Changing this forces a new resource to be created. -
dedicatedHostGroupId- (Required) Specifies the ID of the Dedicated Host Group where the Dedicated Host should exist. Changing this forces a new resource to be created. -
location- (Required) Specify the supported Azure location where the resource exists. Changing this forces a new resource to be created. -
skuName- (Required) Specify the SKU name of the Dedicated Host. Possible values aredadSv5Type1,daSv4Type1,daSv4Type2,daSv5Type1,dcSv2Type1,ddSv4Type1,ddSv4Type2,ddSv5Type1,dSv3Type1,dSv3Type2,dSv3Type3,dSv3Type4,dSv4Type1,dSv4Type2,dSv5Type1,eadSv5Type1,eaSv4Type1,eaSv4Type2,eaSv5Type1,edSv4Type1,edSv4Type2,edSv5Type1,eSv3Type1,eSv3Type2,eSv3Type3,eSv3Type4,eSv4Type1,eSv4Type2,eSv5Type1,fSv2Type2,fSv2Type3,fSv2Type4,fXmdsType1,lSv2Type1,lSv3Type1,mdmSv2MedMemType1,mdSv2MedMemType1,mmSv2MedMemType1,msType1,mSmType1,mSmv2Type1,mSv2Type1,mSv2MedMemType1,nvaSv4Type1andnvSv3Type1. Changing this forces a new resource to be created. -
platformFaultDomain- (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.
-
autoReplaceOnFailure- (Optional) Should the Dedicated Host automatically be replaced in case of a Hardware Failure? Defaults totrue. -
licenseType- (Optional) Specifies the software license type that will be applied to the VMs deployed on the Dedicated Host. Possible values arenone,windowsServerHybridandwindowsServerPerpetual. Defaults tonone. -
tags- (Optional) A mapping of tags to assign to the resource.
Attributes Reference
The following attributes are exported:
id- The ID of the Dedicated Host.
Timeouts
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 30 minutes) Used when creating the Dedicated Host.update- (Defaults to 30 minutes) Used when updating the Dedicated Host.read- (Defaults to 5 minutes) Used when retrieving the Dedicated Host.delete- (Defaults to 30 minutes) Used when deleting the Dedicated Host.
Import
Dedicated Hosts can be imported using the resourceId, e.g.