@ediri/vultr
Version:
A Pulumi package for creating and managing Vultr cloud resources.
164 lines (163 loc) • 5.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a Vultr Firewall Rule resource. This can be used to create, read, modify, and delete Firewall rules.
*
* ## Example Usage
*
* Create a Firewall Rule
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vultr from "@ediri/vultr";
*
* const myFirewallgroup = new vultr.FirewallGroup("myFirewallgroup", {description: "base firewall"});
* const myFirewallrule = new vultr.FirewallRule("myFirewallrule", {
* firewallGroupId: myFirewallgroup.id,
* protocol: "tcp",
* ipType: "v4",
* subnet: "0.0.0.0",
* subnetSize: 0,
* port: "8090",
* notes: "my firewall rule",
* });
* ```
*
* ## Import
*
* Firewall Rules can be imported using the Firewall Group `ID` and Firewall Rule `ID`, e.g.
*
* ```sh
* $ pulumi import vultr:index/firewallRule:FirewallRule my_rule b6a859c5-b299-49dd-8888-b1abbc517d08,1
* ```
*/
export declare class FirewallRule extends pulumi.CustomResource {
/**
* Get an existing FirewallRule 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?: FirewallRuleState, opts?: pulumi.CustomResourceOptions): FirewallRule;
/**
* Returns true if the given object is an instance of FirewallRule. 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 FirewallRule;
/**
* The firewall group that the firewall rule will belong to.
*/
readonly firewallGroupId: pulumi.Output<string>;
/**
* The type of ip for this firewall rule. Possible values (v4, v6) **Note** they must be lowercase
*/
readonly ipType: pulumi.Output<string>;
/**
* A simple note for a given firewall rule
*/
readonly notes: pulumi.Output<string | undefined>;
/**
* TCP/UDP only. This field can be a specific port or a colon separated port range.
*/
readonly port: pulumi.Output<string | undefined>;
/**
* The type of protocol for this firewall rule. Possible values (icmp, tcp, udp, gre, esp, ah) **Note** they must be lowercase
*/
readonly protocol: pulumi.Output<string>;
/**
* Possible values ("", cloudflare)
*/
readonly source: pulumi.Output<string | undefined>;
/**
* IP address that you want to define for this firewall rule.
*/
readonly subnet: pulumi.Output<string>;
/**
* The number of bits for the subnet in CIDR notation. Example: 32.
*/
readonly subnetSize: pulumi.Output<number>;
/**
* Create a FirewallRule 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: FirewallRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering FirewallRule resources.
*/
export interface FirewallRuleState {
/**
* The firewall group that the firewall rule will belong to.
*/
firewallGroupId?: pulumi.Input<string>;
/**
* The type of ip for this firewall rule. Possible values (v4, v6) **Note** they must be lowercase
*/
ipType?: pulumi.Input<string>;
/**
* A simple note for a given firewall rule
*/
notes?: pulumi.Input<string>;
/**
* TCP/UDP only. This field can be a specific port or a colon separated port range.
*/
port?: pulumi.Input<string>;
/**
* The type of protocol for this firewall rule. Possible values (icmp, tcp, udp, gre, esp, ah) **Note** they must be lowercase
*/
protocol?: pulumi.Input<string>;
/**
* Possible values ("", cloudflare)
*/
source?: pulumi.Input<string>;
/**
* IP address that you want to define for this firewall rule.
*/
subnet?: pulumi.Input<string>;
/**
* The number of bits for the subnet in CIDR notation. Example: 32.
*/
subnetSize?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a FirewallRule resource.
*/
export interface FirewallRuleArgs {
/**
* The firewall group that the firewall rule will belong to.
*/
firewallGroupId: pulumi.Input<string>;
/**
* The type of ip for this firewall rule. Possible values (v4, v6) **Note** they must be lowercase
*/
ipType: pulumi.Input<string>;
/**
* A simple note for a given firewall rule
*/
notes?: pulumi.Input<string>;
/**
* TCP/UDP only. This field can be a specific port or a colon separated port range.
*/
port?: pulumi.Input<string>;
/**
* The type of protocol for this firewall rule. Possible values (icmp, tcp, udp, gre, esp, ah) **Note** they must be lowercase
*/
protocol: pulumi.Input<string>;
/**
* Possible values ("", cloudflare)
*/
source?: pulumi.Input<string>;
/**
* IP address that you want to define for this firewall rule.
*/
subnet: pulumi.Input<string>;
/**
* The number of bits for the subnet in CIDR notation. Example: 32.
*/
subnetSize: pulumi.Input<number>;
}