Provides an AWS Backup Report Plan resource.
resource "aws_backup_report_plan" "example" {
name = "example_name"
description = "example description"
report_delivery_channel {
formats = [
"CSV",
"JSON"
]
s3_bucket_name = "example-bucket-name"
}
report_setting {
report_template = "RESTORE_JOB_REPORT"
}
tags = {
"Name" = "Example Report Plan"
}
}
This resource supports the following arguments:
description
- (Optional) The description of the report plan with a maximum of 1,024 charactersname
- (Required) The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters, numbers, and underscores.report_delivery_channel
- (Required) An object that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports. Detailed below.report_setting
- (Required) An object that identifies the report template for the report. Reports are built using a report template. Detailed below.tags
- (Optional) Metadata that you can assign to help organize the report plans you create. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.report_delivery_channel
supports the following arguments:
formats
- (Optional) A list of the format of your reports: CSV, JSON, or both. If not specified, the default format is CSV.s3_bucket_name
- (Required) The unique name of the S3 bucket that receives your reports.s3_key_prefix
- (Optional) The prefix for where Backup Audit Manager delivers your reports to Amazon S3. The prefix is this part of the following path: s3://your-bucket-name/prefix/Backup/us-west-2/year/month/day/report-name. If not specified, there is no prefix.report_setting
supports the following arguments:
accounts
- (Optional) Specifies the list of accounts a report covers.framework_arns
- (Optional) Specifies the Amazon Resource Names (ARNs) of the frameworks a report covers.number_of_frameworks
- (Optional) Specifies the number of frameworks a report covers.organization_units
- (Optional) Specifies the list of Organizational Units a report covers.regions
- (Optional) Specifies the list of regions a report covers.report_template
- (Required) Identifies the report template for the report. Reports are built using a report template. The report templates are: RESOURCE_COMPLIANCE_REPORT
| CONTROL_COMPLIANCE_REPORT
| BACKUP_JOB_REPORT
| COPY_JOB_REPORT
| RESTORE_JOB_REPORT
.This resource exports the following attributes in addition to the arguments above:
arn
- The ARN of the backup report plan.creation_time
- The date and time that a report plan is created, in Unix format and Coordinated Universal Time (UTC).deployment_status
- The deployment status of a report plan. The statuses are: CREATE_IN_PROGRESS
| UPDATE_IN_PROGRESS
| DELETE_IN_PROGRESS
| COMPLETED
.id
- The id of the backup report plan.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.In Terraform v1.5.0 and later, use an import
block to import Backup Report Plan using the id
which corresponds to the name of the Backup Report Plan. For example:
import {
to = aws_backup_report_plan.test
id = "<id>"
}
Using terraform import
, import Backup Report Plan using the id
which corresponds to the name of the Backup Report Plan. For example:
% terraform import aws_backup_report_plan.test <id>