Resource: aws_quicksight_analysis

Resource for managing a QuickSight Analysis.

Example Usage

From Source Template

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"
      }
    }
  }
}

With Definition

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"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

permissions

source_entity

source_template

data_set_references

parameters

definition

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

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