Civo v2.4.1 published on Thursday, Aug 22, 2024 by Pulumi
civo.getFirewall
Explore with Pulumi AI
Retrieve information about a firewall for use in other resources.
This data source provides all of the firewall’s properties as configured on your Civo account.
Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";
const test = civo.getFirewall({
name: "test-firewall",
region: "LON1",
});
import pulumi
import pulumi_civo as civo
test = civo.get_firewall(name="test-firewall",
region="LON1")
package main
import (
"github.com/pulumi/pulumi-civo/sdk/v2/go/civo"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := civo.LookupFirewall(ctx, &civo.LookupFirewallArgs{
Name: pulumi.StringRef("test-firewall"),
Region: pulumi.StringRef("LON1"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Civo = Pulumi.Civo;
return await Deployment.RunAsync(() =>
{
var test = Civo.GetFirewall.Invoke(new()
{
Name = "test-firewall",
Region = "LON1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.civo.CivoFunctions;
import com.pulumi.civo.inputs.GetFirewallArgs;
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 test = CivoFunctions.getFirewall(GetFirewallArgs.builder()
.name("test-firewall")
.region("LON1")
.build());
}
}
variables:
test:
fn::invoke:
Function: civo:getFirewall
Arguments:
name: test-firewall
region: LON1
Using getFirewall
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 getFirewall(args: GetFirewallArgs, opts?: InvokeOptions): Promise<GetFirewallResult>
function getFirewallOutput(args: GetFirewallOutputArgs, opts?: InvokeOptions): Output<GetFirewallResult>
def get_firewall(id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFirewallResult
def get_firewall_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFirewallResult]
func LookupFirewall(ctx *Context, args *LookupFirewallArgs, opts ...InvokeOption) (*LookupFirewallResult, error)
func LookupFirewallOutput(ctx *Context, args *LookupFirewallOutputArgs, opts ...InvokeOption) LookupFirewallResultOutput
> Note: This function is named LookupFirewall
in the Go SDK.
public static class GetFirewall
{
public static Task<GetFirewallResult> InvokeAsync(GetFirewallArgs args, InvokeOptions? opts = null)
public static Output<GetFirewallResult> Invoke(GetFirewallInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: civo:index/getFirewall:getFirewall
arguments:
# arguments dictionary
The following arguments are supported:
getFirewall Result
The following output properties are available:
- network_
id str - The id of the associated network
- id str
- The ID of this resource.
- name str
- The name of the firewall
- region str
- The region where the firewall is
Package Details
- Repository
- Civo pulumi/pulumi-civo
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
civo
Terraform Provider.