Data Source: azurermLbRule
Use this data source to access information about an existing Load Balancer Rule.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermLbExample = new azurerm.dataAzurermLb.DataAzurermLb(
this,
"example",
{
name: "example-lb",
resource_group_name: "example-resources",
}
);
const dataAzurermLbRuleExample =
new azurerm.dataAzurermLbRule.DataAzurermLbRule(this, "example_1", {
loadbalancer_id: dataAzurermLbExample.id,
name: "first",
resource_group_name: "example-resources",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermLbRuleExample.overrideLogicalId("example");
new cdktf.TerraformOutput(this, "lb_rule_id", {
value: dataAzurermLbRuleExample.id,
});
Arguments Reference
The following arguments are supported:
-
loadbalancerId
- (Required) The ID of the Load Balancer Rule. -
name
- (Required) The name of this Load Balancer Rule. -
resourceGroupName
- (Required) The name of the Resource Group where the Load Balancer Rule exists.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The ID of the Load Balancer Rule. -
backendAddressPoolId
- A reference to a Backend Address Pool over which this Load Balancing Rule operates. -
probeId
- A reference to a Probe used by this Load Balancing Rule. -
frontendIpConfigurationName
- The name of the frontend IP configuration to which the rule is associated. -
protocol
- The transport protocol for the external endpoint. -
frontendPort
- The port for the external endpoint. -
backendPort
- The port used for internal connections on the endpoint. -
enableFloatingIp
- If Floating IPs are enabled for this Load Balancer Rule -
idleTimeoutInMinutes
- Specifies the idle timeout in minutes for TCP connections. -
loadDistribution
- Specifies the load balancing distribution type used by the Load Balancer. -
disableOutboundSnat
- If outbound SNAT is enabled for this Load Balancer Rule. -
enableTcpReset
- If TCP Reset is enabled for this Load Balancer Rule.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the Load Balancer Rule.