Resource: aws_quicksight_template

Resource for managing a QuickSight Template.

Example Usage

From Source Template

resource "aws_quicksight_template" "example" {
  template_id         = "example-id"
  name                = "example-name"
  version_description = "version"
  source_entity {
    source_template {
      arn = aws_quicksight_template.source.arn
    }
  }
}

With Definition

resource "aws_quicksight_template" "example" {
  template_id         = "example-id"
  name                = "example-name"
  version_description = "version"
  definition {
    data_set_configuration {
      data_set_schema {
        column_schema_list {
          name      = "Column1"
          data_type = "STRING"
        }
        column_schema_list {
          name      = "Column2"
          data_type = "INTEGER"
        }
      }
      placeholder = "1"
    }
    sheets {
      title    = "Test"
      sheet_id = "Test1"
      visuals {
        bar_chart_visual {
          visual_id = "BarChart"
          chart_configuration {
            field_wells {
              bar_chart_aggregated_field_wells {
                category {
                  categorical_dimension_field {
                    field_id = "1"
                    column {
                      column_name         = "Column1"
                      data_set_identifier = "1"
                    }
                  }
                }
                values {
                  numerical_measure_field {
                    field_id = "2"
                    column {
                      column_name         = "Column2"
                      data_set_identifier = "1"
                    }
                    aggregation_function {
                      simple_numerical_aggregation = "SUM"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

permissions

source_entity

source_analysis

data_set_references

source_template

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 Template using the AWS account ID and template ID separated by a comma (,). For example:

import {
  to = aws_quicksight_template.example
  id = "123456789012,example-id"
}

Using terraform import, import a QuickSight Template using the AWS account ID and template ID separated by a comma (,). For example:

% terraform import aws_quicksight_template.example 123456789012,example-id