Coding_ninja
Coding_ninja

Reputation: 131

In terraform if I want to get the name of an IAM role what shall I use, var.name or var.id?

I don't want the complete ARN of my IAM role. I just want the name of it. Should I use: var.name or var.id?

Thanks in advance.

Upvotes: 0

Views: 305

Answers (1)

Paolo
Paolo

Reputation: 26074

Both are identical, so you can use either. From the terraform docs:

id - Name of the role.

name - Name of the role

Upvotes: 2

Related Questions