Skip to content
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

Feature Request: data source for aws_iam_role #12825

Closed
iancward opened this issue Mar 17, 2017 · 3 comments
Closed

Feature Request: data source for aws_iam_role #12825

iancward opened this issue Mar 17, 2017 · 3 comments

Comments

@iancward
Copy link

Hi there,
It is currently possible to create a data source for a number of different AWS resources; however, it looks like aws_iam_role is missing. My team has a repository for all of our baseline infrastructure templates, and we put templates for applications in their own, separate, repository. This is intended to reduce risk for big changes. As such, we'd like to be able to define aws_iam_roles (e.g. for monitoring roles) in our central repository, and then have the application templates refer to it via a data definition.

Resources such as aws_db_cluster_instance require the ARN of the IAM role for monitoring, and we'd rather not have to hard-code it in these separate resources.

Terraform Version

0.9.0

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_iam_role

Terraform Configuration Files

resource "aws_iam_role" "my-awesome-iam-role" {
  name = "my-awesome-iam-role"
  assume_role_policy = "${data.aws_iam_policy_ducument.my-awesome-iam-role-assume-policy}"
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

I'd like to be able to add a data source that is a reference to a pre-existing IAM role.

Actual Behavior

I can currently not use a data source to reference a pre-existing IAM role. I have to either hard-code the ARN or use the external data feature to look up the ARN via the AWS CLI.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

+1 for the data sources feature. I'm looking at terraform for the first time in a while, and they're a welcome addition.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here?
Not that I could find.

@mathematician
Copy link
Contributor

mathematician commented Mar 30, 2017

I submitted a pull request for this: #13213

@stack72
Copy link
Contributor

stack72 commented Apr 23, 2017

Closed via #13213

@stack72 stack72 closed this as completed Apr 23, 2017
@ghost
Copy link

ghost commented Apr 13, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants