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

introspecting resource names #5805

Closed
tkellen opened this issue Mar 23, 2016 · 5 comments
Closed

introspecting resource names #5805

tkellen opened this issue Mar 23, 2016 · 5 comments

Comments

@tkellen
Copy link

tkellen commented Mar 23, 2016

Is there any way to do this?

resource "aws_iam_role" "some-role" {
  name = "${self.name}"
  path = "/"
  assume_role_policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {"AWS": "*"},
      "Effect": "Allow",
      "Sid": ""
    }
  ]
}
EOF
}
@mitchellh
Copy link
Contributor

There are other issues requesting this sort of functionality. We hope to support it one day but don't at the moment.

@tkellen
Copy link
Author

tkellen commented Dec 4, 2016

Is there another issue I might track progress on this for? Alternatively some place I could get guidance on attempting to implement this?

@mitchellh
Copy link
Contributor

There issssss I'm sorry for not finding it, but check through the "core" + "enhancement" tagged issues. It is more general and asking for more "self." access.

For implementing it: there aren't many resources other than simply reading the source. :( I don't know exactly what I'd call it but I've been thinking of making a var that can track resource metadata. Maybe its even ${self.meta.X} and the metadata should probably be available... not sure though.

@tkellen
Copy link
Author

tkellen commented Dec 11, 2016

No worries @mitchellh, I found it!

@ghost
Copy link

ghost commented Apr 18, 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 18, 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

3 participants