hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.2k forks source link

[Enhancement]: Quicksight - AllSources argument not supported in schema for FilterScopeConfiguration #38334

Open TomasJirsik opened 4 months ago

TomasJirsik commented 4 months ago

Terraform Core Version

1.9.2

AWS Provider Version

5.57.0

Affected Resource(s)

The all_sheets argument for scope_configuration is not supported by terraform although provided by the quicksight API. Only selected_sheets is available.

Expected Behavior

The terraform should support the available arguments as defined in quicksight API. However, the schema supports only one of the two available arguments.

Relevant source code here

Actual Behavior

The argument is unsupported

Relevant Error/Panic Output Snippet

│ Error: Unsupported argument
│ 
│   on analysis_from_scratch.tf line 174, in resource "aws_quicksight_analysis" "hello_world_analysis":
│  174:         all_sheets = {  }
│ 
│ An argument named "all_sheets" is not expected here.
╵

Terraform Configuration Files

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"
    }
    filter_groups {
      cross_dataset   = "ALL_DATASETS"
      filter_group_id = "filter_group_id"
      status = "ENABLED"

      filters {
        category_filter {
          filter_id = "filterid"
          column {
            column_name         = "column_name"
            data_set_identifier = "1"
          }
          configuration {
            filter_list_configuration {
              match_operator     = "CONTAINS"
              select_all_options = "FILTER_ALL_VALUES"
            }
          }
        }
      }

      scope_configuration {
        all_sheets = {  }
      }
    }
    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"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Steps to Reproduce

run terraform plan or terraform apply

Debug Output

╷ │ Error: Unsupported argument │ │ on test.tf line 31, in resource "aws_quicksight_analysis" "example": │ 31: all_sheets = { } │ │ An argument named "all_sheets" is not expected here. ╵

Panic Output

No response

Important Factoids

No response

References

related schema - https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/quicksight/schema/template_filter.go#L460

Would you like to implement a fix?

No

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

justinretzolk commented 4 months ago

Hey @TomasJirsik 👋 Thanks for taking the time to raise this! We consider additions to existing resources to be an enhancement, rather than a bug. With that in mind, I'm going to update a few things about this issue. There's no further action needed from you at this point, I just like to let people know before making these kinds of modifications.

TomasJirsik commented 3 months ago

Hi @justinretzolk, thanks for the update! Is there any estimation if/when the enhancement will be implemented? Thanks