UNPKG

@pulumi/cloudngfwaws

Version:

A Pulumi package for creating and managing Cloud NGFW for AWS resources.

345 lines (344 loc) 10.1 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Resource for security rule manipulation. * * ## Admin Permission Type * * * `Rulestack` (for `scope="Local"`) * * `Global Rulestack` (for `scope="Global"`) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudngfwaws from "@pulumi/cloudngfwaws"; * * const r = new cloudngfwaws.Rulestack("r", { * name: "terraform-rulestack", * scope: "Local", * accountId: "123456789", * description: "Made by Pulumi", * profileConfig: { * antiSpyware: "BestPractice", * }, * }); * const example = new cloudngfwaws.SecurityRule("example", { * rulestack: r.name, * ruleList: "LocalRule", * priority: 3, * name: "tf-security-rule", * description: "Also configured by Terraform", * source: { * cidrs: ["any"], * }, * destination: { * cidrs: ["192.168.0.0/16"], * }, * negateDestination: true, * applications: ["any"], * category: {}, * action: "Allow", * logging: true, * auditComment: "initial config", * }); * ``` * * ## Import * * import name is <scope>:<rulestack>:<rule_list>:<priority> * * ```sh * $ pulumi import cloudngfwaws:index/securityRule:SecurityRule example Local:terraform-rulestack:LocalRule:3 * ``` */ export declare class SecurityRule extends pulumi.CustomResource { /** * Get an existing SecurityRule 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?: SecurityRuleState, opts?: pulumi.CustomResourceOptions): SecurityRule; /** * Returns true if the given object is an instance of SecurityRule. 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 SecurityRule; /** * The action to take. Valid values are `Allow`, `DenySilent`, `DenyResetServer`, or `DenyResetBoth`. */ readonly action: pulumi.Output<string>; /** * The list of applications. */ readonly applications: pulumi.Output<string[]>; /** * The audit comment. */ readonly auditComment: pulumi.Output<string | undefined>; /** * The category spec. */ readonly category: pulumi.Output<outputs.SecurityRuleCategory>; /** * Decryption rule type. Valid values are ``or`SSLOutboundInspection`. */ readonly decryptionRuleType: pulumi.Output<string | undefined>; /** * The description. */ readonly description: pulumi.Output<string | undefined>; /** * The destination spec. */ readonly destination: pulumi.Output<outputs.SecurityRuleDestination>; /** * Set to false to disable this rule. Defaults to `true`. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * Enable logging at end. Defaults to `true`. */ readonly logging: pulumi.Output<boolean | undefined>; /** * The name. */ readonly name: pulumi.Output<string>; /** * Negate the destination definition. */ readonly negateDestination: pulumi.Output<boolean | undefined>; /** * Negate the source definition. */ readonly negateSource: pulumi.Output<boolean | undefined>; /** * The rule priority. */ readonly priority: pulumi.Output<number>; /** * Protocol port list. */ readonly protPortLists: pulumi.Output<string[] | undefined>; /** * The protocol. */ readonly protocol: pulumi.Output<string | undefined>; /** * The rulebase. Valid values are `PreRule`, `PostRule`, or `LocalRule`. Defaults to `PreRule`. */ readonly ruleList: pulumi.Output<string | undefined>; /** * The rulestack. */ readonly rulestack: pulumi.Output<string>; /** * The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are `Local` or `Global`. Defaults to `Local`. */ readonly scope: pulumi.Output<string | undefined>; /** * The source spec. */ readonly source: pulumi.Output<outputs.SecurityRuleSource>; /** * The tags. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The update token. */ readonly updateToken: pulumi.Output<string>; /** * Create a SecurityRule 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: SecurityRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SecurityRule resources. */ export interface SecurityRuleState { /** * The action to take. Valid values are `Allow`, `DenySilent`, `DenyResetServer`, or `DenyResetBoth`. */ action?: pulumi.Input<string>; /** * The list of applications. */ applications?: pulumi.Input<pulumi.Input<string>[]>; /** * The audit comment. */ auditComment?: pulumi.Input<string>; /** * The category spec. */ category?: pulumi.Input<inputs.SecurityRuleCategory>; /** * Decryption rule type. Valid values are ``or`SSLOutboundInspection`. */ decryptionRuleType?: pulumi.Input<string>; /** * The description. */ description?: pulumi.Input<string>; /** * The destination spec. */ destination?: pulumi.Input<inputs.SecurityRuleDestination>; /** * Set to false to disable this rule. Defaults to `true`. */ enabled?: pulumi.Input<boolean>; /** * Enable logging at end. Defaults to `true`. */ logging?: pulumi.Input<boolean>; /** * The name. */ name?: pulumi.Input<string>; /** * Negate the destination definition. */ negateDestination?: pulumi.Input<boolean>; /** * Negate the source definition. */ negateSource?: pulumi.Input<boolean>; /** * The rule priority. */ priority?: pulumi.Input<number>; /** * Protocol port list. */ protPortLists?: pulumi.Input<pulumi.Input<string>[]>; /** * The protocol. */ protocol?: pulumi.Input<string>; /** * The rulebase. Valid values are `PreRule`, `PostRule`, or `LocalRule`. Defaults to `PreRule`. */ ruleList?: pulumi.Input<string>; /** * The rulestack. */ rulestack?: pulumi.Input<string>; /** * The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are `Local` or `Global`. Defaults to `Local`. */ scope?: pulumi.Input<string>; /** * The source spec. */ source?: pulumi.Input<inputs.SecurityRuleSource>; /** * The tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The update token. */ updateToken?: pulumi.Input<string>; } /** * The set of arguments for constructing a SecurityRule resource. */ export interface SecurityRuleArgs { /** * The action to take. Valid values are `Allow`, `DenySilent`, `DenyResetServer`, or `DenyResetBoth`. */ action: pulumi.Input<string>; /** * The list of applications. */ applications: pulumi.Input<pulumi.Input<string>[]>; /** * The audit comment. */ auditComment?: pulumi.Input<string>; /** * The category spec. */ category: pulumi.Input<inputs.SecurityRuleCategory>; /** * Decryption rule type. Valid values are ``or`SSLOutboundInspection`. */ decryptionRuleType?: pulumi.Input<string>; /** * The description. */ description?: pulumi.Input<string>; /** * The destination spec. */ destination: pulumi.Input<inputs.SecurityRuleDestination>; /** * Set to false to disable this rule. Defaults to `true`. */ enabled?: pulumi.Input<boolean>; /** * Enable logging at end. Defaults to `true`. */ logging?: pulumi.Input<boolean>; /** * The name. */ name?: pulumi.Input<string>; /** * Negate the destination definition. */ negateDestination?: pulumi.Input<boolean>; /** * Negate the source definition. */ negateSource?: pulumi.Input<boolean>; /** * The rule priority. */ priority: pulumi.Input<number>; /** * Protocol port list. */ protPortLists?: pulumi.Input<pulumi.Input<string>[]>; /** * The protocol. */ protocol?: pulumi.Input<string>; /** * The rulebase. Valid values are `PreRule`, `PostRule`, or `LocalRule`. Defaults to `PreRule`. */ ruleList?: pulumi.Input<string>; /** * The rulestack. */ rulestack: pulumi.Input<string>; /** * The rulestack's scope. A local rulestack will require that you've retrieved a LRA JWT. A global rulestack will require that you've retrieved a GRA JWT. Valid values are `Local` or `Global`. Defaults to `Local`. */ scope?: pulumi.Input<string>; /** * The source spec. */ source: pulumi.Input<inputs.SecurityRuleSource>; /** * The tags. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }