UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

240 lines (239 loc) • 9.46 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a v2 firewall policy 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 rule1 = new openstack.firewall.RuleV2("rule_1", { * name: "firewall_rule_1", * description: "drop TELNET traffic", * action: "deny", * protocol: "tcp", * destinationPort: "23", * enabled: true, * }); * const rule2 = new openstack.firewall.RuleV2("rule_2", { * name: "firewall_rule_2", * description: "drop NTP traffic", * action: "deny", * protocol: "udp", * destinationPort: "123", * enabled: false, * }); * const policy1 = new openstack.firewall.PolicyV2("policy_1", { * name: "firewall_policy", * rules: [ * rule1.id, * rule2.id, * ], * }); * ``` * * ## Import * * Firewall Policies can be imported using the `id`, e.g. * * ```sh * $ pulumi import openstack:firewall/policyV2:PolicyV2 policy_1 07f422e6-c596-474b-8b94-fe2c12506ce0 * ``` */ export declare class PolicyV2 extends pulumi.CustomResource { /** * Get an existing PolicyV2 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?: PolicyV2State, opts?: pulumi.CustomResourceOptions): PolicyV2; /** * Returns true if the given object is an instance of PolicyV2. 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 PolicyV2; /** * Audit status of the firewall policy * (must be "true" or "false" if provided - defaults to "false"). * This status is set to "false" whenever the firewall policy or any of its * rules are changed. Changing this updates the `audited` status of an existing * firewall policy. */ readonly audited: pulumi.Output<boolean | undefined>; /** * A description for the firewall policy. Changing * this updates the `description` of an existing firewall policy. */ readonly description: pulumi.Output<string | undefined>; /** * A name for the firewall policy. Changing this * updates the `name` of an existing firewall policy. */ readonly name: pulumi.Output<string>; /** * This argument conflicts and is interchangeable * with `tenantId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another project. Changing this creates a new * firewall policy. */ readonly projectId: pulumi.Output<string>; /** * The region in which to obtain the v2 networking client. * A networking client is needed to create a firewall policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * firewall policy. */ readonly region: pulumi.Output<string>; /** * An array of one or more firewall rules that comprise * the policy. Changing this results in adding/removing rules from the * existing firewall policy. */ readonly rules: pulumi.Output<string[] | undefined>; /** * Sharing status of the firewall policy (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. Only administrative users * can specify if the policy should be shared. */ readonly shared: pulumi.Output<boolean | undefined>; /** * This argument conflicts and is interchangeable * with `projectId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another tenant. Changing this creates a new * firewall policy. */ readonly tenantId: pulumi.Output<string>; /** * Create a PolicyV2 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?: PolicyV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PolicyV2 resources. */ export interface PolicyV2State { /** * Audit status of the firewall policy * (must be "true" or "false" if provided - defaults to "false"). * This status is set to "false" whenever the firewall policy or any of its * rules are changed. Changing this updates the `audited` status of an existing * firewall policy. */ audited?: pulumi.Input<boolean>; /** * A description for the firewall policy. Changing * this updates the `description` of an existing firewall policy. */ description?: pulumi.Input<string>; /** * A name for the firewall policy. Changing this * updates the `name` of an existing firewall policy. */ name?: pulumi.Input<string>; /** * This argument conflicts and is interchangeable * with `tenantId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another project. Changing this creates a new * firewall policy. */ projectId?: pulumi.Input<string>; /** * The region in which to obtain the v2 networking client. * A networking client is needed to create a firewall policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * firewall policy. */ region?: pulumi.Input<string>; /** * An array of one or more firewall rules that comprise * the policy. Changing this results in adding/removing rules from the * existing firewall policy. */ rules?: pulumi.Input<pulumi.Input<string>[]>; /** * Sharing status of the firewall policy (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. Only administrative users * can specify if the policy should be shared. */ shared?: pulumi.Input<boolean>; /** * This argument conflicts and is interchangeable * with `projectId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another tenant. Changing this creates a new * firewall policy. */ tenantId?: pulumi.Input<string>; } /** * The set of arguments for constructing a PolicyV2 resource. */ export interface PolicyV2Args { /** * Audit status of the firewall policy * (must be "true" or "false" if provided - defaults to "false"). * This status is set to "false" whenever the firewall policy or any of its * rules are changed. Changing this updates the `audited` status of an existing * firewall policy. */ audited?: pulumi.Input<boolean>; /** * A description for the firewall policy. Changing * this updates the `description` of an existing firewall policy. */ description?: pulumi.Input<string>; /** * A name for the firewall policy. Changing this * updates the `name` of an existing firewall policy. */ name?: pulumi.Input<string>; /** * This argument conflicts and is interchangeable * with `tenantId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another project. Changing this creates a new * firewall policy. */ projectId?: pulumi.Input<string>; /** * The region in which to obtain the v2 networking client. * A networking client is needed to create a firewall policy. If omitted, the * `region` argument of the provider is used. Changing this creates a new * firewall policy. */ region?: pulumi.Input<string>; /** * An array of one or more firewall rules that comprise * the policy. Changing this results in adding/removing rules from the * existing firewall policy. */ rules?: pulumi.Input<pulumi.Input<string>[]>; /** * Sharing status of the firewall policy (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. Only administrative users * can specify if the policy should be shared. */ shared?: pulumi.Input<boolean>; /** * This argument conflicts and is interchangeable * with `projectId`. The owner of the firewall policy. Required if admin wants * to create a firewall policy for another tenant. Changing this creates a new * firewall policy. */ tenantId?: pulumi.Input<string>; }