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

Tech debt: Reduce tags boilerplate code - Plugin SDK resources q* (Phase 3c) #30478

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 5, 2023

Description

Extends the work done in Phase 2 to the remaining resources implemented using Terraform Plugin SDK.

Relations

Relates #30280.
Relates #29747.
Relates #30417.
Relates #30421.
Relates #30430.
Relates #30449.
Relates #30454.
Relates #30461.
Relates #30463.
Relates #30476.
Relates #30477.

Output from Acceptance Testing

=== RUN   TestAccQLDBLedgerDataSource_basic
=== PAUSE TestAccQLDBLedgerDataSource_basic
=== RUN   TestAccQLDBLedger_basic
=== PAUSE TestAccQLDBLedger_basic
=== RUN   TestAccQLDBLedger_tags
=== PAUSE TestAccQLDBLedger_tags
=== RUN   TestAccQLDBStream_basic
=== PAUSE TestAccQLDBStream_basic
=== RUN   TestAccQLDBStream_tags
=== PAUSE TestAccQLDBStream_tags
=== CONT  TestAccQLDBLedgerDataSource_basic
=== CONT  TestAccQLDBStream_basic
--- PASS: TestAccQLDBStream_basic (299.43s)
=== CONT  TestAccQLDBLedger_basic
--- PASS: TestAccQLDBLedgerDataSource_basic (316.28s)
=== CONT  TestAccQLDBStream_tags
--- PASS: TestAccQLDBLedger_basic (352.75s)
=== CONT  TestAccQLDBLedger_tags
--- PASS: TestAccQLDBStream_tags (424.16s)
--- PASS: TestAccQLDBLedger_tags (376.14s)
PASS
% make testacc TESTARGS='-run=_basic$$\|_tags$$' PKG=quicksight ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/quicksight/... -v -count 1 -parallel 2  -run=_basic$\|_tags$ -timeout 180m
=== RUN   TestAccQuickSightDataSetDataSource_basic
=== PAUSE TestAccQuickSightDataSetDataSource_basic
=== RUN   TestAccQuickSightDataSet_basic
=== PAUSE TestAccQuickSightDataSet_basic
=== RUN   TestAccQuickSightDataSet_tags
=== PAUSE TestAccQuickSightDataSet_tags
=== RUN   TestAccQuickSightDataSource_basic
=== PAUSE TestAccQuickSightDataSource_basic
=== RUN   TestAccQuickSightDataSource_tags
=== PAUSE TestAccQuickSightDataSource_tags
=== RUN   TestAccQuickSightFolder_basic
=== PAUSE TestAccQuickSightFolder_basic
=== RUN   TestAccQuickSightFolder_tags
=== PAUSE TestAccQuickSightFolder_tags
=== RUN   TestAccQuickSightGroupMembership_basic
=== PAUSE TestAccQuickSightGroupMembership_basic
=== RUN   TestAccQuickSightGroup_basic
=== PAUSE TestAccQuickSightGroup_basic
=== RUN   TestAccQuickSightUser_basic
=== PAUSE TestAccQuickSightUser_basic
=== CONT  TestAccQuickSightDataSetDataSource_basic
=== CONT  TestAccQuickSightFolder_basic
=== CONT  TestAccQuickSightDataSetDataSource_basic
    data_set_data_source_test.go:20: Step 1/1 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
         <= read (data resources)
        
        Terraform will perform the following actions:
        
          # data.aws_quicksight_data_set.test will be read during apply
          # (config refers to values not yet known)
         <= data "aws_quicksight_data_set" "test"  {
              ~ arn                                    = "arn:aws:quicksight:us-west-2:123456789012:dataset/tf-acc-test-1154982247615561050" -> (known after apply)
              ~ aws_account_id                         = "123456789012" -> (known after apply)
              ~ column_groups                          = [] -> (known after apply)
              ~ data_set_usage_configuration           = [
                  - {
                      - disable_use_as_direct_query_source = false
                      - disable_use_as_imported_source     = false
                    },
                ] -> (known after apply)
              ~ field_folders                          = [] -> (known after apply)
              ~ id                                     = "123456789012,tf-acc-test-1154982247615561050" -> (known after apply)
              ~ import_mode                            = "SPICE" -> (known after apply)
              ~ logical_table_map                      = [
                  - {
                      - alias                = "Group 1"
                      - data_transforms      = []
                      - logical_table_map_id = "tf-acc-test-1154982247615561050"
                      - source               = [
                          - {
                              - data_set_arn      = ""
                              - join_instruction  = []
                              - physical_table_id = "tf-acc-test-1154982247615561050"
                            },
                        ]
                    },
                ] -> (known after apply)
              ~ name                                   = "tf-acc-test-4144200014485291880" -> (known after apply)
              ~ permissions                            = [] -> (known after apply)
              ~ physical_table_map                     = [
                  - {
                      - custom_sql            = []
                      - physical_table_map_id = "tf-acc-test-1154982247615561050"
                      - relational_table      = []
                      - s3_source             = [
                          - {
                              - data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-1154982247615561050"
                              - input_columns   = [
                                  - {
                                      - name = "Column1"
                                      - type = "STRING"
                                    },
                                ]
                              - upload_settings = [
                                  - {
                                      - contains_header = true
                                      - delimiter       = ""
                                      - format          = "JSON"
                                      - start_from_row  = 0
                                      - text_qualifier  = "DOUBLE_QUOTE"
                                    },
                                ]
                            },
                        ]
                    },
                ] -> (known after apply)
              ~ row_level_permission_data_set          = [] -> (known after apply)
              ~ row_level_permission_tag_configuration = [] -> (known after apply)
              ~ tags                                   = {} -> (known after apply)
              ~ tags_all                               = {} -> (known after apply)
                # (1 unchanged attribute hidden)
            }
        
          # aws_quicksight_data_set.test will be updated in-place
          ~ resource "aws_quicksight_data_set" "test" {
                id             = "123456789012,tf-acc-test-1154982247615561050"
                name           = "tf-acc-test-4144200014485291880"
                # (5 unchanged attributes hidden)
        
        
        
              + physical_table_map {
                  + physical_table_map_id = "tf-acc-test-1154982247615561050"
        
                  + s3_source {
                      + data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-1154982247615561050"
        
                      + input_columns {
                          + name = "Column1"
                          + type = "STRING"
                        }
        
                      + upload_settings {
                          + contains_header = (known after apply)
                          + delimiter       = (known after apply)
                          + format          = "JSON"
                          + start_from_row  = (known after apply)
                          + text_qualifier  = (known after apply)
                        }
                    }
                }
              - physical_table_map {
                  - physical_table_map_id = "tf-acc-test-1154982247615561050" -> null
        
                  - s3_source {
                      - data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-1154982247615561050" -> null
        
                      - input_columns {
                          - name = "Column1" -> null
                          - type = "STRING" -> null
                        }
        
                      - upload_settings {
                          - contains_header = true -> null
                          - format          = "JSON" -> null
                          - start_from_row  = 0 -> null
                          - text_qualifier  = "DOUBLE_QUOTE" -> null
                        }
                    }
                }
                # (2 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- PASS: TestAccQuickSightFolder_basic (20.86s)
=== CONT  TestAccQuickSightGroup_basic
--- FAIL: TestAccQuickSightDataSetDataSource_basic (22.99s)
=== CONT  TestAccQuickSightUser_basic
--- PASS: TestAccQuickSightGroup_basic (29.76s)
=== CONT  TestAccQuickSightGroupMembership_basic
--- PASS: TestAccQuickSightUser_basic (29.92s)
=== CONT  TestAccQuickSightDataSource_basic
--- PASS: TestAccQuickSightGroupMembership_basic (22.63s)
=== CONT  TestAccQuickSightDataSource_tags
--- PASS: TestAccQuickSightDataSource_tags (64.02s)
=== CONT  TestAccQuickSightDataSet_tags
    data_set_test.go:350: Step 1/4 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_quicksight_data_set.test will be updated in-place
          ~ resource "aws_quicksight_data_set" "test" {
                id             = "123456789012,tf-acc-test-8397989891034038904"
                name           = "tf-acc-test-3203837512626628799"
                tags           = {
                    "key1" = "value1"
                }
                # (5 unchanged attributes hidden)
        
        
        
              + physical_table_map {
                  + physical_table_map_id = "tf-acc-test-8397989891034038904"
        
                  + s3_source {
                      + data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-8397989891034038904"
        
                      + input_columns {
                          + name = "Column1"
                          + type = "STRING"
                        }
        
                      + upload_settings {
                          + contains_header = (known after apply)
                          + delimiter       = (known after apply)
                          + format          = "JSON"
                          + start_from_row  = (known after apply)
                          + text_qualifier  = (known after apply)
                        }
                    }
                }
              - physical_table_map {
                  - physical_table_map_id = "tf-acc-test-8397989891034038904" -> null
        
                  - s3_source {
                      - data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-8397989891034038904" -> null
        
                      - input_columns {
                          - name = "Column1" -> null
                          - type = "STRING" -> null
                        }
        
                      - upload_settings {
                          - contains_header = true -> null
                          - format          = "JSON" -> null
                          - start_from_row  = 0 -> null
                          - text_qualifier  = "DOUBLE_QUOTE" -> null
                        }
                    }
                }
                # (2 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccQuickSightDataSet_tags (22.22s)
=== CONT  TestAccQuickSightFolder_tags
--- PASS: TestAccQuickSightFolder_tags (46.42s)
=== CONT  TestAccQuickSightDataSet_basic
    data_set_test.go:27: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        Terraform used the selected providers to generate the following execution
        plan. Resource actions are indicated with the following symbols:
          ~ update in-place
        
        Terraform will perform the following actions:
        
          # aws_quicksight_data_set.test will be updated in-place
          ~ resource "aws_quicksight_data_set" "test" {
                id             = "123456789012,tf-acc-test-1141470178734423091"
                name           = "tf-acc-test-1179854325274634917"
                # (5 unchanged attributes hidden)
        
        
        
              + physical_table_map {
                  + physical_table_map_id = "tf-acc-test-1141470178734423091"
        
                  + s3_source {
                      + data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-1141470178734423091"
        
                      + input_columns {
                          + name = "Column1"
                          + type = "STRING"
                        }
        
                      + upload_settings {
                          + contains_header = (known after apply)
                          + delimiter       = (known after apply)
                          + format          = "JSON"
                          + start_from_row  = (known after apply)
                          + text_qualifier  = (known after apply)
                        }
                    }
                }
              - physical_table_map {
                  - physical_table_map_id = "tf-acc-test-1141470178734423091" -> null
        
                  - s3_source {
                      - data_source_arn = "arn:aws:quicksight:us-west-2:123456789012:datasource/tf-acc-test-1141470178734423091" -> null
        
                      - input_columns {
                          - name = "Column1" -> null
                          - type = "STRING" -> null
                        }
        
                      - upload_settings {
                          - contains_header = true -> null
                          - format          = "JSON" -> null
                          - start_from_row  = 0 -> null
                          - text_qualifier  = "DOUBLE_QUOTE" -> null
                        }
                    }
                }
                # (2 unchanged blocks hidden)
            }
        
        Plan: 0 to add, 1 to change, 0 to destroy.
--- FAIL: TestAccQuickSightDataSet_basic (22.20s)
=== CONT  TestAccQuickSightDataSource_basic
    testing_new.go:82: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting S3 Bucket (tf-acc-test-8197198122599242408) Ownership Controls: OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.
        	status code: 409, request id: MGNV27371RZN4GB8, host id: XtuErkWRxn/BBOR3DMvL3ox4zGThG20aKUZyUjU8wa/B5Wz73Sn+5kyLj/uPz4UwPymhM7nkBGQXd8ocM9g0vw==
        
--- FAIL: TestAccQuickSightDataSource_basic (3472.82s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/quicksight	3531.595s
FAIL
make: *** [testacc] Error 1

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This functionality has been released in v4.62.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!

@github-actions
Copy link

github-actions bot commented May 9, 2023

I'm going to lock this pull request 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 related to this change, 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 May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generators Relates to code generators. service/qldb Issues and PRs that pertain to the qldb service. service/quicksight Issues and PRs that pertain to the quicksight service. size/L Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant