-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for service-linked roles #921
Comments
Hi, Any update on this? |
Given the very different interface for resource "aws_iam_service_linked_role" "example" {
aws_service_name = "elasticbeanstalk.amazonaws.com"
}
resource "aws_iam_role_policy" "example" {
name = "example"
role = "${aws_iam_service_linked_role.example.name}"
policy = ...
}
output "role_arn" {
value = "${aws_iam_service_linked_role.example.arn}"
} The Terraform team at HashiCorp is not currently working on this particular issue. It's likely that we'll get to it at some point since it's a good general UX improvement for using a lot of AWS services -- how to write working assume role policies is a very common question! However, if someone else has the time and motivation to work on this sooner we'd be happy to review a PR for it. |
It should be noted that service-linked roles are automatically created. Also, in at least some cases (certainly, for |
Cloudwatch events are affected as well: |
I just ran into this issue trying to setup a new ecs service. I cannot assign a regular role to a new ecs service anymore, it requires a service linked role. |
+1 to this, would be something really useful. |
The initial |
This has been released in version 1.15.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
AWS recently introduced "service-linked roles" - a more secure way of delegating permissions to other AWS services. Trust policy of such roles cannot be modified and only the linked service can assume such role.
Use Case
These roles are especially useful in AWS accounts where "powerful" services like CloudFormation, Elastic Beanstalk, etc. are used, but IAM admin wants to reduce chances of users/instances assuming traditional service roles.
Implementation
I'm not sure whether this an enhancement to existing
aws_iam_role
resource or best be treated as a new resource. While output of the API is the same Role object, API input parameters are different. It might be more straightforward for end users to create/import and configure this as a separate resource, especially since it cannot be attached to instance profile or assumed by principals other than AWS service.References
The text was updated successfully, but these errors were encountered: