UNPKG

@muhlba91/pulumi-proxmoxve

Version:

A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources.

144 lines (143 loc) 5.15 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A security group is a collection of rules, defined at cluster level, which can * be used in all VMs' rules. For example, you can define a group named “webserver” * with rules to open the http and https ports. Rules can be created on the cluster * level, on VM / Container level. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as proxmoxve from "@muhlba91/pulumi-proxmoxve"; * * const inbound = new proxmoxve.network.FirewallRules("inbound", { * nodeName: proxmox_virtual_environment_vm.example.node_name, * vmId: proxmox_virtual_environment_vm.example.vm_id, * rules: [ * { * type: "in", * action: "ACCEPT", * comment: "Allow HTTP", * dest: "192.168.1.5", * dport: "80", * proto: "tcp", * log: "info", * }, * { * type: "in", * action: "ACCEPT", * comment: "Allow HTTPS", * dest: "192.168.1.5", * dport: "443", * proto: "tcp", * log: "info", * }, * { * securityGroup: proxmox_virtual_environment_cluster_firewall_security_group.example.name, * comment: "From security group", * iface: "net0", * }, * ], * }, { * dependsOn: [ * proxmox_virtual_environment_vm.example, * proxmox_virtual_environment_cluster_firewall_security_group.example, * ], * }); * ``` */ export declare class FirewallRules extends pulumi.CustomResource { /** * Get an existing FirewallRules resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FirewallRulesState, opts?: pulumi.CustomResourceOptions): FirewallRules; /** * Returns true if the given object is an instance of FirewallRules. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is FirewallRules; /** * Container ID. Leave empty for cluster level * rules. */ readonly containerId: pulumi.Output<number | undefined>; /** * Node name. Leave empty for cluster level rules. */ readonly nodeName: pulumi.Output<string | undefined>; /** * Firewall rule block (multiple blocks supported). * The provider supports two types of the `rule` blocks: * - A rule definition block, which includes the following arguments: */ readonly rules: pulumi.Output<outputs.Network.FirewallRulesRule[]>; /** * VM ID. Leave empty for cluster level rules. */ readonly vmId: pulumi.Output<number | undefined>; /** * Create a FirewallRules resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FirewallRulesArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering FirewallRules resources. */ export interface FirewallRulesState { /** * Container ID. Leave empty for cluster level * rules. */ containerId?: pulumi.Input<number>; /** * Node name. Leave empty for cluster level rules. */ nodeName?: pulumi.Input<string>; /** * Firewall rule block (multiple blocks supported). * The provider supports two types of the `rule` blocks: * - A rule definition block, which includes the following arguments: */ rules?: pulumi.Input<pulumi.Input<inputs.Network.FirewallRulesRule>[]>; /** * VM ID. Leave empty for cluster level rules. */ vmId?: pulumi.Input<number>; } /** * The set of arguments for constructing a FirewallRules resource. */ export interface FirewallRulesArgs { /** * Container ID. Leave empty for cluster level * rules. */ containerId?: pulumi.Input<number>; /** * Node name. Leave empty for cluster level rules. */ nodeName?: pulumi.Input<string>; /** * Firewall rule block (multiple blocks supported). * The provider supports two types of the `rule` blocks: * - A rule definition block, which includes the following arguments: */ rules: pulumi.Input<pulumi.Input<inputs.Network.FirewallRulesRule>[]>; /** * VM ID. Leave empty for cluster level rules. */ vmId?: pulumi.Input<number>; }