AWS Route 53 Resolver Query Log Config

This page shows how to write Terraform and CloudFormation for Route 53 Resolver Query Log Config and write them securely.

aws_route53_resolver_query_log_config (Terraform)

The Query Log Config in Route 53 Resolver can be configured in Terraform with the resource name aws_route53_resolver_query_log_config. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

route53.tf#L1
resource "aws_route53_resolver_query_log_config" "this" {
  name            = local.route53_query_log_config_name
  destination_arn = aws_cloudwatch_log_group.this.arn
  tags            = var.tags
}

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

Provides a Route 53 Resolver query logging configuration resource.

AWS::Route53Resolver::ResolverQueryLoggingConfig (CloudFormation)

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

Example Usage from GitHub

query_logging.yml#L5
    Type: "AWS::Route53Resolver::ResolverQueryLoggingConfig"
    Properties:
      DestinationArn: "change me to the real arn of the logging destination"
      Name: "Dns Query Logging"
  Route53QueryLoggingConfigAssociation:
    Type: "AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation"
vpc.cfn.yml#L294
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfig
    Properties:
      Name: !Sub ${AccountCode}-${RegionCode}-${Application}-vpcquerylogs
      DestinationArn: !Sub arn:aws:s3:::${LogsBucketName}/vpcquerylogs

  ResolverQueryLoggingConfigAssociation:
route53-resolver-logs.yml#L19
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfig
    Properties:
      DestinationArn: !GetAtt LogGroup.Arn
      Name: !Join ['', [!Ref VpcId, -resolver-logs]]
  LoggingAssociation:
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation
hybrid-dns.yaml#L897
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfig
    Properties:
      DestinationArn: !GetAtt ResolverQueryLoggingLogGroup.Arn

  ResolverQueryLoggingConfigAssociation:
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation
WorkshopStack.yaml#L451
    Type: AWS::Route53Resolver::ResolverQueryLoggingConfig
    Properties:
      DestinationArn:
        Fn::GetAtt:
          - BucketLogs9C0DCA97
          - Arn
awsResouceIconMatches.json#L645
        "resourceType": "AWS::Route53Resolver::ResolverQueryLoggingConfig",
        "filePath": null
      },
      {
        "resourceType": "AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation",
        "filePath": null
template.json#L55
    "AWS::Route53Resolver::ResolverQueryLoggingConfig": {
      "Type": "AWS::Route53Resolver::ResolverQueryLoggingConfig",
      "Properties": {}
    },
    "AWS::EC2::VPCPeeringConnection": {
      "Type": "AWS::EC2::VPCPeeringConnection",

Parameters

Explanation in CloudFormation Registry

The AWS::Route53Resolver::ResolverQueryLoggingConfig resource is a complex type that contains settings for one query logging configuration.

Frequently asked questions

What is AWS Route 53 Resolver Query Log Config?

AWS Route 53 Resolver Query Log Config is a resource for Route 53 Resolver of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Route 53 Resolver Query Log Config?

For Terraform, the ministryofjustice/hmpps-ems-platform-terraform-modules source code example is useful. See the Terraform Example section for further details.

For CloudFormation, the mobious999/Cloudformation, arhs/spikeseed-cloud-labs and andrewkrug/securing-the-cloud-supplemental source code examples are useful. See the CloudFormation Example section for further details.