1. Packages
  2. OVH
  3. API Docs
  4. Ip
  5. Firewall
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

ovh.Ip.Firewall

Explore with Pulumi AI

ovh logo
OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud

    Use this resource to manage an IP firewall.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const myfirewall = new ovh.ip.Firewall("myfirewall", {
        ip: "XXXXXX",
        ipOnFirewall: "XXXXXX",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    myfirewall = ovh.ip.Firewall("myfirewall",
        ip="XXXXXX",
        ip_on_firewall="XXXXXX")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Ip"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Ip.NewFirewall(ctx, "myfirewall", &Ip.FirewallArgs{
    			Ip:           pulumi.String("XXXXXX"),
    			IpOnFirewall: pulumi.String("XXXXXX"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var myfirewall = new Ovh.Ip.Firewall("myfirewall", new()
        {
            Ip = "XXXXXX",
            IpOnFirewall = "XXXXXX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Ip.Firewall;
    import com.pulumi.ovh.Ip.FirewallArgs;
    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) {
            var myfirewall = new Firewall("myfirewall", FirewallArgs.builder()
                .ip("XXXXXX")
                .ipOnFirewall("XXXXXX")
                .build());
    
        }
    }
    
    resources:
      myfirewall:
        type: ovh:Ip:Firewall
        properties:
          ip: XXXXXX
          ipOnFirewall: XXXXXX
    

    Create Firewall Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Firewall(name: string, args: FirewallArgs, opts?: CustomResourceOptions);
    @overload
    def Firewall(resource_name: str,
                 args: FirewallArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Firewall(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 ip: Optional[str] = None,
                 ip_on_firewall: Optional[str] = None,
                 enabled: Optional[bool] = None)
    func NewFirewall(ctx *Context, name string, args FirewallArgs, opts ...ResourceOption) (*Firewall, error)
    public Firewall(string name, FirewallArgs args, CustomResourceOptions? opts = null)
    public Firewall(String name, FirewallArgs args)
    public Firewall(String name, FirewallArgs args, CustomResourceOptions options)
    
    type: ovh:Ip:Firewall
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FirewallArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var firewallResource = new Ovh.Ip.Firewall("firewallResource", new()
    {
        Ip = "string",
        IpOnFirewall = "string",
        Enabled = false,
    });
    
    example, err := Ip.NewFirewall(ctx, "firewallResource", &Ip.FirewallArgs{
    	Ip:           pulumi.String("string"),
    	IpOnFirewall: pulumi.String("string"),
    	Enabled:      pulumi.Bool(false),
    })
    
    var firewallResource = new Firewall("firewallResource", FirewallArgs.builder()
        .ip("string")
        .ipOnFirewall("string")
        .enabled(false)
        .build());
    
    firewall_resource = ovh.ip.Firewall("firewallResource",
        ip="string",
        ip_on_firewall="string",
        enabled=False)
    
    const firewallResource = new ovh.ip.Firewall("firewallResource", {
        ip: "string",
        ipOnFirewall: "string",
        enabled: false,
    });
    
    type: ovh:Ip:Firewall
    properties:
        enabled: false
        ip: string
        ipOnFirewall: string
    

    Firewall Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Firewall resource accepts the following input properties:

    Ip string
    The IP or the CIDR
    IpOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    Enabled bool
    Ip string
    The IP or the CIDR
    IpOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    Enabled bool
    ip String
    The IP or the CIDR
    ipOnFirewall String
    IPv4 address

    • enabled - Whether firewall should be enabled
    enabled Boolean
    ip string
    The IP or the CIDR
    ipOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    enabled boolean
    ip str
    The IP or the CIDR
    ip_on_firewall str
    IPv4 address

    • enabled - Whether firewall should be enabled
    enabled bool
    ip String
    The IP or the CIDR
    ipOnFirewall String
    IPv4 address

    • enabled - Whether firewall should be enabled
    enabled Boolean

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Firewall resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Current state of your ip on firewall
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Current state of your ip on firewall
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Current state of your ip on firewall
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    Current state of your ip on firewall
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    Current state of your ip on firewall
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Current state of your ip on firewall

    Look up Existing Firewall Resource

    Get an existing Firewall resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FirewallState, opts?: CustomResourceOptions): Firewall
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            ip: Optional[str] = None,
            ip_on_firewall: Optional[str] = None,
            state: Optional[str] = None) -> Firewall
    func GetFirewall(ctx *Context, name string, id IDInput, state *FirewallState, opts ...ResourceOption) (*Firewall, error)
    public static Firewall Get(string name, Input<string> id, FirewallState? state, CustomResourceOptions? opts = null)
    public static Firewall get(String name, Output<String> id, FirewallState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enabled bool
    Ip string
    The IP or the CIDR
    IpOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    State string
    Current state of your ip on firewall
    Enabled bool
    Ip string
    The IP or the CIDR
    IpOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    State string
    Current state of your ip on firewall
    enabled Boolean
    ip String
    The IP or the CIDR
    ipOnFirewall String
    IPv4 address

    • enabled - Whether firewall should be enabled
    state String
    Current state of your ip on firewall
    enabled boolean
    ip string
    The IP or the CIDR
    ipOnFirewall string
    IPv4 address

    • enabled - Whether firewall should be enabled
    state string
    Current state of your ip on firewall
    enabled bool
    ip str
    The IP or the CIDR
    ip_on_firewall str
    IPv4 address

    • enabled - Whether firewall should be enabled
    state str
    Current state of your ip on firewall
    enabled Boolean
    ip String
    The IP or the CIDR
    ipOnFirewall String
    IPv4 address

    • enabled - Whether firewall should be enabled
    state String
    Current state of your ip on firewall

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud