Azure Service Fabric Cluster
This page shows how to write Terraform and Azure Resource Manager for Service Fabric Cluster and write them securely.
azurerm_service_fabric_cluster (Terraform)
The Cluster in Service Fabric can be configured in Terraform with the resource name azurerm_service_fabric_cluster. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_service_fabric_cluster" "positive2" {
name = "example-servicefabric"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
reliability_level = "Bronze"
upgrade_mode = "Manual"
resource "azurerm_service_fabric_cluster" "positive1" {
name = "example-servicefabric"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
reliability_level = "Bronze"
upgrade_mode = "Manual"
resource "azurerm_service_fabric_cluster" "negative" {
name = "example-servicefabric"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
reliability_level = "Bronze"
upgrade_mode = "Manual"
Parameters
-
add_on_featuresoptional - set of string -
cluster_code_versionoptional computed - string -
cluster_endpointoptional computed - string -
idoptional computed - string -
locationrequired - string -
management_endpointrequired - string -
namerequired - string -
reliability_levelrequired - string -
resource_group_namerequired - string -
tagsoptional - map from string to string -
upgrade_moderequired - string -
vm_imagerequired - string -
azure_active_directorylist block-
client_application_idrequired - string -
cluster_application_idrequired - string -
tenant_idrequired - string
-
-
certificatelist block-
thumbprintrequired - string -
thumbprint_secondaryoptional - string -
x509_store_namerequired - string
-
-
certificate_common_nameslist block-
x509_store_namerequired - string -
common_namesset block-
certificate_common_namerequired - string -
certificate_issuer_thumbprintoptional - string
-
-
-
client_certificate_common_namelist block-
common_namerequired - string -
is_adminrequired - bool -
issuer_thumbprintoptional - string
-
-
client_certificate_thumbprintlist block-
is_adminrequired - bool -
thumbprintrequired - string
-
-
diagnostics_configlist block-
blob_endpointrequired - string -
protected_account_key_namerequired - string -
queue_endpointrequired - string -
storage_account_namerequired - string -
table_endpointrequired - string
-
-
fabric_settingslist block-
namerequired - string -
parametersoptional - map from string to string
-
-
node_typelist block-
capacitiesoptional - map from string to string -
client_endpoint_portrequired - number -
durability_leveloptional - string -
http_endpoint_portrequired - number -
instance_countrequired - number -
is_primaryrequired - bool -
namerequired - string -
placement_propertiesoptional - map from string to string -
reverse_proxy_endpoint_portoptional - number -
application_portslist block-
end_portrequired - number -
start_portrequired - number
-
-
ephemeral_portslist block-
end_portrequired - number -
start_portrequired - number
-
-
-
reverse_proxy_certificatelist block-
thumbprintrequired - string -
thumbprint_secondaryoptional - string -
x509_store_namerequired - string
-
-
reverse_proxy_certificate_common_nameslist block-
x509_store_namerequired - string -
common_namesset block-
certificate_common_namerequired - string -
certificate_issuer_thumbprintoptional - string
-
-
-
timeoutssingle block -
upgrade_policylist block-
force_restart_enabledoptional - bool -
health_check_retry_timeoutoptional - string -
health_check_stable_durationoptional - string -
health_check_wait_durationoptional - string -
upgrade_domain_timeoutoptional - string -
upgrade_replica_set_check_timeoutoptional - string -
upgrade_timeoutoptional - string -
delta_health_policylist block-
max_delta_unhealthy_applications_percentoptional - number -
max_delta_unhealthy_nodes_percentoptional - number -
max_upgrade_domain_delta_unhealthy_nodes_percentoptional - number
-
-
health_policylist block-
max_unhealthy_applications_percentoptional - number -
max_unhealthy_nodes_percentoptional - number
-
-
Explanation in Terraform Registry
Manages a Service Fabric Cluster.
Microsoft.ServiceFabric/clusters (Azure Resource Manager)
The clusters in Microsoft.ServiceFabric can be configured in Azure Resource Manager with the resource name Microsoft.ServiceFabric/clusters. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
apiVersionrequired - stringlocationrequired - stringAzure resource location.
namerequired - stringThe name of the cluster resource.
propertiesrequiredaddOnFeaturesoptional - arrayThe list of add-on features to enable in the cluster.
applicationTypeVersionsCleanupPolicyoptionalmaxUnusedVersionsToKeeprequired - integerNumber of unused versions per application type to keep.
azureActiveDirectoryoptionalclientApplicationoptional - stringAzure active directory client application id.
clusterApplicationoptional - stringAzure active directory cluster application id.
tenantIdoptional - stringAzure active directory tenant id.
certificateoptionalthumbprintrequired - stringThumbprint of the primary certificate.
thumbprintSecondaryoptional - stringThumbprint of the secondary certificate.
x509StoreNameoptional - string
certificateCommonNamesoptionalcommonNamesoptional arraycertificateCommonNamerequired - stringThe common name of the server certificate.
certificateIssuerThumbprintrequired - stringThe issuer thumbprint of the server certificate.
x509StoreNameoptional - string
clientCertificateCommonNamesoptional arraycertificateCommonNamerequired - stringThe common name of the client certificate.
certificateIssuerThumbprintrequired - stringThe issuer thumbprint of the client certificate.
isAdminrequired - booleanIndicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.
clientCertificateThumbprintsoptional arraycertificateThumbprintrequired - stringThe thumbprint of the client certificate.
isAdminrequired - booleanIndicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.
clusterCodeVersionoptional - stringThe Service Fabric runtime version of the cluster. This property can only by set the user when upgradeMode is set to 'Manual'. To get list of available Service Fabric versions for new clusters use ClusterVersion API. To get the list of available version for existing clusters use availableClusterVersions.
diagnosticsStorageAccountConfigoptionalblobEndpointrequired - stringThe blob endpoint of the azure storage account.
protectedAccountKeyNamerequired - stringThe protected diagnostics storage key name.
protectedAccountKeyName2optional - stringThe protected diagnostics storage key name.
queueEndpointrequired - stringThe queue endpoint of the azure storage account.
storageAccountNamerequired - stringThe Azure storage account name.
tableEndpointrequired - stringThe table endpoint of the azure storage account.
eventStoreServiceEnabledoptional - booleanIndicates if the event store service is enabled.
fabricSettingsoptional arraynamerequired - stringThe section name of the fabric settings.
parametersrequired arraynamerequired - stringThe parameter name of fabric setting.
valuerequired - stringThe parameter value of fabric setting.
infrastructureServiceManageroptional - booleanIndicates if infrastructure service manager is enabled.
managementEndpointrequired - stringThe http management endpoint of the cluster.
nodeTypesrequired arrayapplicationPortsoptionalendPortrequired - integerEnd port of a range of ports
startPortrequired - integerStarting port of a range of ports
capacitiesoptional - stringThe capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has.
clientConnectionEndpointPortrequired - integerThe TCP cluster management endpoint port.
durabilityLeveloptional - stringephemeralPortsoptionalendPortrequired - integerEnd port of a range of ports
startPortrequired - integerStarting port of a range of ports
httpGatewayEndpointPortrequired - integerThe HTTP cluster management endpoint port.
isPrimaryrequired - booleanThe node type on which system services will run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters.
isStatelessoptional - booleanIndicates if the node type can only host Stateless workloads.
multipleAvailabilityZonesoptional - booleanIndicates if the node type is enabled to support multiple zones.
namerequired - stringThe name of the node type.
placementPropertiesoptional - stringThe placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.
reverseProxyEndpointPortoptional - integerThe endpoint used by reverse proxy.
vmInstanceCountrequired - integerVMInstanceCount should be 1 to n, where n indicates the number of VM instances corresponding to this nodeType. VMInstanceCount = 0 can be done only in these scenarios: NodeType is a secondary nodeType. Durability = Bronze or Durability >= Bronze and InfrastructureServiceManager = true. If VMInstanceCount = 0, implies the VMs for this nodeType will not be used for the initial cluster size computation.
notificationsoptional arrayisEnabledrequired - booleanIndicates if the notification is enabled.
notificationCategoryrequired - stringThe category of notification.
notificationLevelrequired - stringThe level of notification.
notificationTargetsrequired arraynotificationChannelrequired - stringThe notification channel indicates the type of receivers subscribed to the notification, either user or subscription.
receiversrequired - arrayList of targets that subscribe to the notification.
reliabilityLeveloptional - stringreverseProxyCertificateoptionalthumbprintrequired - stringThumbprint of the primary certificate.
thumbprintSecondaryoptional - stringThumbprint of the secondary certificate.
x509StoreNameoptional - string
reverseProxyCertificateCommonNamesoptionalcommonNamesoptional arraycertificateCommonNamerequired - stringThe common name of the server certificate.
certificateIssuerThumbprintrequired - stringThe issuer thumbprint of the server certificate.
x509StoreNameoptional - string
sfZonalUpgradeModeoptional - stringupgradeDescriptionoptionaldeltaHealthPolicyoptionalapplicationDeltaHealthPoliciesoptional - undefinedDefines a map that contains specific application delta health policies for different applications. Each entry specifies as key the application name and as value an ApplicationDeltaHealthPolicy used to evaluate the application health when upgrading the cluster. The application name should include the 'fabric:' URI scheme. The map is empty by default.
maxPercentDeltaUnhealthyApplicationsrequired - integerThe maximum allowed percentage of applications health degradation allowed during cluster upgrades. The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this.
maxPercentDeltaUnhealthyNodesrequired - integerThe maximum allowed percentage of nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.
maxPercentUpgradeDomainDeltaUnhealthyNodesrequired - integerThe maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits.
forceRestartoptional - booleanIf true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
healthCheckRetryTimeoutrequired - stringThe amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
healthCheckStableDurationrequired - stringThe amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
healthCheckWaitDurationrequired - stringThe length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
healthPolicyrequiredapplicationHealthPoliciesoptional - undefinedDefines a map that contains specific application health policies for different applications. Each entry specifies as key the application name and as value an ApplicationHealthPolicy used to evaluate the application health. The application name should include the 'fabric:' URI scheme. The map is empty by default.
maxPercentUnhealthyApplicationsoptional - integerThe maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero.
maxPercentUnhealthyNodesoptional - integerThe maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10. The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that.
upgradeDomainTimeoutrequired - stringThe amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
upgradeReplicaSetCheckTimeoutrequired - stringThe maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
upgradeTimeoutrequired - stringThe amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
upgradeModeoptional - stringupgradePauseEndTimestampUtcoptional - stringIndicates the end date and time to pause automatic runtime version upgrades on the cluster for an specific period of time on the cluster (UTC).
upgradePauseStartTimestampUtcoptional - stringIndicates the start date and time to pause automatic runtime version upgrades on the cluster for an specific period of time on the cluster (UTC).
upgradeWaveoptional - stringIndicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when upgradeMode is set to 'Automatic'.
vmImageoptional - stringThe VM image VMSS has been configured with. Generic names such as Windows or Linux can be used.
vmssZonalUpgradeModeoptional - stringwaveUpgradePausedoptional - booleanBoolean to pause automatic runtime version upgrades to the cluster.
systemDataoptionalcreatedAtoptional - stringThe timestamp of resource creation (UTC).
createdByoptional - stringThe identity that created the resource.
createdByTypeoptional - stringThe type of identity that created the resource.
lastModifiedAtoptional - stringThe timestamp of resource last modification (UTC).
lastModifiedByoptional - stringThe identity that last modified the resource.
lastModifiedByTypeoptional - stringThe type of identity that last modified the resource.
tagsoptional - stringAzure resource tags.
typerequired - string
Frequently asked questions
What is Azure Service Fabric Cluster?
Azure Service Fabric Cluster is a resource for Service Fabric of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Service Fabric Cluster?
For Terraform, the Checkmarx/kics, Checkmarx/kics and Checkmarx/kics source code examples are useful. See the Terraform Example section for further details.