title: Enabling Logs for AWS WAF WebAcl does not work in CDK
body: <p>My goal is to enable logging for a regional WebAcl via AWS CDK. This <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html" rel="nofollow noreferrer">seems to be possible</a> over Cloud Formation and there are the appropriate constructs in CDK. But when using the following code to create a Log Group and linking it in a <a href="https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_wafv2.CfnLoggingConfiguration.html" rel="nofollow noreferrer">LoggingConfiguration</a> ...</p>
  <pre><code>  const webAclLogGroup = new LogGroup(scope, &quot;awsWafLogs&quot;, {
      logGroupName: `aws-waf-logs`
    });
  
    // Create logging configuration with log group as destination
    new CfnLoggingConfiguration(scope, &quot;webAclLoggingConfiguration&quot;, {
      logDestinationConfigs: webAclLogGroup.logGroupArn, // Arn of LogGroup
      resourceArn: aclArn // Arn of Acl
    });
  </code></pre>
  <p>... I get an exception during <code>cdk deploy</code>, stating that the string in the LogdestinationConfig is not a correct Arn (some parts of the Arn in the log messages have been removed):</p>
  <pre><code>Resource handler returned message: &quot;Error reason: The ARN isn't valid. A valid ARN begins with arn: and includes other information separated by colons or slashes., field: LOG_DESTINATION, parameter: arn:aws:logs:xxx:xxx:xxx-awswaflogsF99ED1BA-PAeH9Lt2Y3fi:* (Service: Wafv2, Status Code: 400, Request ID: xxx, Extended Request ID: null)&quot; 
  </code></pre>
  <p>I cannot see an error in the generated Cloud Formation code after <code>cdk synth</code>:</p>
  <pre><code>&quot;webAclLoggingConfiguration&quot;: {
    &quot;id&quot;: &quot;webAclLoggingConfiguration&quot;,
    &quot;path&quot;: &quot;xxx/xxx/webAclLoggingConfiguration&quot;,
    &quot;attributes&quot;: {
      &quot;aws:cdk:cloudformation:type&quot;: &quot;AWS::WAFv2::LoggingConfiguration&quot;,
      &quot;aws:cdk:cloudformation:props&quot;: {
        &quot;logDestinationConfigs&quot;: [
          {
            &quot;Fn::GetAtt&quot;: [
              {
                &quot;Ref&quot;: &quot;awsWafLogs58D3FD01&quot;
              },
              &quot;Arn&quot;
            ]
          }
        ],
        &quot;resourceArn&quot;: {
          &quot;Fn::GetAtt&quot;: [
            &quot;webACL&quot;,
            &quot;Arn&quot;
          ]
        }
      }
    },
    &quot;constructInfo&quot;: {
      &quot;fqn&quot;: &quot;aws-cdk-lib.aws_wafv2.CfnLoggingConfiguration&quot;,
      &quot;version&quot;: &quot;2.37.1&quot;
    }
  },
  </code></pre>
  <p>I'm using Cdk with Typescript and the Cdk version is currently set to <code>2.37.1</code> but it also did not work with <code>2.16.0</code>.</p>