sotoon_iam_role (Data Source)
Retrieves a IAM role.
Example Usage
data "sotoon_workspace" "mycompany" {
id = "ee6f89b5-e07c-42f1-9462-05cec9cd92d8" # Workspace ID
}
# Get globally predefined workspace-admin role
data "sotoon_iam_role" "workspace_admin" {
name = "workspace-admin"
}
# Get user defined custom role
data "sotoon_iam_role" "reader" {
name = "my-user-can-read"
workspace_id = data.sotoon_workspace.mycompany.id
}
Schema
Required
name(String) Name of the role.
Optional
workspace_id(String) ID of the Workspace which role is defined in that. (Default: global roles)
Read-Only
id(String) ID of the role.rules(Attributes List) (see below for nested schema)
Nested Schema for rules
Read-Only:
actions(List of String) List of the actions which this rule is binded to that.id(String) ID of the rule.is_denial(Boolean) Defines is this rule denial or not.name(String) Name of the rule.path(String) The path which this rule applied on thatservice(String) Service which this rule defined on that.workspace_id(String) ID of the Workspace which rule is defined in that. (Default: global rules)