Writing Azure Load Balancers in Terraform

Am writing Terraform configuration for Azure Load Balancers, I’m wanting to add in load_balancer_rules inside the configuration but I’m failing to understand how we can add these rules in,

Can someone show me an example on how to write these rules in?

So far I’ve got this configuration.

resource "azurerm_lb" "sf_lb" {
  name                = "lb-internal-brcgs-ngd-${var.environment}-sf"
  location            = var.location
  resource_group_name = var.resource_group_name_sf
    frontend_ip_configuration {
      name = "LoadBalancerIPConfig"
      load_balancer_rules =

After creating the azurerm_lb, you want to create another resource called azure_lb_rule to add rules to it. Here is the link to the resource, the documentation should point you in the right direction: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_rule