hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

Lakeformation table permissions need to be alphabetically ordered - otherwise aws_lakeformation_permissions stay out of sync #19465

Closed chrisbulgaria closed 3 years ago

chrisbulgaria commented 3 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

3.42

Terraform Configuration Files


resource "aws_lakeformation_permissions" "db_perm" {
  count       = var.is_ext == false ? 1 : 0
  principal   = var.read_group
  permissions = ["SELECT","DESCRIBE" ]

  table {
    database_name       = "${var.db_name}_db"
    wildcard = true
  }
}

Expected Behavior

replanning after apply doesnt show changes

Actual Behavior

module.database["grp2"].aws_lakeformation_permissions.db_perm[0] must be replaced -/+ resource "aws_lakeformation_permissions" "db_perm" { ~ id = "466990021" -> (known after apply) ~ permissions = [ # forces replacement

Steps to Reproduce

apply above resource and plan again

YakDriver commented 3 years ago

@chrisbulgaria Thanks for raising this. A PR to fix this (#19817) is awaiting review.

github-actions[bot] commented 3 years ago

This functionality has been released in v3.46.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[bot] commented 3 years ago

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.