Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions settings/remarks/microsoft.horizondb/remarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"$schema": "../../schemas/remarks.schema.json",
"TerraformSamples": [
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/create.tf",
"Description": "Create a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/update-administrator-login-password.tf",
"Description": "Update a cluster's administrator login password."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/scale-cluster-vertically.tf",
"Description": "Scale a cluster vertically."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/connect-parameter-group-to-cluster.tf",
"Description": "Connect a parameter group to a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/parameterGroups",
"Path": "samples/parametergroups/create.tf",
"Description": "Create a parameter group."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/firewallRules",
"Path": "samples/clusters/pools/firewallrules/create.tf",
"Description": "Create a firewall rule on a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/replicas",
"Path": "samples/clusters/pools/replicas/add-no-specific-availability-zone.tf",
"Description": "Add a replica without a specific availability zone to a pool."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/replicas",
"Path": "samples/clusters/pools/replicas/add-specific-availability-zone.tf",
"Description": "Add a replica in a specific availability zone to a pool."
}
],
"BicepSamples": [
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/create.bicep",
"Description": "Create a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/update-administrator-login-password.bicep",
"Description": "Update a cluster's administrator login password."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/scale-cluster-vertically.bicep",
"Description": "Scale a cluster vertically."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters",
"Path": "samples/clusters/connect-parameter-group-to-cluster.bicep",
"Description": "Connect a parameter group to a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/parameterGroups",
"Path": "samples/parametergroups/create.bicep",
"Description": "Create a parameter group."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/firewallRules",
"Path": "samples/clusters/pools/firewallrules/create.bicep",
"Description": "Create a firewall rule on a cluster."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/replicas",
"Path": "samples/clusters/pools/replicas/add-no-specific-availability-zone.bicep",
"Description": "Add a replica without a specific availability zone to a pool."
},
{
"ResourceType": "Microsoft.HorizonDB/clusters/pools/replicas",
"Path": "samples/clusters/pools/replicas/add-specific-availability-zone.bicep",
"Description": "Add a replica in a specific availability zone to a pool."
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@description('The location for the cluster')
param location string = 'eastus'
@description('The name for the cluster')
param clusterName string
@description('The create mode for cluster')
param createMode string = 'Update'
@description('The identifier of the parameter group to connect to the cluster')
param parameterGroupId string
resource flexibleServer 'Microsoft.HorizonDB/clusters@2026-01-20-preview' = {
name: clusterName
location: location
properties: {
createMode: createMode
parameterGroup: {
id: parameterGroupId
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "location" {
type = string
default = "eastus"
description = "The location for the cluster"
}

variable "cluster_name" {
type = string
description = "The name for the cluster"
}

variable "create_mode" {
type = string
default = "Update"
description = "The create mode for cluster"
}

variable "parameter_group_id" {
type = string
description = "The identifier of the parameter group to connect to the cluster"
}

resource "azapi_resource" "cluster" {
type = "Microsoft.HorizonDB/clusters@2026-01-20-preview"
name = var.cluster_name
location = var.location
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}"

body = {
properties = {
createMode = var.create_mode
parameterGroup = {
id = var.parameter_group_id
}
}
}

schema_validation_enabled = false
response_export_values = ["*"]
}

data "azapi_client_config" "current" {
}
37 changes: 37 additions & 0 deletions settings/remarks/microsoft.horizondb/samples/clusters/create.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@description('The location for the cluster')
param location string = 'eastus'
@description('The name for the cluster')
param clusterName string
@description('The tags for the cluster')
param tags object = {
env: 'dev'
}
@description('The create mode for cluster')
param createMode string = 'Create'
@description('The major version of server')
param version int = 17
@description('The administrator login name for cluster')
param administratorLogin string
@secure()
@description('The administrator login password for cluster')
param administratorLoginPassword string
@description('The number of vCores for each replica of the cluster')
param vCores int = 4
@description('The number of replicas for the cluster, including the primary replica, which is the only one in which writes are allowed. The other replicas are read-only.')
param replicaCount int = 2
@description('The name of the SKU for cluster')
param zonePlacementPolicy string = 'BestEffort'
resource flexibleServer 'Microsoft.HorizonDB/clusters@2026-01-20-preview' = {
name: clusterName
location: location
tags: tags
properties: {
createMode: createMode
version: version
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
vCores: vCores
replicaCount: replicaCount
zonePlacementPolicy: zonePlacementPolicy
}
}
99 changes: 99 additions & 0 deletions settings/remarks/microsoft.horizondb/samples/clusters/create.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}

provider "azapi" {
skip_provider_registration = false
}

variable "cluster_name" {
type = string
description = "The name for the cluster"
}

variable "location" {
type = string
default = "eastus"
description = "The location for the cluster"
}

variable "administrator_login" {
type = string
description = "The administrator login name for cluster"
}

variable "administrator_login_password" {
type = string
description = "The administrator login password for cluster"
sensitive = true
}

variable "create_mode" {
type = string
default = "Create"
description = "The create mode for cluster"
}

variable "version" {
type = number
default = 17
description = "The major version of server"
}

variable "v_cores" {
type = number
default = 4
description = "The number of vCores for each replica of the cluster"
}

variable "replica_count" {
type = number
default = 2
description = "The number of replicas for the cluster, including the primary replica, which is the only one in which writes are allowed. The other replicas are read-only."
}

variable "zone_placement_policy" {
type = string
default = "BestEffort"
description = "The name of the SKU for cluster"
}

variable "tags" {
type = object({
env = optional(string)
})
default = {
env = "dev"
}
description = "The tags for the cluster"
}

resource "azapi_resource" "cluster" {
type = "Microsoft.HorizonDB/clusters@2026-01-20-preview"
name = var.cluster_name
location = var.location
parent_id = "/subscriptions/${data.azapi_client_config.current.subscription_id}/resourceGroups/${data.azapi_client_config.current.resource_group_name}"

body = {
tags = var.tags
properties = {
createMode = var.create_mode
version = var.version
administratorLogin = var.administrator_login
administratorLoginPassword = var.administrator_login_password
vCores = var.v_cores
replicaCount = var.replica_count
zonePlacementPolicy = var.zone_placement_policy
}
}

schema_validation_enabled = false
response_export_values = ["*"]
}

data "azapi_client_config" "current" {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@description('The name for the cluster')
param clusterName string
@description('The name for the pool')
param poolName string = 'DefaultPool'
@description('The name for the firewall rule')
param firewallRuleName string = 'DataAnalyticsDepartment'
@description('The start IP address for the firewall rule')
param firewallRuleStartIp string = '10.0.0.1'
@description('The end IP address for the firewall rule')
param firewallRuleEndIp string = '10.0.0.10'
@description('The description for the firewall rule')
param firewallRuleDescription string = 'Allow all IP addresses from the Data Analytics department'
@description('The create mode for cluster')
param createMode string = 'Create'
@description('The major version of server')
param version int = 17
@description('The administrator login name for cluster')
param administratorLogin string
@secure()
@description('The administrator login password for cluster')
param administratorLoginPassword string
@description('The number of vCores for each replica of the cluster')
param vCores int = 4
@description('The number of replicas for the cluster, including the primary replica, which is the only one in which writes are allowed. The other replicas are read-only.')
param replicaCount int = 2
@description('The name of the SKU for cluster')
param zonePlacementPolicy string = 'BestEffort'
resource flexibleServer 'Microsoft.HorizonDB/clusters/pools/firewallRules@2026-01-20-preview' = {
name: '${clusterName}/${poolName}/${firewallRuleName}'
properties: {
startIp: firewallRuleStartIp
endIp: firewallRuleEndIp
description: firewallRuleDescription
}
}
Loading