AWS WAF Regional Regional Web ACL Association

This page shows how to write Terraform and CloudFormation for AWS WAF Regional Regional Web ACL Association and write them securely.

aws_wafregional_web_acl_association (Terraform)

The Regional Web ACL Association in AWS WAF Regional can be configured in Terraform with the resource name aws_wafregional_web_acl_association. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an association with WAF Regional Web ACL. -> Note: An Application Load Balancer can only be associated with one WAF Regional WebACL.

AWS::WAFRegional::WebACLAssociation (CloudFormation)

The WebACLAssociation in WAFRegional can be configured in CloudFormation with the resource name AWS::WAFRegional::WebACLAssociation. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

graphql.sam.yml#L88
    Type: AWS::WAFRegional::WebACLAssociation
    DependsOn:
      - ServerlessApi
    Properties:
      ResourceArn: !Sub
        - 'arn:aws:apigateway:${AWS::Region}::/restapis/${apiId}/stages/${stage}'
serverless.yml#L46
      Type: AWS::WAFRegional::WebACLAssociation
      Properties:
        ResourceArn:
          Fn::Join:
            - "/"
            -
devops-training-regional-waf.yml#L41
    Type: 'AWS::WAFRegional::WebACLAssociation'
    Properties:
        ResourceArn: !ImportValue lb-arn
        WebACLId: !Ref MyWebACL

Outputs:
resources.yml#L167
    Type: AWS::WAFRegional::WebACLAssociation
    Properties:
      ResourceArn:
        Ref: SpaServerDeployment
      WebACLId: ${self:custom.apig.webACLId, 'undefined'}

waf.yml#L115
    Type: AWS::WAFRegional::WebACLAssociation
    Properties:
      ResourceArn: !Ref ApplicationLoadBalancer
      WebACLId: !Ref WebAcl
WAFRegionalWebACLAssociationSpecification.json#L3
    "AWS::WAFRegional::WebACLAssociation": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html",
      "Properties": {
        "ResourceArn": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn",
WAFRegionalWebACLAssociationSpecification.json#L3
    "AWS::WAFRegional::WebACLAssociation": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html",
      "Properties": {
        "ResourceArn": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn",
WAFRegionalWebACLAssociationSpecification.json#L3
    "AWS::WAFRegional::WebACLAssociation": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html",
      "Properties": {
        "ResourceArn": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn",
WAFRegionalWebACLAssociationSpecification.json#L3
    "AWS::WAFRegional::WebACLAssociation": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html",
      "Properties": {
        "ResourceArn": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn",
WAFRegionalWebACLAssociationSpecification.json#L3
    "AWS::WAFRegional::WebACLAssociation": {
      "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html",
      "Properties": {
        "ResourceArn": {
          "Required": true,
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafregional-webaclassociation.html#cfn-wafregional-webaclassociation-resourcearn",

Parameters

Explanation in CloudFormation Registry

Note This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. The AWS::WAFRegional::WebACLAssociation resource associates an AWS WAF Regional web access control group (ACL) with a resource.

Frequently asked questions

What is AWS WAF Regional Regional Web ACL Association?

AWS WAF Regional Regional Web ACL Association is a resource for WAF Regional of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS WAF Regional Regional Web ACL Association?

For CloudFormation, the anigenero/lambda-graphql-boilerplate, GeminiWind/serveless-examples and msalmansaeedch786/devops-training source code examples are useful. See the CloudFormation Example section for further details.