Appendix: Required configuration

Required variables

The following variables are required when using the Materialize on Azure Terraform module.

Variable
resource_group_name = <string>
database_config = {
  password            = <string>  # required
  # sku_name          = <string>  # optional
  # postgres_version  = <string>  # optional
  # username          = <string>  # optional
  # db_name           = <string>  # optional
}
network_config = {     # required starting in v0.2.0
  vnet_address_space   = string
  subnet_cidr          = string
  postgres_subnet_cidr = string
  service_cidr         = string
  docker_bridge_cidr   = string
}

For a list of all variables, see the README.md or the variables.tf file.

Required providers and data source declaration

To use Materialize on Azure Terraform module v0.2.0+, you need to declare the following providers:

provider "azurerm" {
  # Set the Azure subscription ID here or use the ARM_SUBSCRIPTION_ID environment variable
  # subscription_id = "XXXXXXXXXXXXXXXXXXX"

  # Specify addition Azure provider configuration as needed

  features { }
}


provider "kubernetes" {
  host                   = module.aks.cluster_endpoint
  client_certificate     = base64decode(module.aks.kube_config[0].client_certificate)
  client_key             = base64decode(module.aks.kube_config[0].client_key)
  cluster_ca_certificate = base64decode(module.aks.kube_config[0].cluster_ca_certificate)
}

provider "helm" {
  kubernetes {
    host                   = module.aks.cluster_endpoint
    client_certificate     = base64decode(module.aks.kube_config[0].client_certificate)
    client_key             = base64decode(module.aks.kube_config[0].client_key)
    cluster_ca_certificate = base64decode(module.aks.kube_config[0].cluster_ca_certificate)
  }
}
Back to top ↑