BB2-2910: BB2 Terraform Quicksight Analysis for PROD-APPS Dashboard #2151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA Ticket:
BB2-2910
User Story or Bug Summary:
As a part of the BB2 BFD Insights terraforming epic, we aim to enhance our configuration management by Terraforming our QuickSight Analysis used for the PROD-APPLICATIONS dashboard. This will enable us to efficiently configure and version-control this analysis, ensuring seamless tracking of changes as code.
What Does This PR Do?
NOTES:
Sensitive values are stored in a shared
terraform.tfvars
file currently, but we are planning to refactor this to use AWS SSM as a future improvement task BB2-2498.Determined that the UUID type identifiers for Analysis components are non-sensitive. These are for internal identifiers, like sheet_id, filter_id, visual_id, and others. For example, the same IDs can be used in both TEST and PROD versions/copies.
There are two workspaces setup:
test
- For development and testing purposes.prod
- For production.The
prod
workspace will be deployed after the full set of related Quicksight components are complete and reviewed together intest
.The following is a summary of work done for this PR:
Created a module for the Analysis:
quicksight-analysis-prod-applications
Utilized Terraform import & plan changes, and the AWS CLI (describe) outputs to create code for the resource definition in the module
main.tf
.terraform plan
changes output to create the definition inmain.tf
.main.tf
are of main interest for review.permissions
anddata_set_identifiers_declarations
sections.terraform.tfvars
and are different pertest
vsprod
workspace.first_app_name_select
variable at line 619.What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
A possible AWS provider bug (as of 5.29.0) was encountered and the
terraform plan
is always showing some changes. However, the resulting Analysis is working OK after aterraform apply
.For example, there are several of these types of changes shown for the definition:
For the above, the
height
value is 0 in the Analysis; however, setting this in the TF code produces an error with a message that the value must be greater than 0. Also, the value is never changed to 40 after an apply. This had worked for setting otherheight
values, but does not work forrow_header_style
. Hopeful that a future AWS provider version will handle this case, and we can get a clean "No changes" result for the apply.What seem to be other provider bugs related to import, plan and apply were able to be worked around, by making changes to the TF code and the Analysis via the Quicksight UI.
What Security Implications Does This PR Have?
Submitters should complete the following questionnaire:
If the answer to any of the questions below is Yes, then you must supply a link to the associated Security Impact Assessment (SIA), security checklist, or other similar document in Confluence here: N/A
If the answer to any of the questions below is Yes, then please add @StewGoin as a reviewer, and note that this PR should not be merged unless/until he also approves it.
What Needs to Be Merged and Deployed Before this PR?
Submitter Checklist
I have gone through and verified that...:
BFD-123: Adds foo
README
updates and changelog / release notes entries.TODO
and/orFIXME
comments, which include a JIRA ticket ID for any items that require urgent attention.