import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Creates a WAFv2 Web ACL resource. * * > **Note:** Inline `rule` blocks in this resource have several known limitations. Consider using `aws.wafv2.WebAclRule` to manage rules as separate resources instead. Limitations include: **Deletion ordering errors:** When removing a rule that references an IP set or rule group, AWS requires the rule to be detached before the referenced resource is deleted. Terraform's dependency graph cannot model this correctly for inline rules, resulting in `WAFAssociatedItemException` errors. **Spurious diffs:** AWS returns rules in an unpredictable order, which can cause Terraform to detect changes even when the configuration has not changed. **Coupled updates:** Modifying one inline rule may cause all rules to be recreated, which can be disruptive. * * > **Warning:** If you use the `aws.wafv2.WebAclRule` or `aws.wafv2.WebAclRuleGroupAssociation` resources with this Web ACL, you must add `lifecycle { ignoreChanges = [rule] }` to this resource to prevent configuration drift. Those resources manage the Web ACL's rules outside of this resource's direct management. * * ## Import * * Using `pulumi import`, import WAFv2 Web ACLs using `ID/Name/Scope`. For example: * * ```sh * $ pulumi import aws:wafv2/webAcl:WebAcl example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc/example/REGIONAL * ``` */ export declare class WebAcl extends pulumi.CustomResource { /** * Get an existing WebAcl 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, state?: WebAclState, opts?: pulumi.CustomResourceOptions): WebAcl; /** * Check whether an existing WebAcl resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: WebAclState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of WebAcl. 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 WebAcl; /** * URL to use in SDK integrations with managed rule groups. */ readonly applicationIntegrationUrl: pulumi.Output; /** * ARN of the WAF WebACL. */ readonly arn: pulumi.Output; /** * Custom configurations for the associations between the web ACL and protected resources. See `associationConfig` below for details. */ readonly associationConfig: pulumi.Output; /** * Web ACL capacity units (WCUs) currently being used by this web ACL. */ readonly capacity: pulumi.Output; /** * Configuration for how AWS WAF handles CAPTCHA evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `captchaConfig` below for details. */ readonly captchaConfig: pulumi.Output; /** * Configuration for how AWS WAF handles Challenge evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `challengeConfig` below for details. */ readonly challengeConfig: pulumi.Output; /** * Custom response bodies that can be referenced by `customResponse` actions. See `customResponseBody` below for details. */ readonly customResponseBodies: pulumi.Output; /** * Data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option. See `dataProtectionConfig` below for details. */ readonly dataProtectionConfig: pulumi.Output; /** * Action to perform if none of the `rules` contained in the WebACL match. See `defaultAction` below for details. */ readonly defaultAction: pulumi.Output; /** * Friendly description of the WebACL. */ readonly description: pulumi.Output; readonly lockToken: pulumi.Output; /** * Monetization configuration for the web ACL. Provide this when any rule in the web ACL uses the `monetize` action. See `monetizationConfig` below for details. */ readonly monetizationConfig: pulumi.Output; /** * Friendly name of the WebACL. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ readonly name: pulumi.Output; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ readonly namePrefix: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Raw JSON string to allow more than three nested statements. Conflicts with `rule` attribute. This is for advanced use cases where more than 3 levels of nested statements are required. **There is no drift detection at this time**. If you use this attribute instead of `rule`, you will be foregoing drift detection. Additionally, importing an existing web ACL into a configuration with `ruleJson` set will result in a one time in-place update as the remote rule configuration is initially written to the `rule` attribute. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateWebACL.html) for the JSON structure. */ readonly ruleJson: pulumi.Output; /** * **`rule` blocks in this resource have several known limitations.** Consider using `aws.wafv2.WebAclRule` to manage rules as separate resources instead. Rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See `rule` below for details. */ readonly rules: pulumi.Output; /** * Scope of the web ACL, either an AWS CloudFront distribution or a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider. */ readonly scope: pulumi.Output; /** * Map of key-value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. */ readonly tokenDomains: pulumi.Output; /** * Amazon CloudWatch metrics and web request sample collection configuration. See `visibilityConfig` below for details. */ readonly visibilityConfig: pulumi.Output; /** * Create a WebAcl 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: WebAclArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WebAcl resources. */ export interface WebAclState { /** * URL to use in SDK integrations with managed rule groups. */ applicationIntegrationUrl?: pulumi.Input; /** * ARN of the WAF WebACL. */ arn?: pulumi.Input; /** * Custom configurations for the associations between the web ACL and protected resources. See `associationConfig` below for details. */ associationConfig?: pulumi.Input; /** * Web ACL capacity units (WCUs) currently being used by this web ACL. */ capacity?: pulumi.Input; /** * Configuration for how AWS WAF handles CAPTCHA evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `captchaConfig` below for details. */ captchaConfig?: pulumi.Input; /** * Configuration for how AWS WAF handles Challenge evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `challengeConfig` below for details. */ challengeConfig?: pulumi.Input; /** * Custom response bodies that can be referenced by `customResponse` actions. See `customResponseBody` below for details. */ customResponseBodies?: pulumi.Input[] | undefined>; /** * Data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option. See `dataProtectionConfig` below for details. */ dataProtectionConfig?: pulumi.Input; /** * Action to perform if none of the `rules` contained in the WebACL match. See `defaultAction` below for details. */ defaultAction?: pulumi.Input; /** * Friendly description of the WebACL. */ description?: pulumi.Input; lockToken?: pulumi.Input; /** * Monetization configuration for the web ACL. Provide this when any rule in the web ACL uses the `monetize` action. See `monetizationConfig` below for details. */ monetizationConfig?: pulumi.Input; /** * Friendly name of the WebACL. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Raw JSON string to allow more than three nested statements. Conflicts with `rule` attribute. This is for advanced use cases where more than 3 levels of nested statements are required. **There is no drift detection at this time**. If you use this attribute instead of `rule`, you will be foregoing drift detection. Additionally, importing an existing web ACL into a configuration with `ruleJson` set will result in a one time in-place update as the remote rule configuration is initially written to the `rule` attribute. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateWebACL.html) for the JSON structure. */ ruleJson?: pulumi.Input; /** * **`rule` blocks in this resource have several known limitations.** Consider using `aws.wafv2.WebAclRule` to manage rules as separate resources instead. Rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See `rule` below for details. */ rules?: pulumi.Input[] | undefined>; /** * Scope of the web ACL, either an AWS CloudFront distribution or a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider. */ scope?: pulumi.Input; /** * Map of key-value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. */ tokenDomains?: pulumi.Input[] | undefined>; /** * Amazon CloudWatch metrics and web request sample collection configuration. See `visibilityConfig` below for details. */ visibilityConfig?: pulumi.Input; } /** * The set of arguments for constructing a WebAcl resource. */ export interface WebAclArgs { /** * Custom configurations for the associations between the web ACL and protected resources. See `associationConfig` below for details. */ associationConfig?: pulumi.Input; /** * Configuration for how AWS WAF handles CAPTCHA evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `captchaConfig` below for details. */ captchaConfig?: pulumi.Input; /** * Configuration for how AWS WAF handles Challenge evaluations at the web ACL level (used by [AWS Bot Control](https://docs.aws.amazon.com/waf/latest/developerguide/aws-managed-rule-groups-bot.html)). See `challengeConfig` below for details. */ challengeConfig?: pulumi.Input; /** * Custom response bodies that can be referenced by `customResponse` actions. See `customResponseBody` below for details. */ customResponseBodies?: pulumi.Input[] | undefined>; /** * Data protection to apply to the web request data for the web ACL. This is a web ACL level data protection option. See `dataProtectionConfig` below for details. */ dataProtectionConfig?: pulumi.Input; /** * Action to perform if none of the `rules` contained in the WebACL match. See `defaultAction` below for details. */ defaultAction: pulumi.Input; /** * Friendly description of the WebACL. */ description?: pulumi.Input; /** * Monetization configuration for the web ACL. Provide this when any rule in the web ACL uses the `monetize` action. See `monetizationConfig` below for details. */ monetizationConfig?: pulumi.Input; /** * Friendly name of the WebACL. If omitted, the provider will assign a random, unique name. Conflicts with `namePrefix`. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Raw JSON string to allow more than three nested statements. Conflicts with `rule` attribute. This is for advanced use cases where more than 3 levels of nested statements are required. **There is no drift detection at this time**. If you use this attribute instead of `rule`, you will be foregoing drift detection. Additionally, importing an existing web ACL into a configuration with `ruleJson` set will result in a one time in-place update as the remote rule configuration is initially written to the `rule` attribute. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_CreateWebACL.html) for the JSON structure. */ ruleJson?: pulumi.Input; /** * **`rule` blocks in this resource have several known limitations.** Consider using `aws.wafv2.WebAclRule` to manage rules as separate resources instead. Rule blocks used to identify the web requests that you want to `allow`, `block`, or `count`. See `rule` below for details. */ rules?: pulumi.Input[] | undefined>; /** * Scope of the web ACL, either an AWS CloudFront distribution or a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider. */ scope: pulumi.Input; /** * Map of key-value pairs to associate with the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Domains that AWS WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains. */ tokenDomains?: pulumi.Input[] | undefined>; /** * Amazon CloudWatch metrics and web request sample collection configuration. See `visibilityConfig` below for details. */ visibilityConfig: pulumi.Input; } //# sourceMappingURL=webAcl.d.ts.map