Resource for managing a QuickSight Analysis.
resource "aws_quicksight_analysis" "example" {
analysis_id = "example-id"
name = "example-name"
source_entity {
source_template {
arn = aws_quicksight_template.source.arn
data_set_references {
data_set_arn = aws_quicksight_data_set.dataset.arn
data_set_placeholder = "1"
}
}
}
}
resource "aws_quicksight_analysis" "example" {
analysis_id = "example-id"
name = "example-name"
definition {
data_set_identifiers_declarations {
data_set_arn = aws_quicksight_data_set.dataset.arn
identifier = "1"
}
sheets {
title = "Example"
sheet_id = "Example1"
visuals {
line_chart_visual {
visual_id = "LineChart"
title {
format_text {
plain_text = "Line Chart Example"
}
}
chart_configuration {
field_wells {
line_chart_aggregated_field_wells {
category {
categorical_dimension_field {
field_id = "1"
column {
data_set_identifier = "1"
column_name = "Column1"
}
}
}
values {
categorical_measure_field {
field_id = "2"
column {
data_set_identifier = "1"
column_name = "Column1"
}
aggregation_function = "COUNT"
}
}
}
}
}
}
}
}
}
}
The following arguments are required:
analysis_id
- (Required, Forces new resource) Identifier for the analysis.name
- (Required) Display name for the analysis.The following arguments are optional:
aws_account_id
- (Optional, Forces new resource) AWS account ID.definition
- (Optional) A detailed analysis definition. Only one of definition
or source_entity
should be configured. See definition.parameters
- (Optional) The parameters for the creation of the analysis, which you want to use to override the default settings. An analysis can have any type of parameters, and some parameters might accept multiple values. See parameters.permissions
- (Optional) A set of resource permissions on the analysis. Maximum of 64 items. See permissions.recovery_window_in_days
- (Optional) A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. Use 0
to force deletion without recovery. Minimum value of 7
. Maximum value of 30
. Default to 30
.source_entity
- (Optional) The entity that you are using as a source when you create the analysis (template). Only one of definition
or source_entity
should be configured. See source_entity.tags
- (Optional) Key-value map of resource tags. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.theme_arn
- (Optional) The Amazon Resource Name (ARN) of the theme that is being used for this analysis. The theme ARN must exist in the same AWS account where you create the analysis.actions
- (Required) List of IAM actions to grant or revoke permissions on.principal
- (Required) ARN of the principal. See the ResourcePermission documentation for the applicable ARN values.source_template
- (Optional) The source template. See source_template.arn
- (Required) The Amazon Resource Name (ARN) of the resource.data_set_references
- (Required) List of dataset references. See data_set_references.data_set_arn
- (Required) Dataset Amazon Resource Name (ARN).data_set_placeholder
- (Required) Dataset placeholder.date_time_parameters
- (Optional) A list of parameters that have a data type of date-time. See AWS API Documentation for complete description.decimal_parameters
- (Optional) A list of parameters that have a data type of decimal. See AWS API Documentation for complete description.integer_parameters
- (Optional) A list of parameters that have a data type of integer. See AWS API Documentation for complete description.string_parameters
- (Optional) A list of parameters that have a data type of string. See AWS API Documentation for complete description.data_set_identifiers_declarations
- (Required) A list dataset identifier declarations. With this mapping,you can use dataset identifiers instead of dataset Amazon Resource Names (ARNs) throughout the analysis sub-structures. See AWS API Documentation for complete description.analysis_defaults
- (Optional) The configuration for default analysis settings. See AWS API Documentation for complete description.calculated_fields
- (Optional) A list of calculated field definitions for the analysis. See AWS API Documentation for complete description.column_configurations
- (Optional) A list of analysis-level column configurations. Column configurations are used to set default formatting for a column that's used throughout an analysis. See AWS API Documentation for complete description.filter_groups
- (Optional) A list of filter definitions for an analysis. See AWS API Documentation for complete description. For more information, see Filtering Data in Amazon QuickSight User Guide.parameters_declarations
- (Optional) A list of parameter declarations for an analysis. Parameters are named variables that can transfer a value for use by an action or an object. See AWS API Documentation for complete description. For more information, see Parameters in Amazon QuickSight in the Amazon QuickSight User Guide.sheets
- (Optional) A list of sheet definitions for an analysis. See AWS API Documentation for complete description.This resource exports the following attributes in addition to the arguments above:
arn
- ARN of the analysis.created_time
- The time that the analysis was created.id
- A comma-delimited string joining AWS account ID and analysis ID.last_updated_time
- The time that the analysis was last updated.status
- The analysis creation status.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 5m
)update
- (Default 5m
)delete
- (Default 5m
)In Terraform v1.5.0 and later, use an import
block to import a QuickSight Analysis using the AWS account ID and analysis ID separated by a comma (,
). For example:
import {
to = aws_quicksight_analysis.example
id = "123456789012,example-id"
}
Using terraform import
, import a QuickSight Analysis using the AWS account ID and analysis ID separated by a comma (,
). For example:
% terraform import aws_quicksight_analysis.example 123456789012,example-id