Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: expandTimeRangeFilterValue does not parse rolling_date attribute #33632

Closed
jackarmorgie opened this issue Sep 26, 2023 · 3 comments · Fixed by #33931
Closed

[Bug]: expandTimeRangeFilterValue does not parse rolling_date attribute #33632

jackarmorgie opened this issue Sep 26, 2023 · 3 comments · Fixed by #33931
Labels
bug Addresses a defect in current functionality. service/quicksight Issues and PRs that pertain to the quicksight service.
Milestone

Comments

@jackarmorgie
Copy link
Contributor

jackarmorgie commented Sep 26, 2023

Terraform Core Version

1.0.0

AWS Provider Version

5.17.0

Affected Resource(s)

aws_quicksight_dashboard

Expected Behavior

Time range filter with rolling start and/or end date to be added to dashboard.

Actual Behavior

Dashboard fails to be updated.

Relevant Error/Panic Output Snippet

Error: updating Amazon QuickSight Dashboard (123456789012,2a8118f7-b78b-f4ef-be1e-bdb7ed1ef047): ValidationException: 2 validation errors detected: Value 'TimeRangeFilterValue(staticValue=null, rollingDate=null, parameter=null)' at 'definition.filterGroups.2.member.filters.1.member.timeRangeFilter.rangeMaximumValue' failed to satisfy constraint: Only 1 member of [staticValue, rollingDate, parameter] should be provided for structure TimeRangeFilterValue; Value 'TimeRangeFilterValue(staticValue=null, rollingDate=null, parameter=null)' at 'definition.filterGroups.2.member.filters.1.member.timeRangeFilter.rangeMinimumValue' failed to satisfy constraint: Only 1 member of [staticValue, rollingDate, parameter] should be provided for structure TimeRangeFilterValue
│       status code: 400, request id: bbe657ea-4950-41ff-a0da-8398090dfcd8
│ 
│   with aws_quicksight_dashboard.example,
│   on quicksight.tf line 133, in resource "aws_quicksight_dashboard" "example":
│  133: resource "aws_quicksight_dashboard" "example" {
│

Terraform Configuration Files

resource "aws_quicksight_dashboard" "example" {
    dashboard_id = random_uuid.dashboard_id.result
    name = "example"
    version_description = "example"
    definition {
        data_set_identifiers_declarations {
            ...
        }
        sheets {
            ...
        }
        filter_groups {
            filter_group_id = random_uuid.filter_group_id.result
            filters {
                time_range_filter {
                    filter_id = random_uuid.filter_id.result
                    column {
                        data_set_identifier = "example"
                        column_name = "message_timestamp"
                    }
                    include_minimum = true
                    include_maximum = false
                    range_minimum_value {
                        rolling_date {
                            expression = "addDateTime(-26, 'WK', truncDate('WK', now()))"
                        }
                    }
                    range_maximum_value {
                        rolling_date {
                            expression = "truncDate('WK', now())"
                        }
                    }
                    null_option = "NON_NULLS_ONLY"
                    time_granularity = "DAY"
                }
            }
            scope_configuration {
                selected_sheets {
                    sheet_visual_scoping_configurations {
                        sheet_id = random_uuid.sheet_id.result
                        scope = "SELECTED_VISUALS"
                        visual_ids = [
                            random_uuid.visual_id.result,
                        ]
                    }
                }
            }
            cross_dataset = "SINGLE_DATASET"
        }
    }
}

Steps to Reproduce

terraform init
terraform plan
terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

I think that range_minimum_value on this line should be replaced by rolling_date:

if v, ok := tfMap["range_minimum_value"].([]interface{}); ok && len(v) > 0 {

Would you like to implement a fix?

Yes

@jackarmorgie jackarmorgie added the bug Addresses a defect in current functionality. label Sep 26, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/quicksight Issues and PRs that pertain to the quicksight service. label Sep 26, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 26, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Oct 25, 2023
@github-actions github-actions bot added this to the v5.26.0 milestone Nov 14, 2023
Copy link

This functionality has been released in v5.26.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/quicksight Issues and PRs that pertain to the quicksight service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants