Skip to content

googleComputeLbIpRanges

Use this data source to access IP ranges in your firewall rules.

https://cloud.google.com/compute/docs/load-balancing/health-checks#health_check_source_ips_and_firewall_rules

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const dataGoogleComputeLbIpRangesRanges =
  new google.dataGoogleComputeLbIpRanges.DataGoogleComputeLbIpRanges(
    this,
    "ranges",
    {}
  );
new google.computeFirewall.ComputeFirewall(this, "lb", {
  allow: [
    {
      ports: ["80"],
      protocol: "tcp",
    },
  ],
  name: "lb-firewall",
  network: "${google_compute_network.main.name}",
  source_ranges: dataGoogleComputeLbIpRangesRanges.network,
  target_tags: ["InstanceBehindLoadBalancer"],
});

Argument Reference

There are no arguments available for this data source.

Attributes Reference

In addition to the arguments listed above, the following attributes are exported:

  • network - The IP ranges used for health checks when Network load balancing is used

  • httpSslTcpInternal - The IP ranges used for health checks when HTTP(S), SSL proxy, TCP proxy, and Internal load balancing is used