mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-08 11:41:05 +00:00
cefb6c6566
Add `google_iam_role` data source to be able to fetch and query for GCP IAM roles permissions.
1.0 KiB
1.0 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_iam_role | docs-google-datasource-iam-role | Get information about a Google IAM Role. |
google_iam_role
Use this data source to get information about a Google IAM Role.
data "google_iam_role" "roleinfo" {
name = "roles/compute.viewer"
}
output "the_role_permissions" {
value = "${data.google_iam_role.roleinfo.included_permissions}"
}
Argument Reference
The following arguments are supported:
name
(Required) - The name of the Role to lookup in the formroles/{ROLE_NAME}
,organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}
orprojects/{PROJECT_ID}/roles/{ROLE_NAME}
Attributes Reference
The following attributes are exported:
title
- is a friendly title for the role, such as "Role Viewer"included_permissions
- specifies the list of one or more permissions to include in the custom role, such as -iam.roles.get
stage
- indicates the stage of a role in the launch lifecycle, such asGA
,BETA
orALPHA
.