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.77k stars 9.12k forks source link

Need to create the resource using terraform for AWS Lake formation -> Administration -> Administrative roles and tasks -> Database Creators #33427

Open sudipw opened 1 year ago

sudipw commented 1 year ago

Description

We are trying to create the Database creators for AWS Lake formation Administration tasks. But not able to figure out how we can do this using terraform code. Below are the screenshot for reference.

Screenshot 2023-09-12 at 7 03 16 PM

Requested Resource(s) and/or Data Source(s)

AWS Lake formation Administrative settings

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

Geartrixy commented 1 year ago

I thought it might be something like this:

resource "aws_lakeformation_data_lake_settings" "example" {
  admins = [data.aws_iam_role.admin.arn]

  create_database_default_permissions {
    permissions = ["ALL"]
    principal   = "arn:aws:iam::123456789012:role/example-role-name"
  }
}

But this throws me the following error:

Error: creating Lake Formation data lake settings: creating Lake Formation data lake settings: InvalidInputException: Create Database Default not supported for principal

hhagblom commented 1 month ago

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/put-data-lake-settings.html

The documentation above from amazon seem to suggest that the only valid value on the principal attribute is IAM_ALLOWED_PRINCIPALS which is a bit weird.