AWS CloudFront Monitoring Subscription

This page shows how to write Terraform for CloudFront Monitoring Subscription and write them securely.

aws_cloudfront_monitoring_subscription (Terraform)

The Monitoring Subscription in CloudFront can be configured in Terraform with the resource name aws_cloudfront_monitoring_subscription. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

The following arguments are supported:

  • distribution_id - (Required) The ID of the distribution that you are enabling metrics for.
  • monitoring_subscription - (Required) A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.

monitoring_subscription

  • realtime_metrics_subscription_config - (Required) A subscription configuration for additional CloudWatch metrics. See below.

realtime_metrics_subscription_config

  • realtime_metrics_subscription_status - (Required) A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are Enabled and Disabled. See below.

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the CloudFront monitoring subscription, which corresponds to the distribution_id.

Explanation in Terraform Registry

Provides a CloudFront real-time log configuration resource.

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS CloudFront Monitoring Subscription?

AWS CloudFront Monitoring Subscription is a resource for CloudFront of Amazon Web Service. Settings can be wrote in Terraform.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.