1. Packages
  2. Proxmox Virtual Environment (Proxmox VE)
  3. API Docs
  4. Network
  5. FirewallAlias
Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski

proxmoxve.Network.FirewallAlias

Explore with Pulumi AI

proxmoxve logo
Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski

    Aliases are used to see what devices or group of devices are affected by a rule. We can create aliases to identify an IP address or a network. Aliases can be created on the cluster level, on VM / Container level.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const localNetwork = new proxmoxve.network.FirewallAlias("localNetwork", {
        nodeName: proxmox_virtual_environment_vm.example.node_name,
        vmId: proxmox_virtual_environment_vm.example.vm_id,
        cidr: "192.168.0.0/23",
        comment: "Managed by Terraform",
    }, {
        dependsOn: [proxmox_virtual_environment_vm.example],
    });
    const ubuntuVm = new proxmoxve.network.FirewallAlias("ubuntuVm", {
        cidr: "192.168.0.1",
        comment: "Managed by Terraform",
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    local_network = proxmoxve.network.FirewallAlias("localNetwork",
        node_name=proxmox_virtual_environment_vm["example"]["node_name"],
        vm_id=proxmox_virtual_environment_vm["example"]["vm_id"],
        cidr="192.168.0.0/23",
        comment="Managed by Terraform",
        opts=pulumi.ResourceOptions(depends_on=[proxmox_virtual_environment_vm["example"]]))
    ubuntu_vm = proxmoxve.network.FirewallAlias("ubuntuVm",
        cidr="192.168.0.1",
        comment="Managed by Terraform")
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v6/go/proxmoxve/Network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Network.NewFirewallAlias(ctx, "localNetwork", &Network.FirewallAliasArgs{
    			NodeName: pulumi.Any(proxmox_virtual_environment_vm.Example.Node_name),
    			VmId:     pulumi.Any(proxmox_virtual_environment_vm.Example.Vm_id),
    			Cidr:     pulumi.String("192.168.0.0/23"),
    			Comment:  pulumi.String("Managed by Terraform"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			proxmox_virtual_environment_vm.Example,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = Network.NewFirewallAlias(ctx, "ubuntuVm", &Network.FirewallAliasArgs{
    			Cidr:    pulumi.String("192.168.0.1"),
    			Comment: pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        var localNetwork = new ProxmoxVE.Network.FirewallAlias("localNetwork", new()
        {
            NodeName = proxmox_virtual_environment_vm.Example.Node_name,
            VmId = proxmox_virtual_environment_vm.Example.Vm_id,
            Cidr = "192.168.0.0/23",
            Comment = "Managed by Terraform",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                proxmox_virtual_environment_vm.Example, 
            },
        });
    
        var ubuntuVm = new ProxmoxVE.Network.FirewallAlias("ubuntuVm", new()
        {
            Cidr = "192.168.0.1",
            Comment = "Managed by Terraform",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.Network.FirewallAlias;
    import com.pulumi.proxmoxve.Network.FirewallAliasArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 localNetwork = new FirewallAlias("localNetwork", FirewallAliasArgs.builder()        
                .nodeName(proxmox_virtual_environment_vm.example().node_name())
                .vmId(proxmox_virtual_environment_vm.example().vm_id())
                .cidr("192.168.0.0/23")
                .comment("Managed by Terraform")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(proxmox_virtual_environment_vm.example())
                    .build());
    
            var ubuntuVm = new FirewallAlias("ubuntuVm", FirewallAliasArgs.builder()        
                .cidr("192.168.0.1")
                .comment("Managed by Terraform")
                .build());
    
        }
    }
    
    resources:
      localNetwork:
        type: proxmoxve:Network:FirewallAlias
        properties:
          nodeName: ${proxmox_virtual_environment_vm.example.node_name}
          vmId: ${proxmox_virtual_environment_vm.example.vm_id}
          cidr: 192.168.0.0/23
          comment: Managed by Terraform
        options:
          dependson:
            - ${proxmox_virtual_environment_vm.example}
      ubuntuVm:
        type: proxmoxve:Network:FirewallAlias
        properties:
          cidr: 192.168.0.1
          comment: Managed by Terraform
    

    Create FirewallAlias Resource

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

    Constructor syntax

    new FirewallAlias(name: string, args: FirewallAliasArgs, opts?: CustomResourceOptions);
    @overload
    def FirewallAlias(resource_name: str,
                      args: FirewallAliasArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def FirewallAlias(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cidr: Optional[str] = None,
                      comment: Optional[str] = None,
                      container_id: Optional[int] = None,
                      name: Optional[str] = None,
                      node_name: Optional[str] = None,
                      vm_id: Optional[int] = None)
    func NewFirewallAlias(ctx *Context, name string, args FirewallAliasArgs, opts ...ResourceOption) (*FirewallAlias, error)
    public FirewallAlias(string name, FirewallAliasArgs args, CustomResourceOptions? opts = null)
    public FirewallAlias(String name, FirewallAliasArgs args)
    public FirewallAlias(String name, FirewallAliasArgs args, CustomResourceOptions options)
    
    type: proxmoxve:Network:FirewallAlias
    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 FirewallAliasArgs
    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 FirewallAliasArgs
    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 FirewallAliasArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FirewallAliasArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FirewallAliasArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var firewallAliasResource = new ProxmoxVE.Network.FirewallAlias("firewallAliasResource", new()
    {
        Cidr = "string",
        Comment = "string",
        ContainerId = 0,
        Name = "string",
        NodeName = "string",
        VmId = 0,
    });
    
    example, err := Network.NewFirewallAlias(ctx, "firewallAliasResource", &Network.FirewallAliasArgs{
    	Cidr:        pulumi.String("string"),
    	Comment:     pulumi.String("string"),
    	ContainerId: pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	NodeName:    pulumi.String("string"),
    	VmId:        pulumi.Int(0),
    })
    
    var firewallAliasResource = new FirewallAlias("firewallAliasResource", FirewallAliasArgs.builder()        
        .cidr("string")
        .comment("string")
        .containerId(0)
        .name("string")
        .nodeName("string")
        .vmId(0)
        .build());
    
    firewall_alias_resource = proxmoxve.network.FirewallAlias("firewallAliasResource",
        cidr="string",
        comment="string",
        container_id=0,
        name="string",
        node_name="string",
        vm_id=0)
    
    const firewallAliasResource = new proxmoxve.network.FirewallAlias("firewallAliasResource", {
        cidr: "string",
        comment: "string",
        containerId: 0,
        name: "string",
        nodeName: "string",
        vmId: 0,
    });
    
    type: proxmoxve:Network:FirewallAlias
    properties:
        cidr: string
        comment: string
        containerId: 0
        name: string
        nodeName: string
        vmId: 0
    

    FirewallAlias Resource Properties

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

    Inputs

    The FirewallAlias resource accepts the following input properties:

    Cidr string
    Network/IP specification in CIDR format.
    Comment string
    Alias comment.
    ContainerId int
    Container ID. Leave empty for cluster level aliases.
    Name string
    Alias name.
    NodeName string
    Node name. Leave empty for cluster level aliases.
    VmId int
    VM ID. Leave empty for cluster level aliases.
    Cidr string
    Network/IP specification in CIDR format.
    Comment string
    Alias comment.
    ContainerId int
    Container ID. Leave empty for cluster level aliases.
    Name string
    Alias name.
    NodeName string
    Node name. Leave empty for cluster level aliases.
    VmId int
    VM ID. Leave empty for cluster level aliases.
    cidr String
    Network/IP specification in CIDR format.
    comment String
    Alias comment.
    containerId Integer
    Container ID. Leave empty for cluster level aliases.
    name String
    Alias name.
    nodeName String
    Node name. Leave empty for cluster level aliases.
    vmId Integer
    VM ID. Leave empty for cluster level aliases.
    cidr string
    Network/IP specification in CIDR format.
    comment string
    Alias comment.
    containerId number
    Container ID. Leave empty for cluster level aliases.
    name string
    Alias name.
    nodeName string
    Node name. Leave empty for cluster level aliases.
    vmId number
    VM ID. Leave empty for cluster level aliases.
    cidr str
    Network/IP specification in CIDR format.
    comment str
    Alias comment.
    container_id int
    Container ID. Leave empty for cluster level aliases.
    name str
    Alias name.
    node_name str
    Node name. Leave empty for cluster level aliases.
    vm_id int
    VM ID. Leave empty for cluster level aliases.
    cidr String
    Network/IP specification in CIDR format.
    comment String
    Alias comment.
    containerId Number
    Container ID. Leave empty for cluster level aliases.
    name String
    Alias name.
    nodeName String
    Node name. Leave empty for cluster level aliases.
    vmId Number
    VM ID. Leave empty for cluster level aliases.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing FirewallAlias Resource

    Get an existing FirewallAlias 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?: FirewallAliasState, opts?: CustomResourceOptions): FirewallAlias
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr: Optional[str] = None,
            comment: Optional[str] = None,
            container_id: Optional[int] = None,
            name: Optional[str] = None,
            node_name: Optional[str] = None,
            vm_id: Optional[int] = None) -> FirewallAlias
    func GetFirewallAlias(ctx *Context, name string, id IDInput, state *FirewallAliasState, opts ...ResourceOption) (*FirewallAlias, error)
    public static FirewallAlias Get(string name, Input<string> id, FirewallAliasState? state, CustomResourceOptions? opts = null)
    public static FirewallAlias get(String name, Output<String> id, FirewallAliasState 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:
    Cidr string
    Network/IP specification in CIDR format.
    Comment string
    Alias comment.
    ContainerId int
    Container ID. Leave empty for cluster level aliases.
    Name string
    Alias name.
    NodeName string
    Node name. Leave empty for cluster level aliases.
    VmId int
    VM ID. Leave empty for cluster level aliases.
    Cidr string
    Network/IP specification in CIDR format.
    Comment string
    Alias comment.
    ContainerId int
    Container ID. Leave empty for cluster level aliases.
    Name string
    Alias name.
    NodeName string
    Node name. Leave empty for cluster level aliases.
    VmId int
    VM ID. Leave empty for cluster level aliases.
    cidr String
    Network/IP specification in CIDR format.
    comment String
    Alias comment.
    containerId Integer
    Container ID. Leave empty for cluster level aliases.
    name String
    Alias name.
    nodeName String
    Node name. Leave empty for cluster level aliases.
    vmId Integer
    VM ID. Leave empty for cluster level aliases.
    cidr string
    Network/IP specification in CIDR format.
    comment string
    Alias comment.
    containerId number
    Container ID. Leave empty for cluster level aliases.
    name string
    Alias name.
    nodeName string
    Node name. Leave empty for cluster level aliases.
    vmId number
    VM ID. Leave empty for cluster level aliases.
    cidr str
    Network/IP specification in CIDR format.
    comment str
    Alias comment.
    container_id int
    Container ID. Leave empty for cluster level aliases.
    name str
    Alias name.
    node_name str
    Node name. Leave empty for cluster level aliases.
    vm_id int
    VM ID. Leave empty for cluster level aliases.
    cidr String
    Network/IP specification in CIDR format.
    comment String
    Alias comment.
    containerId Number
    Container ID. Leave empty for cluster level aliases.
    name String
    Alias name.
    nodeName String
    Node name. Leave empty for cluster level aliases.
    vmId Number
    VM ID. Leave empty for cluster level aliases.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Proxmox Virtual Environment (Proxmox VE) v6.3.1 published on Friday, Apr 12, 2024 by Daniel Muehlbachler-Pietrzykowski