Closed dacreify closed 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
This functionality has been released in v5.6.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 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.
Terraform Core Version
1.3.7
AWS Provider Version
4.67.0
Affected Resource(s)
Expected Behavior
When tag values are applied at a table or column level, other tag values inherited from the database or table level should be ignored when reading back state.
For example, consider this scenario:
my_table
exists in databasemy_database
foo=bar
is applied tomy_database
and thus inherited bymy_table
bam=baz
is also applied directly tomy_table
The
GetResourceLFTags
API call to Lake Formation will have bothfoo=bar
andbam=baz
in theLFTagsOnTable
structure formy_table
. However onlybam=baz
is applied directly to the table andfoo=bar
should be ignored for purposes of determining the state of theaws_lakeformation_resource_lf_tags
resource with thetable {database_name = "my_database", name = "my_table"}
block.Actual Behavior
Terraform perceives state drift on every refresh because it sees the inherited tags and (correctly) identifies that they are not part of the corresponding table/column-level
aws_lakeformation_resource_lf_tags
resource. All tags of tables and columns with inherited tag values are destroyed and recreated by each plan.Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Apply and plan again to see phantom state drift
Debug Output
No response
Panic Output
No response
Important Factoids
The response from the
GetResourceLFTags
Lake Formation API call includes the full inheritance hierarchy for a given table/column viaLFTagOnDatabase
,LFTagsOnTable
, andLFTagsOnColumns
. By reducing over these it should be possible to resolve which tag values are being applied at the table/column level and thus resolve accurate state.References
No response
Would you like to implement a fix?
None