hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io
Other
43.14k stars 9.58k forks source link

Lakeformation Permissions: Too many expression blocks #32493

Closed aws-coutl closed 1 year ago

aws-coutl commented 1 year ago

Terraform Version

Terraform v1.1.8

Terraform Configuration Files

resource "aws_lakeformation_permissions" "default_datalake" {
  principal   = 123456789010
  permissions_with_grant_option = ["DESCRIBE"]
  permissions = ["DESCRIBE"]
  lf_tag_policy {
    expression {
      key    = "Team1"
      values = ["Sales1"]
    }
    expression {
      key    = "Team2"
      values = ["Sales2"]
    }
    expression {
      key    = "Team3"
      values = ["Sales3"]
    }
    expression {
      key    = "Team4"
      values = ["Sales4"]
    }
    expression {
      key    = "Team5"
      values = ["Sales5"]
    }
    expression {
      key    = "Team6"
      values = ["Sales6"]
    }
  }
}

Debug Output

Error: Too many expression blocks on datafabric.tf line 228, in resource "aws_lakeformation_permissions" "default_datalake": 228: content{ No more than 5 "expression" blocks are allowed

Expected Behavior

the max limit on the tag expressions is 50, that should be the allowable amount here as well.

Actual Behavior

terraform error when more than 5 were specified

Steps to Reproduce

terraform plan terraform apply

Additional Context

No response

References

No response

github-actions[bot] commented 1 year 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.