Skip to content

Commit

Permalink
Add a document for aws_cloudfront_monitoring_subscription resource
Browse files Browse the repository at this point in the history
  • Loading branch information
shuheiktgw authored and bill-rich committed Jun 30, 2021
1 parent d99391f commit 4ef8063
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions website/docs/r/cloudfront_monitoring_subscription.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
subcategory: "CloudFront"
layout: "aws"
page_title: "AWS: aws_cloudfront_monitoring_subscription"
description: |-
Provides a CloudFront monitoring subscription resource.
---

# Resource: aws_cloudfront_monitoring_subscription

Provides a CloudFront real-time log configuration resource.

## Example Usage

```hcl
resource "aws_cloudfront_monitoring_subscription" "example" {
distribution_id = aws_cloudfront_distribution.example.id
monitoring_subscription {
realtime_metrics_subscription_config {
realtime_metrics_subscription_status = "Enabled"
}
}
}
```

## Argument Reference

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.

The `monitoring_subscription` object supports the following argument:

* `realtime_metrics_subscription_config` - (Required) A subscription configuration for additional CloudWatch metrics.

The `realtime_metrics_subscription_config` object supports the following argument:

* `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`.

## Attributes Reference

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`.

## Import

CloudFront monitoring subscription can be imported using the id, e.g.

```
$ terraform import aws_cloudfront_monitoring_subscription.example E3QYSUHO4VYRGB
```

0 comments on commit 4ef8063

Please sign in to comment.