Skip to main content
Providers

IamRole

A resource of the AWS provider, version 0.3.0, in its IAM group. Import it with:

import IamRole from "aws/iam"

Example

resource IamRole example {
    name               = "example-value"
    description        = "example-value"
    assumeRolePolicy   = "example-value"
    path               = "example-value"
    maxSessionDuration = 3.14
    managedPolicyArns  = "..."
    inlinePolicies     = "..."
    tags               = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoName of the IAM role
descriptionstring—NoDescription of the role
assumeRolePolicystring—NoThe trust policy that grants an entity permission to assume the role (JSON)
pathstring—NoPath for the role (default: /)
maxSessionDurationnumber—NoMaximum session duration in seconds (3600-43200)
managedPolicyArnsany[]—NoARNs of AWS managed policies to attach
inlinePoliciesobject—NoInline policies to embed in the role (name -> policy JSON)
tagsobject—NoTags to apply to the role

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
roleIdstringNoThe stable and unique ID for the role
arnstringYesThe Amazon Resource Name (ARN) of the role
createDatestringNoThe date and time when the role was created

On this page