@pulumi/openstack
Version:
A Pulumi package for creating and managing OpenStack cloud resources.
324 lines (323 loc) • 12.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a v2 firewall rule resource within OpenStack.
*
* > **Note:** Firewall v2 has no support for OVN currently.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as openstack from "@pulumi/openstack";
*
* const rule2 = new openstack.firewall.RuleV2("rule_2", {
* name: "firewall_rule",
* description: "drop TELNET traffic",
* action: "deny",
* protocol: "tcp",
* destinationPort: "23",
* enabled: true,
* });
* ```
*
* ## Import
*
* Firewall Rules can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import openstack:firewall/ruleV2:RuleV2 rule_1 8dbc0c28-e49c-463f-b712-5c5d1bbac327
* ```
*/
export declare class RuleV2 extends pulumi.CustomResource {
/**
* Get an existing RuleV2 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?: RuleV2State, opts?: pulumi.CustomResourceOptions): RuleV2;
/**
* Returns true if the given object is an instance of RuleV2. 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 RuleV2;
/**
* Action to be taken (must be "allow", "deny" or "reject")
* when the firewall rule matches. Changing this updates the `action` of an
* existing firewall rule. Default is `deny`.
*/
readonly action: pulumi.Output<string | undefined>;
/**
* A description for the firewall rule. Changing this
* updates the `description` of an existing firewall rule.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The destination IP address on which the
* firewall rule operates. Changing this updates the `destinationIpAddress`
* of an existing firewall rule.
*/
readonly destinationIpAddress: pulumi.Output<string | undefined>;
/**
* The destination port on which the firewall
* rule operates. Changing this updates the `destinationPort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
readonly destinationPort: pulumi.Output<string | undefined>;
/**
* Enabled status for the firewall rule (must be "true"
* or "false" if provided - defaults to "true"). Changing this updates the
* `enabled` status of an existing firewall rule.
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* IP version, either 4 or 6. Changing this
* updates the `ipVersion` of an existing firewall rule. Default is `4`.
*/
readonly ipVersion: pulumi.Output<number | undefined>;
/**
* A unique name for the firewall rule. Changing this
* updates the `name` of an existing firewall rule.
*/
readonly name: pulumi.Output<string>;
/**
* This argument conflicts and is interchangeable
* with `tenantId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another project. Changing this creates a new
* firewall rule.
*/
readonly projectId: pulumi.Output<string>;
/**
* (Optional; Required if `sourcePort` or `destinationPort` is not
* empty) The protocol type on which the firewall rule operates.
* Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the
* `protocol` of an existing firewall rule. Default is `any`.
*/
readonly protocol: pulumi.Output<string | undefined>;
/**
* The region in which to obtain the v2 networking client.
* A networking client is needed to create a firewall rule. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* firewall rule.
*/
readonly region: pulumi.Output<string>;
/**
* Sharing status of the firewall rule (must be "true"
* or "false" if provided). If this is "true" the policy is visible to, and
* can be used in, firewalls in other tenants. Changing this updates the
* `shared` status of an existing firewall policy. On
*/
readonly shared: pulumi.Output<boolean | undefined>;
/**
* The source IP address on which the firewall
* rule operates. Changing this updates the `sourceIpAddress` of an existing
* firewall rule.
*/
readonly sourceIpAddress: pulumi.Output<string | undefined>;
/**
* The source port on which the firewall
* rule operates. Changing this updates the `sourcePort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
readonly sourcePort: pulumi.Output<string | undefined>;
/**
* This argument conflicts and is interchangeable
* with `projectId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another tenant. Changing this creates a new
* firewall rule.
*/
readonly tenantId: pulumi.Output<string>;
/**
* Create a RuleV2 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?: RuleV2Args, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RuleV2 resources.
*/
export interface RuleV2State {
/**
* Action to be taken (must be "allow", "deny" or "reject")
* when the firewall rule matches. Changing this updates the `action` of an
* existing firewall rule. Default is `deny`.
*/
action?: pulumi.Input<string>;
/**
* A description for the firewall rule. Changing this
* updates the `description` of an existing firewall rule.
*/
description?: pulumi.Input<string>;
/**
* The destination IP address on which the
* firewall rule operates. Changing this updates the `destinationIpAddress`
* of an existing firewall rule.
*/
destinationIpAddress?: pulumi.Input<string>;
/**
* The destination port on which the firewall
* rule operates. Changing this updates the `destinationPort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
destinationPort?: pulumi.Input<string>;
/**
* Enabled status for the firewall rule (must be "true"
* or "false" if provided - defaults to "true"). Changing this updates the
* `enabled` status of an existing firewall rule.
*/
enabled?: pulumi.Input<boolean>;
/**
* IP version, either 4 or 6. Changing this
* updates the `ipVersion` of an existing firewall rule. Default is `4`.
*/
ipVersion?: pulumi.Input<number>;
/**
* A unique name for the firewall rule. Changing this
* updates the `name` of an existing firewall rule.
*/
name?: pulumi.Input<string>;
/**
* This argument conflicts and is interchangeable
* with `tenantId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another project. Changing this creates a new
* firewall rule.
*/
projectId?: pulumi.Input<string>;
/**
* (Optional; Required if `sourcePort` or `destinationPort` is not
* empty) The protocol type on which the firewall rule operates.
* Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the
* `protocol` of an existing firewall rule. Default is `any`.
*/
protocol?: pulumi.Input<string>;
/**
* The region in which to obtain the v2 networking client.
* A networking client is needed to create a firewall rule. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* firewall rule.
*/
region?: pulumi.Input<string>;
/**
* Sharing status of the firewall rule (must be "true"
* or "false" if provided). If this is "true" the policy is visible to, and
* can be used in, firewalls in other tenants. Changing this updates the
* `shared` status of an existing firewall policy. On
*/
shared?: pulumi.Input<boolean>;
/**
* The source IP address on which the firewall
* rule operates. Changing this updates the `sourceIpAddress` of an existing
* firewall rule.
*/
sourceIpAddress?: pulumi.Input<string>;
/**
* The source port on which the firewall
* rule operates. Changing this updates the `sourcePort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
sourcePort?: pulumi.Input<string>;
/**
* This argument conflicts and is interchangeable
* with `projectId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another tenant. Changing this creates a new
* firewall rule.
*/
tenantId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RuleV2 resource.
*/
export interface RuleV2Args {
/**
* Action to be taken (must be "allow", "deny" or "reject")
* when the firewall rule matches. Changing this updates the `action` of an
* existing firewall rule. Default is `deny`.
*/
action?: pulumi.Input<string>;
/**
* A description for the firewall rule. Changing this
* updates the `description` of an existing firewall rule.
*/
description?: pulumi.Input<string>;
/**
* The destination IP address on which the
* firewall rule operates. Changing this updates the `destinationIpAddress`
* of an existing firewall rule.
*/
destinationIpAddress?: pulumi.Input<string>;
/**
* The destination port on which the firewall
* rule operates. Changing this updates the `destinationPort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
destinationPort?: pulumi.Input<string>;
/**
* Enabled status for the firewall rule (must be "true"
* or "false" if provided - defaults to "true"). Changing this updates the
* `enabled` status of an existing firewall rule.
*/
enabled?: pulumi.Input<boolean>;
/**
* IP version, either 4 or 6. Changing this
* updates the `ipVersion` of an existing firewall rule. Default is `4`.
*/
ipVersion?: pulumi.Input<number>;
/**
* A unique name for the firewall rule. Changing this
* updates the `name` of an existing firewall rule.
*/
name?: pulumi.Input<string>;
/**
* This argument conflicts and is interchangeable
* with `tenantId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another project. Changing this creates a new
* firewall rule.
*/
projectId?: pulumi.Input<string>;
/**
* (Optional; Required if `sourcePort` or `destinationPort` is not
* empty) The protocol type on which the firewall rule operates.
* Valid values are: `tcp`, `udp`, `icmp`, and `any`. Changing this updates the
* `protocol` of an existing firewall rule. Default is `any`.
*/
protocol?: pulumi.Input<string>;
/**
* The region in which to obtain the v2 networking client.
* A networking client is needed to create a firewall rule. If omitted, the
* `region` argument of the provider is used. Changing this creates a new
* firewall rule.
*/
region?: pulumi.Input<string>;
/**
* Sharing status of the firewall rule (must be "true"
* or "false" if provided). If this is "true" the policy is visible to, and
* can be used in, firewalls in other tenants. Changing this updates the
* `shared` status of an existing firewall policy. On
*/
shared?: pulumi.Input<boolean>;
/**
* The source IP address on which the firewall
* rule operates. Changing this updates the `sourceIpAddress` of an existing
* firewall rule.
*/
sourceIpAddress?: pulumi.Input<string>;
/**
* The source port on which the firewall
* rule operates. Changing this updates the `sourcePort` of an existing
* firewall rule. Require not `any` or empty protocol.
*/
sourcePort?: pulumi.Input<string>;
/**
* This argument conflicts and is interchangeable
* with `projectId`. The owner of the firewall rule. Required if admin wants
* to create a firewall rule for another tenant. Changing this creates a new
* firewall rule.
*/
tenantId?: pulumi.Input<string>;
}