Azure / terraform-azurerm-avm-res-kusto-cluster

MIT License
0 stars 3 forks source link

terraform-azurerm-avm-res-kusto-cluster

Manages a Kusto (also known as Azure Data Explorer) Cluster and databases

[!IMPORTANT] As the overall AVM framework is not GA (generally available) yet - the CI framework and test automation is not fully functional and implemented across all supported languages yet - breaking changes are expected, and additional customer feedback is yet to be gathered and incorporated. Hence, modules MUST NOT be published at version 1.0.0 or higher at this time.

All module MUST be published as a pre-release version (e.g., 0.1.0, 0.1.1, 0.2.0, etc.) until the AVM framework becomes GA.

However, it is important to note that this DOES NOT mean that the modules cannot be consumed and utilized. They CAN be leveraged in all types of environments (dev, test, prod etc.). Consumers can treat them just like any other IaC module and raise issues or feature requests against them as they learn from the usage of the module. Consumers should also read the release notes for each version, if considering updating to a more recent version of a module to see if there are any considerations or breaking changes etc.

Requirements

The following requirements are needed by this module:

Providers

The following providers are used by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

location

Description: Azure region where the resource should be deployed. If null, the location will be inferred from the resource group location.

Type: string

name

Description: The name of the this resource.

Type: string

resource_group_name

Description: The resource group where the resources will be deployed.

Type: string

sku

Description: A sku block supports the following:

name - (Required) The name of the SKU.

Possible values are:

Type:

object({
    name     = string
    capacity = number
  })

Optional Inputs

The following input variables are optional (have default values):

allowed_fqdns

Description: (Optional) List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster.

Type: set(string)

Default: null

allowed_ip_ranges

Description: (Optional) The list of ips in the format of CIDR allowed to connect to the cluster.

Type: set(string)

Default: null

auto_stop_enabled

Description: (Optional) Specifies if the cluster could be automatically stopped (due to lack of data or no activity for many days).

Defaults to true.

Type: bool

Default: true

customer_managed_key

Description: Customer managed keys that should be associated with the resource.

Type:

object({
    key_vault_resource_id = string
    key_name              = string
    key_version           = optional(string, null)
    user_assigned_identity = optional(object({
      resource_id = string
    }), null)
  })

Default: null

databases

Description: (Optional) A map of kusto database objects:

Type:

map(object({
    name                = string
    location            = optional(string, null)
    resource_group_name = optional(string, null)
    cluster_name        = optional(string, null)
    hot_cache_period    = optional(string)
    soft_delete_period  = optional(string)
  }))

Default: {}

diagnostic_settings

Description: A map of diagnostic settings to create on the Key Vault. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    name                                     = optional(string, null)
    log_categories                           = optional(set(string), [])
    log_groups                               = optional(set(string), ["allLogs"])
    metric_categories                        = optional(set(string), ["AllMetrics"])
    log_analytics_destination_type           = optional(string, "Dedicated")
    workspace_resource_id                    = optional(string, null)
    storage_account_resource_id              = optional(string, null)
    event_hub_authorization_rule_resource_id = optional(string, null)
    event_hub_name                           = optional(string, null)
    marketplace_partner_resource_id          = optional(string, null)
  }))

Default: {}

disk_encryption_enabled

Description: (Optional) Specifies if the cluster's disks are encrypted.

Type: bool

Default: true

double_encryption_enabled

Description: (Optional) Is the cluster's double encryption enabled? Changing this forces a new resource to be created.

Type: bool

Default: null

enable_telemetry

Description: This variable controls whether or not telemetry is enabled for the module.
For more information see https://aka.ms/avm/telemetryinfo.
If it is set to false, then no telemetry will be collected.

Type: bool

Default: true

kusto_cluster_principal_assignments

Description: A map that manages a Kusto Cluster Principal Assignment.

Type:

map(object({
    name           = string
    principal_id   = string
    principal_type = string
    role           = string
    tenant_id      = string
  }))

Default: {}

kusto_database_principal_assignment

Description: A map that manages a Kusto (also known as Azure Data Explorer) Database Principal Assignment.

Type:

map(object({
    database_name  = string
    name           = string
    principal_id   = string
    principal_type = string
    role           = string
    tenant_id      = string
  }))

Default: {}

language_extensions

Description: (Optional) An list of language_extensions to enable.

Valid values are: PYTHON, PYTHON_3.10.8 and R.

PYTHON is used to specify Python 3.6.5 image and PYTHON_3.10.8 is used to specify Python 3.10.8 image.
Note that PYTHON_3.10.8 is only available in skus which support nested virtualization.

NOTE:
In v4.0.0 and later version of the AzureRM Provider,
language_extensions will be changed to a list of language_extension block.
In each block, name and image are required.
name is the name of the language extension, possible values are PYTHON, R.
image is the image of the language extension, possible values are Python3_6_5, Python3_10_8 and R.

Type: set(string)

Default: null

lock

Description: The lock level to apply. Default is None. Possible values are None, CanNotDelete, and ReadOnly.

Type:

object({
    name = optional(string, null)
    kind = string
  })

Default: null

managed_identities

Description: Managed identities to be created for the resource.

Type:

object({
    system_assigned            = optional(bool, false)
    user_assigned_resource_ids = optional(set(string), [])
  })

Default: {}

optimized_auto_scale

Description: A optimized_auto_scale block supports the following:

minimum_instances - (Required) The minimum number of allowed instances. Must between 0 and 1000.

maximum_instances - (Required) The maximum number of allowed instances. Must between 0 and 1000.

Type:

object({
    maximum_instances = number
    minimum_instances = number
  })

Default: null

outbound_network_access_restricted

Description: (Optional) Whether to restrict outbound network access.
Value is optional but if passed in, must be true or false.

Default is false.

Type: bool

Default: false

private_endpoints

Description: A map of private endpoints to create on this resource. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Type:

map(object({
    name = optional(string, null)
    role_assignments = optional(map(object({
      role_definition_id_or_name             = string
      principal_id                           = string
      description                            = optional(string, null)
      skip_service_principal_aad_check       = optional(bool, false)
      condition                              = optional(string, null)
      condition_version                      = optional(string, null)
      delegated_managed_identity_resource_id = optional(string, null)
      principal_type                         = optional(string, null)
    })), {})
    lock = optional(object({
      kind = string
      name = optional(string, null)
    }), null)
    tags                                    = optional(map(string), null)
    subnet_resource_id                      = string
    private_dns_zone_group_name             = optional(string, "default")
    private_dns_zone_resource_ids           = optional(set(string), [])
    application_security_group_associations = optional(map(string), {})
    private_service_connection_name         = optional(string, null)
    network_interface_name                  = optional(string, null)
    location                                = optional(string, null)
    resource_group_name                     = optional(string, null)
    ip_configurations = optional(map(object({
      name               = string
      private_ip_address = string
    })), {})
  }))

Default: {}

public_ip_type

Description: (Optional) Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6). Defaults to IPv4.

Type: string

Default: "IPv4"

public_network_access_enabled

Description: (Optional) Is the public network access enabled? Defaults to true.

Type: bool

Default: false

purge_enabled

Description: (Optional) Specifies if the purge operations are enabled.

Type: bool

Default: null

role_assignments

Description: A map of role assignments to create on this resource. The map key is deliberately arbitrary to avoid issues where map keys maybe unknown at plan time.

Note: only set skip_service_principal_aad_check to true if you are assigning a role to a service principal.

Type:

map(object({
    role_definition_id_or_name             = string
    principal_id                           = string
    description                            = optional(string, null)
    skip_service_principal_aad_check       = optional(bool, false)
    condition                              = optional(string, null)
    condition_version                      = optional(string, null)
    delegated_managed_identity_resource_id = optional(string, null)
    principal_type                         = optional(string, null)
  }))

Default: {}

streaming_ingestion_enabled

Description: (Optional) Specifies if the streaming ingest is enabled.

Type: bool

Default: null

tags

Description: Map of tags to assign to the resource.

Type: map(string)

Default: null

trusted_external_tenants

Description: (Optional) Specifies a list of tenant IDs that are trusted by the cluster.
New or updated Kusto Cluster will only allow your own tenant by default.

Use trusted_external_tenants = ["*"] to explicitly allow all other tenants,
trusted_external_tenants = [] for only your tenant or
trusted_external_tenants = ["", ""] to allow specific other tenants.

Type: set(string)

Default: []

virtual_network_configuration

Description: (Optional) A virtual_network_configuration block as defined below.
Changing this forces a new resource to be created.

A virtual_network_configuration block supports the following:

subnet_id - (Required) The subnet resource id.

engine_public_ip_id - (Required) Engine service's public IP address resource id.

data_management_public_ip_id - (Required) Data management's service public IP address resource id.

Type:

object({
    data_management_public_ip_id = string
    engine_public_ip_id          = string
    subnet_id                    = string
  })

Default: null

zones

Description: (Optional) Specifies a list of Availability Zones in which this Kusto Cluster should be located. Changing this forces a new Kusto Cluster to be created.

Type: set(string)

Default: null

Outputs

The following outputs are exported:

data_ingestion_uri

Description: The Kusto Cluster URI to be used for data ingestion.

id

Description: The Kusto Cluster ID.

identity

Description: An identity block exports the following:

principal_id - The Principal ID associated with this System Assigned Managed Service Identity.

tenant_id - The Tenant ID associated with this System Assigned Managed Service Identity.

private_endpoints

Description: A map of private endpoints. The map key is the supplied input to var.private_endpoints. The map value is the entire azurerm_private_endpoint resource.

resource

Description: This is the full output for the resource.

resource_id

Description: The Kusto Cluster resource ID.

uri

Description: The FQDN of the Azure Kusto Cluster.

Modules

The following Modules are called:

kusto_cluster_principal_assignment

Source: ./modules/azurerm_kusto_cluster_principal_assignment

Version:

kusto_database

Source: ./modules/azurerm_kusto_database

Version:

kusto_database_principal_assignment

Source: ./modules/azurerm_kusto_database_principal_assignment

Version:

Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.