Hetzner Cloud v1.22.0 published on Wednesday, Feb 26, 2025 by Pulumi
hcloud.getFirewalls
Explore with Pulumi AI
Provides details about multiple Hetzner Cloud Firewall.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const sampleFirewall1 = hcloud.getFirewalls({
    withSelector: "key=value",
});
import pulumi
import pulumi_hcloud as hcloud
sample_firewall1 = hcloud.get_firewalls(with_selector="key=value")
package main
import (
	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcloud.GetFirewalls(ctx, &hcloud.GetFirewallsArgs{
			WithSelector: pulumi.StringRef("key=value"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() => 
{
    var sampleFirewall1 = HCloud.GetFirewalls.Invoke(new()
    {
        WithSelector = "key=value",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetFirewallsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var sampleFirewall1 = HcloudFunctions.getFirewalls(GetFirewallsArgs.builder()
            .withSelector("key=value")
            .build());
    }
}
variables:
  sampleFirewall1:
    fn::invoke:
      function: hcloud:getFirewalls
      arguments:
        withSelector: key=value
Using getFirewalls
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFirewalls(args: GetFirewallsArgs, opts?: InvokeOptions): Promise<GetFirewallsResult>
function getFirewallsOutput(args: GetFirewallsOutputArgs, opts?: InvokeOptions): Output<GetFirewallsResult>def get_firewalls(most_recent: Optional[bool] = None,
                  with_selector: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetFirewallsResult
def get_firewalls_output(most_recent: Optional[pulumi.Input[bool]] = None,
                  with_selector: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetFirewallsResult]func GetFirewalls(ctx *Context, args *GetFirewallsArgs, opts ...InvokeOption) (*GetFirewallsResult, error)
func GetFirewallsOutput(ctx *Context, args *GetFirewallsOutputArgs, opts ...InvokeOption) GetFirewallsResultOutput> Note: This function is named GetFirewalls in the Go SDK.
public static class GetFirewalls 
{
    public static Task<GetFirewallsResult> InvokeAsync(GetFirewallsArgs args, InvokeOptions? opts = null)
    public static Output<GetFirewallsResult> Invoke(GetFirewallsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFirewallsResult> getFirewalls(GetFirewallsArgs args, InvokeOptions options)
public static Output<GetFirewallsResult> getFirewalls(GetFirewallsArgs args, InvokeOptions options)
fn::invoke:
  function: hcloud:index/getFirewalls:getFirewalls
  arguments:
    # arguments dictionaryThe following arguments are supported:
- MostRecent bool
- Sorts list by date.
- WithSelector string
- Label selector
- MostRecent bool
- Sorts list by date.
- WithSelector string
- Label selector
- mostRecent Boolean
- Sorts list by date.
- withSelector String
- Label selector
- mostRecent boolean
- Sorts list by date.
- withSelector string
- Label selector
- most_recent bool
- Sorts list by date.
- with_selector str
- Label selector
- mostRecent Boolean
- Sorts list by date.
- withSelector String
- Label selector
getFirewalls Result
The following output properties are available:
- Firewalls
List<Pulumi.HCloud. Outputs. Get Firewalls Firewall> 
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- Id string
- The provider-assigned unique ID for this managed resource.
- MostRecent bool
- WithSelector string
- Firewalls
[]GetFirewalls Firewall 
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- Id string
- The provider-assigned unique ID for this managed resource.
- MostRecent bool
- WithSelector string
- firewalls
List<GetFirewalls Firewall> 
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- id String
- The provider-assigned unique ID for this managed resource.
- mostRecent Boolean
- withSelector String
- firewalls
GetFirewalls Firewall[] 
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- id string
- The provider-assigned unique ID for this managed resource.
- mostRecent boolean
- withSelector string
- firewalls
Sequence[GetFirewalls Firewall] 
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- id str
- The provider-assigned unique ID for this managed resource.
- most_recent bool
- with_selector str
- firewalls List<Property Map>
- (list) List of all matching firewalls. See data.hcloud_firewallfor schema.
- id String
- The provider-assigned unique ID for this managed resource.
- mostRecent Boolean
- withSelector String
Supporting Types
GetFirewallsFirewall  
- Name string
- ApplyTos List<Pulumi.HCloud. Inputs. Get Firewalls Firewall Apply To> 
- Id int
- Labels Dictionary<string, string>
- Rules
List<Pulumi.HCloud. Inputs. Get Firewalls Firewall Rule> 
- Name string
- ApplyTos []GetFirewalls Firewall Apply To 
- Id int
- Labels map[string]string
- Rules
[]GetFirewalls Firewall Rule 
- name String
- applyTos List<GetFirewalls Firewall Apply To> 
- id Integer
- labels Map<String,String>
- rules
List<GetFirewalls Firewall Rule> 
- name string
- applyTos GetFirewalls Firewall Apply To[] 
- id number
- labels {[key: string]: string}
- rules
GetFirewalls Firewall Rule[] 
- name str
- apply_tos Sequence[GetFirewalls Firewall Apply To] 
- id int
- labels Mapping[str, str]
- rules
Sequence[GetFirewalls Firewall Rule] 
- name String
- applyTos List<Property Map>
- id Number
- labels Map<String>
- rules List<Property Map>
GetFirewallsFirewallApplyTo    
- LabelSelector string
- Server int
- LabelSelector string
- Server int
- labelSelector String
- server Integer
- labelSelector string
- server number
- label_selector str
- server int
- labelSelector String
- server Number
GetFirewallsFirewallRule   
- Direction string
- Description string
- DestinationIps List<string>
- Port string
- Protocol string
- SourceIps List<string>
- Direction string
- Description string
- DestinationIps []string
- Port string
- Protocol string
- SourceIps []string
- direction String
- description String
- destinationIps List<String>
- port String
- protocol String
- sourceIps List<String>
- direction string
- description string
- destinationIps string[]
- port string
- protocol string
- sourceIps string[]
- direction str
- description str
- destination_ips Sequence[str]
- port str
- protocol str
- source_ips Sequence[str]
- direction String
- description String
- destinationIps List<String>
- port String
- protocol String
- sourceIps List<String>
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the hcloudTerraform Provider.