Skip to content

azurermStackHciCluster

Manages an Azure Stack HCI Cluster.

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";
import * as azuread from "./.gen/providers/azuread";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm, azuread.
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 dataAzureadApplicationExample =
  new azuread.dataAzureadApplication.DataAzureadApplication(this, "example_1", {
    display_name: "Allowed resource types",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzureadApplicationExample.overrideLogicalId("example");
const dataAzurermClientConfigCurrent =
  new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
    this,
    "current",
    {}
  );
const azurermStackHciClusterExample =
  new azurerm.stackHciCluster.StackHciCluster(this, "example_3", {
    client_id: dataAzureadApplicationExample.applicationId,
    location: azurermResourceGroupExample.location,
    name: "example-cluster",
    resource_group_name: azurermResourceGroupExample.name,
    tenant_id: dataAzurermClientConfigCurrent.tenantId,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermStackHciClusterExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Azure Stack HCI Cluster. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the Resource Group where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.

  • location - (Required) The Azure Region where the Azure Stack HCI Cluster should exist. Changing this forces a new resource to be created.

  • clientId - (Required) The Client ID of the Azure Active Directory which is used by the Azure Stack HCI Cluster. Changing this forces a new resource to be created.

  • tenantId - (Optional) The Tenant ID of the Azure Active Directory which is used by the Azure Stack HCI Cluster. Changing this forces a new resource to be created.

\~> NOTE If unspecified the Tenant ID of the Provider will be used.

  • tags - (Optional) A mapping of tags which should be assigned to the Azure Stack HCI Cluster.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Azure Stack HCI Cluster.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Azure Stack HCI Cluster.
  • read - (Defaults to 5 minutes) Used when retrieving the Azure Stack HCI Cluster.
  • update - (Defaults to 30 minutes) Used when updating the Azure Stack HCI Cluster.
  • delete - (Defaults to 30 minutes) Used when deleting the Azure Stack HCI Cluster.

Import

Azure Stack HCI Clusters can be imported using the resourceId, e.g.

terraform import azurerm_stack_hci_cluster.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AzureStackHCI/clusters/cluster1