Skip to content

azurermServiceFabricManagedCluster

Manages a Resource 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.*/
new azurerm.serviceFabricManagedCluster.ServiceFabricManagedCluster(
  this,
  "example",
  {
    client_connection_port: 12345,
    http_gateway_port: 4567,
    lb_rule: [
      {
        backend_port: 38080,
        frontend_port: 80,
        probe_protocol: "http",
        probe_request_path: "/test",
        protocol: "tcp",
      },
    ],
    location: "West Europe",
    name: "example",
    node_type: [
      {
        application_port_range: "30000-49000",
        data_disk_size_gb: 130,
        ephemeral_port_range: "10000-20000",
        name: "test1",
        primary: true,
        vm_image_offer: "WindowsServer",
        vm_image_publisher: "MicrosoftWindowsServer",
        vm_image_sku: "2019-Datacenter-with-Containers",
        vm_image_version: "latest",
        vm_instance_count: 5,
        vm_size: "Standard_DS1_v2",
      },
    ],
    resource_group_name: "example",
  }
);

Arguments Reference

The following arguments are supported:

  • clientConnectionPort - (Required) Port to use when connecting to the cluster.

  • httpGatewayPort - (Required) Port that should be used by the Service Fabric Explorer to visualize applications and cluster status.

  • lbRule - (Required) One or more lbRule blocks as defined below.

  • location - (Required) The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created.

  • name - (Required) The name which should be used for this Resource Group. Changing this forces a new Resource Group to be created.

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


  • authentication - (Optional) Controls how connections to the cluster are authenticated. A authentication block as defined below.

  • backupServiceEnabled - (Optional) If true, backup service is enabled.

  • customFabricSetting - (Optional) One or more customFabricSetting blocks as defined below.

  • dnsName - (Optional) Hostname for the cluster. If unset the cluster's name will be used..

  • dnsServiceEnabled - (Optional) If true, DNS service is enabled.

  • nodeType - (Optional) One or more nodeType blocks as defined below.

  • password - (Optional) Administrator password for the VMs that will be created as part of this cluster.

  • sku - (Optional) SKU for this cluster. Changing this forces a new resource to be created. Default is basic, allowed values are either basic or standard.

  • tags - (Optional) A mapping of tags which should be assigned to the Resource Group.

  • upgradeWave - (Optional) Upgrade wave for the fabric runtime. Default is wave0, allowed value must be one of wave0, wave1, or wave2.

  • username - (Optional) Administrator password for the VMs that will be created as part of this cluster.


A activeDirectory block supports the following:

  • clientApplicationId - (Required) The ID of the Client Application.

  • clusterApplicationId - (Required) The ID of the Cluster Application.

  • tenantId - (Required) The ID of the Tenant.


A authentication block supports the following:

  • activeDirectory - (Optional) A activeDirectory block as defined above.

  • certificate - (Optional) One or more certificate blocks as defined below.


A certificate block supports the following:

  • thumbprint - (Required) The thumbprint of the certificate.

  • type - (Required) The type of the certificate. Can be adminClient or readOnlyClient.

  • commonName - (Optional) The certificate's CN.


A certificates block supports the following:

  • store - (Required) The certificate store on the Virtual Machine to which the certificate should be added.

  • url - (Required) The URL of a certificate that has been uploaded to Key Vault as a secret


A customFabricSetting block supports the following:

  • parameter - (Required) Parameter name.

  • section - (Required) Section name.

  • value - (Required) Parameter value.


A lbRule block supports the following:

  • backendPort - (Required) LB Backend port.

  • frontendPort - (Required) LB Frontend port.

  • probeProtocol - (Required) Protocol for the probe. Can be one of tcp, udp, http, or https.

  • probeRequestPath - (Optional) Path for the probe to check, when probe protocol is set to http.

  • protocol - (Required) The transport protocol used in this rule. Can be one of tcp or udp.


A nodeType block supports the following:

  • applicationPortRange - (Required) Sets the port range available for applications. Format is <fromPort>-<toPort>, for example 1000020000.

  • dataDiskSizeGb - (Required) The size of the data disk in gigabytes..

  • ephemeralPortRange - (Required) Sets the port range available for the OS. Format is <fromPort>-<toPort>, for example 1000020000. There has to be at least 255 ports available and cannot overlap with applicationPortRange..

  • name - (Required) The name which should be used for this node type.

  • vmImageOffer - (Required) The offer type of the marketplace image cluster VMs will use.

  • vmImagePublisher - (Required) The publisher of the marketplace image cluster VMs will use.

  • vmImageSku - (Required) The SKU of the marketplace image cluster VMs will use.

  • vmImageVersion - (Required) The version of the marketplace image cluster VMs will use.

  • vmInstanceCount - (Required) The number of instances this node type will launch.

  • vmSize - (Required) The size of the instances in this node type.

  • capacities - (Optional) Specifies a list of key/value pairs used to set capacity tags for this node type.

  • dataDiskType - (Optional) The type of the disk to use for storing data. It can be one of premiumLrs, standardLrs, or standardSsdLrs.

  • multiplePlacementGroupsEnabled - (Optional) If set the node type can be composed of multiple placement groups.

  • placementProperties - (Optional) Specifies a list of placement tags that can be used to indicate where services should run..

  • primary - (Optional) If set to true, system services will run on this node type. Only one node type should be marked as primary. Primary node type cannot be deleted or changed once they're created.

  • stateless - (Optional) If set to true, only stateless workloads can run on this node type.

  • vmSecrets - (Optional) One or more vmSecrets blocks as defined below.


A vmSecrets block supports the following:

  • certificates - (Required) One or more certificates blocks as defined above.

  • vaultId - (Required) The ID of the Vault that contain the certificates.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Resource Group.

Timeouts

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

  • create - (Defaults to 90 minutes) Used when creating the Resource Group.
  • read - (Defaults to 5 minutes) Used when retrieving the Resource Group.
  • update - (Defaults to 90 minutes) Used when updating the Resource Group.
  • delete - (Defaults to 90 minutes) Used when deleting the Resource Group.

Import

Resource Groups can be imported using the resourceId, e.g.

terraform import azurerm_service_fabric_managed_cluster.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ServiceFabric/managedClusters/clusterName1