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

[Enhancement]: r/aws_lakeformation_resource: Add `use_service_linked_role` argument #35283

Closed jar-b closed 7 months ago

jar-b commented 8 months ago

Description

This argument currently gets set to true internally by the provider if role_arn is not provided. This becomes a problem for certain resource types (such as Redshift data shares) which require both RoleArn and UseServiceLinkedRole to be omitted.

https://github.com/hashicorp/terraform-provider-aws/blob/85b0843d0b3963876fcff0c5f55259239de8a558/internal/service/lakeformation/resource.go#L59-L63

Instead of doing this internally, expose the argument so practitioners can configure explicity. To preserve backward compatibility, the existing logic setting the value to true when role_arn is omitted should be preserved for the 5.X series. In 6.X this can be removed in favor of aligning arguments with the underlying AWS API.

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

Potential Terraform Configuration

resource "aws_lakeformation_resource" "test" {
  arn                     = "arn:aws:redshift:us-west-2:012345678901:datashare:abcd-1234/test_share"
  use_service_linked_role = false
}

References

Would you like to implement a fix?

None

github-actions[bot] commented 8 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 7 months ago

This functionality has been released in v5.33.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 6 months 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.