-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
lakeformation: Fix various bugs including SELECT permission issues #20108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions to the docs to enhance the flow when reading through; not essential so feel free to discard!
Co-authored-by: Mary Elizabeth <mary.cutrali@gmail.com>
Co-authored-by: Mary Elizabeth <mary.cutrali@gmail.com>
Co-authored-by: Mary Elizabeth <mary.cutrali@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLakeFormation_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLakeFormation_serial -timeout 180m
=== RUN TestAccAWSLakeFormation_serial
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/basic
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/dataSource
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/disappears
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/withoutCatalogId
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/disappears
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/database
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/databaseIAMAllowed
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/databaseMultiple
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/dataLocation
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/database
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/dataLocation
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/table
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/tableWithColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/multipleRoles
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/selectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/selectPlus
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectPlus
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/implicit
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardNoSelect
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/iamAllowed
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/implicit
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardExcludedColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectPlus
--- PASS: TestAccAWSLakeFormation_serial (937.37s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings (47.04s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/basic (12.18s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/dataSource (12.18s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/disappears (11.32s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/withoutCatalogId (11.36s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic (242.74s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/disappears (86.25s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/basic (33.59s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/database (24.93s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/databaseIAMAllowed (44.04s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/databaseMultiple (24.12s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/dataLocation (29.81s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource (140.78s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/basic (23.75s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/database (30.81s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/dataLocation (27.30s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/table (31.73s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/tableWithColumns (27.19s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable (334.87s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/multipleRoles (103.87s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/selectOnly (26.45s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/selectPlus (26.98s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectOnly (26.09s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectPlus (26.30s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/basic (28.35s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/implicit (26.36s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardNoSelect (23.25s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/iamAllowed (47.23s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns (171.95s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/basic (65.78s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/implicit (25.62s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardExcludedColumns (27.78s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectOnly (26.76s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectPlus (26.00s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 941.355s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSLakeFormation_serial'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSLakeFormation_serial -timeout 180m
=== RUN TestAccAWSLakeFormation_serial
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/basic
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/dataSource
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/disappears
=== RUN TestAccAWSLakeFormation_serial/DataLakeSettings/withoutCatalogId
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/database
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/databaseIAMAllowed
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/databaseMultiple
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/dataLocation
=== RUN TestAccAWSLakeFormation_serial/PermissionsBasic/disappears
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/dataLocation
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/table
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/tableWithColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsDataSource/database
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/implicit
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/selectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/selectPlus
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectPlus
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/iamAllowed
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/multipleRoles
=== RUN TestAccAWSLakeFormation_serial/PermissionsTable/wildcardNoSelect
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/basic
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/implicit
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardExcludedColumns
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectOnly
=== RUN TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectPlus
--- PASS: TestAccAWSLakeFormation_serial (878.63s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings (64.18s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/basic (17.19s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/dataSource (15.97s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/disappears (15.70s)
--- PASS: TestAccAWSLakeFormation_serial/DataLakeSettings/withoutCatalogId (15.32s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic (245.12s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/basic (25.42s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/database (25.42s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/databaseIAMAllowed (47.88s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/databaseMultiple (30.63s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/dataLocation (30.40s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsBasic/disappears (85.37s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource (136.04s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/dataLocation (30.17s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/table (28.96s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/tableWithColumns (24.16s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/basic (24.89s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsDataSource/database (27.86s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable (255.33s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/implicit (26.19s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/selectOnly (25.91s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/selectPlus (25.47s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectOnly (25.25s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardSelectPlus (25.32s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/basic (27.15s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/iamAllowed (49.50s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/multipleRoles (26.26s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTable/wildcardNoSelect (24.28s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns (177.97s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/basic (70.54s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/implicit (30.45s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardExcludedColumns (25.77s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectOnly (25.61s)
--- PASS: TestAccAWSLakeFormation_serial/PermissionsTableWithColumns/wildcardSelectPlus (25.59s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 881.703s
This functionality has been released in v3.49.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! |
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. |
Community Note
Closes #20047
Closes #20048
Relates #19817
Problems Fixed
SELECT with wildcard
SELECT
permission pertains can be different than other permissions.SELECT
on atable_with_columns
wherewildcard = true
is equivalent toSELECT
on atable
. If you input one or the other, you may get a different version back. The AWS provider did not previously handle both possibilities.SELECT
on atable_with_columns
wherewildcard = true
andname = "ALL_TABLES"
is equivalent toSELECT
on atable
withwildcard = true
. The AWS provider did not previously handle both possibilities.IAM_ALLOWED_PRINCIPALS
and individual permissions. HavingIAM_ALLOWED_PRINCIPALS
in addition to individual permissions changes the permissions.SELECT
on a column becomesSELECT
on wildcard, which the AWS provider did not handle correctly when refreshing state.IAM_ALLOWED_PRINCIPALS
is not compatible with individual permissions. These changes will allow the provider to error more gracefully in that situation but not overcome the inherent incompatibility.Output from acceptance testing (
us-west-2
):