LoggingConfiguration class

Provides an AWS Network Firewall Logging Configuration Resource

Example Usage

Logging to S3

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkfirewall.LoggingConfiguration("example", {
    loggingConfiguration: {
        logDestinationConfigs: [{
            logDestination: {
                bucketName: exampleAwsS3Bucket.bucket,
                prefix: "example",
            },
            logDestinationType: "S3",
            logType: "FLOW",
        }],
    },
    firewallArn: exampleAwsNetworkfirewallFirewall.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.LoggingConfiguration("example",
    logging_configuration={
        "log_destination_configs": [{
            "log_destination": {
                "bucketName": example_aws_s3_bucket["bucket"],
                "prefix": "example",
            },
            "log_destination_type": "S3",
            "log_type": "FLOW",
        }],
    },
    firewall_arn=example_aws_networkfirewall_firewall["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.NetworkFirewall.LoggingConfiguration("example", new()
    {
        LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs
        {
            LogDestinationConfigs = new[]
            {
                new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs
                {
                    LogDestination =
                    {
                        { "bucketName", exampleAwsS3Bucket.Bucket },
                        { "prefix", "example" },
                    },
                    LogDestinationType = "S3",
                    LogType = "FLOW",
                },
            },
        },
        FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.NewLoggingConfiguration(ctx, "example", &networkfirewall.LoggingConfigurationArgs{
			LoggingConfiguration: &networkfirewall.LoggingConfigurationLoggingConfigurationArgs{
				LogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{
					&networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{
						LogDestination: pulumi.StringMap{
							"bucketName": pulumi.Any(exampleAwsS3Bucket.Bucket),
							"prefix":     pulumi.String("example"),
						},
						LogDestinationType: pulumi.String("S3"),
						LogType:            pulumi.String("FLOW"),
					},
				},
			},
			FirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_networkfirewall_loggingconfiguration" "example" {
  logging_configuration = {
    log_destination_configs = [{
      "logDestination" = {
        "bucketName" = exampleAwsS3Bucket.bucket
        "prefix"     = "example"
      }
      "logDestinationType" = "S3"
      "logType"            = "FLOW"
    }]
  }
  firewall_arn = exampleAwsNetworkfirewallFirewall.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkfirewall.LoggingConfiguration;
import com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new LoggingConfiguration("example", LoggingConfigurationArgs.builder()
            .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()
                .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()
                    .logDestination(Map.ofEntries(
                        Map.entry("bucketName", exampleAwsS3Bucket.bucket()),
                        Map.entry("prefix", "example")
                    ))
                    .logDestinationType("S3")
                    .logType("FLOW")
                    .build())
                .build())
            .firewallArn(exampleAwsNetworkfirewallFirewall.arn())
            .build());

    }
}
resources:
  example:
    type: aws:networkfirewall:LoggingConfiguration
    properties:
      loggingConfiguration:
        logDestinationConfigs:
          - logDestination:
              bucketName: ${exampleAwsS3Bucket.bucket}
              prefix: example
            logDestinationType: S3
            logType: FLOW
      firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}

Logging to CloudWatch

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkfirewall.LoggingConfiguration("example", {
    loggingConfiguration: {
        logDestinationConfigs: [{
            logDestination: {
                logGroup: exampleAwsCloudwatchLogGroup.name,
            },
            logDestinationType: "CloudWatchLogs",
            logType: "ALERT",
        }],
    },
    firewallArn: exampleAwsNetworkfirewallFirewall.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.LoggingConfiguration("example",
    logging_configuration={
        "log_destination_configs": [{
            "log_destination": {
                "logGroup": example_aws_cloudwatch_log_group["name"],
            },
            "log_destination_type": "CloudWatchLogs",
            "log_type": "ALERT",
        }],
    },
    firewall_arn=example_aws_networkfirewall_firewall["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.NetworkFirewall.LoggingConfiguration("example", new()
    {
        LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs
        {
            LogDestinationConfigs = new[]
            {
                new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs
                {
                    LogDestination =
                    {
                        { "logGroup", exampleAwsCloudwatchLogGroup.Name },
                    },
                    LogDestinationType = "CloudWatchLogs",
                    LogType = "ALERT",
                },
            },
        },
        FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.NewLoggingConfiguration(ctx, "example", &networkfirewall.LoggingConfigurationArgs{
			LoggingConfiguration: &networkfirewall.LoggingConfigurationLoggingConfigurationArgs{
				LogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{
					&networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{
						LogDestination: pulumi.StringMap{
							"logGroup": pulumi.Any(exampleAwsCloudwatchLogGroup.Name),
						},
						LogDestinationType: pulumi.String("CloudWatchLogs"),
						LogType:            pulumi.String("ALERT"),
					},
				},
			},
			FirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_networkfirewall_loggingconfiguration" "example" {
  logging_configuration = {
    log_destination_configs = [{
      "logDestination" = {
        "logGroup" = exampleAwsCloudwatchLogGroup.name
      }
      "logDestinationType" = "CloudWatchLogs"
      "logType"            = "ALERT"
    }]
  }
  firewall_arn = exampleAwsNetworkfirewallFirewall.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkfirewall.LoggingConfiguration;
import com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new LoggingConfiguration("example", LoggingConfigurationArgs.builder()
            .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()
                .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()
                    .logDestination(Map.of("logGroup", exampleAwsCloudwatchLogGroup.name()))
                    .logDestinationType("CloudWatchLogs")
                    .logType("ALERT")
                    .build())
                .build())
            .firewallArn(exampleAwsNetworkfirewallFirewall.arn())
            .build());

    }
}
resources:
  example:
    type: aws:networkfirewall:LoggingConfiguration
    properties:
      loggingConfiguration:
        logDestinationConfigs:
          - logDestination:
              logGroup: ${exampleAwsCloudwatchLogGroup.name}
            logDestinationType: CloudWatchLogs
            logType: ALERT
      firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}

Logging to Kinesis Data Firehose

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkfirewall.LoggingConfiguration("example", {
    loggingConfiguration: {
        logDestinationConfigs: [{
            logDestination: {
                deliveryStream: exampleAwsKinesisFirehoseDeliveryStream.name,
            },
            logDestinationType: "KinesisDataFirehose",
            logType: "TLS",
        }],
    },
    firewallArn: exampleAwsNetworkfirewallFirewall.arn,
});
import pulumi
import pulumi_aws as aws

example = aws.networkfirewall.LoggingConfiguration("example",
    logging_configuration={
        "log_destination_configs": [{
            "log_destination": {
                "deliveryStream": example_aws_kinesis_firehose_delivery_stream["name"],
            },
            "log_destination_type": "KinesisDataFirehose",
            "log_type": "TLS",
        }],
    },
    firewall_arn=example_aws_networkfirewall_firewall["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.NetworkFirewall.LoggingConfiguration("example", new()
    {
        LoggingConfig = new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationArgs
        {
            LogDestinationConfigs = new[]
            {
                new Aws.NetworkFirewall.Inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs
                {
                    LogDestination =
                    {
                        { "deliveryStream", exampleAwsKinesisFirehoseDeliveryStream.Name },
                    },
                    LogDestinationType = "KinesisDataFirehose",
                    LogType = "TLS",
                },
            },
        },
        FirewallArn = exampleAwsNetworkfirewallFirewall.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/networkfirewall"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkfirewall.NewLoggingConfiguration(ctx, "example", &networkfirewall.LoggingConfigurationArgs{
			LoggingConfiguration: &networkfirewall.LoggingConfigurationLoggingConfigurationArgs{
				LogDestinationConfigs: networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArray{
					&networkfirewall.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs{
						LogDestination: pulumi.StringMap{
							"deliveryStream": pulumi.Any(exampleAwsKinesisFirehoseDeliveryStream.Name),
						},
						LogDestinationType: pulumi.String("KinesisDataFirehose"),
						LogType:            pulumi.String("TLS"),
					},
				},
			},
			FirewallArn: pulumi.Any(exampleAwsNetworkfirewallFirewall.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_networkfirewall_loggingconfiguration" "example" {
  logging_configuration = {
    log_destination_configs = [{
      "logDestination" = {
        "deliveryStream" = exampleAwsKinesisFirehoseDeliveryStream.name
      }
      "logDestinationType" = "KinesisDataFirehose"
      "logType"            = "TLS"
    }]
  }
  firewall_arn = exampleAwsNetworkfirewallFirewall.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkfirewall.LoggingConfiguration;
import com.pulumi.aws.networkfirewall.LoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationArgs;
import com.pulumi.aws.networkfirewall.inputs.LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new LoggingConfiguration("example", LoggingConfigurationArgs.builder()
            .loggingConfiguration(LoggingConfigurationLoggingConfigurationArgs.builder()
                .logDestinationConfigs(LoggingConfigurationLoggingConfigurationLogDestinationConfigArgs.builder()
                    .logDestination(Map.of("deliveryStream", exampleAwsKinesisFirehoseDeliveryStream.name()))
                    .logDestinationType("KinesisDataFirehose")
                    .logType("TLS")
                    .build())
                .build())
            .firewallArn(exampleAwsNetworkfirewallFirewall.arn())
            .build());

    }
}
resources:
  example:
    type: aws:networkfirewall:LoggingConfiguration
    properties:
      loggingConfiguration:
        logDestinationConfigs:
          - logDestination:
              deliveryStream: ${exampleAwsKinesisFirehoseDeliveryStream.name}
            logDestinationType: KinesisDataFirehose
            logType: TLS
      firewallArn: ${exampleAwsNetworkfirewallFirewall.arn}

Import

Using pulumi import, import Network Firewall Logging Configurations using the firewallArn. For example:

$ pulumi import aws:networkfirewall/loggingConfiguration:LoggingConfiguration example arn:aws:network-firewall:us-west-1:123456789012:firewall/example

Constructors

LoggingConfiguration(String name, {LoggingConfigurationArgs? args, CustomResourceOptions? options})
Creates a new LoggingConfiguration. name The Pulumi resource name. args Arguments used to configure this LoggingConfiguration. The set of arguments for LoggingConfiguration. options Resource options controlling this resource's behavior.
LoggingConfiguration.reference(String urn)
Creates a typed reference to an existing LoggingConfiguration resource.

Properties

childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
enableMonitoringDashboard ↔ Output<bool>
Whether to enable the detailed firewall monitoring dashboard on the firewall. Defaults to false.
latefinal
firewallArn ↔ Output<String>
ARN of the Network Firewall firewall.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
loggingConfiguration ↔ Output<LoggingConfigurationLoggingConfiguration>
A configuration block describing how AWS Network Firewall performs logging for a firewall. See Logging Configuration below for details.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {LoggingConfigurationState? state, CustomResourceOptions? options}) → LoggingConfiguration
Gets an existing LoggingConfiguration resource's state with the given name and id.