import * as core from "@terrascript/core"; export interface InlinePolicyArgs extends core.SchemaArgs { name?: string | core.StringOut; policy?: string | core.StringOut; } export class InlinePolicy extends core.Schema { @core.attr(String) public name?: string | core.StringOut; @core.attr(String) public policy?: string | core.StringOut; } export interface RoleArgs extends core.ResourceArgs { /** * (Required) Policy that grants an entity permission to assume the role. */ assumeRolePolicy: string | core.StringOut; /** * (Optional) Description of the role. */ description?: string | core.StringOut; /** * (Optional) Whether to force detaching any policies the role has before destroying it. Defaults to `f * alse`. */ forceDetachPolicies?: boolean | core.BooleanOut; /** * (Optional) Configuration block defining an exclusive set of IAM inline policies associated with the * IAM role. See below. If no blocks are configured, Terraform will not manage any inline policies in t * his resource. Configuring one empty block (i.e., `inline_policy {}`) will cause Terraform to remove * _all_ inline policies added out of band on `apply`. */ inlinePolicy?: core.Array | core.ArrayOut; /** * (Optional) Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is * not configured, Terraform will ignore policy attachments to this resource. When configured, Terrafor * m will align the role's managed policy attachments with this set by attaching or detaching managed p * olicies. Configuring an empty set (i.e., `managed_policy_arns = []`) will cause Terraform to remove * _all_ managed policy attachments. */ managedPolicyArns?: core.Array | core.ArrayOut; /** * (Optional) Maximum session duration (in seconds) that you want to set for the specified role. If you * do not specify a value for this setting, the default maximum of one hour is applied. This setting c * an have a value from 1 hour to 12 hours. */ maxSessionDuration?: number | core.NumberOut; /** * (Optional, Forces new resource) Friendly name of the role. If omitted, Terraform will assign a rando * m, unique name. See [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identif * iers.html) for more information. */ name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique friendly name beginning with the specified prefix. * Conflicts with `name`. */ namePrefix?: string | core.StringOut; /** * (Optional) Path to the role. See [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/ * Using_Identifiers.html) for more information. */ path?: string | core.StringOut; /** * (Optional) ARN of the policy that is used to set the permissions boundary for the role. */ permissionsBoundary?: string | core.StringOut; /** * Key-value mapping of tags for the IAM role. If configured with a provider [`default_tags` configurat * ion block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurat * ion-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class Role extends core.Resource { /** * Amazon Resource Name (ARN) specifying the role. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) Policy that grants an entity permission to assume the role. */ @core.attr(String) public assumeRolePolicy!: string | core.StringOut; /** * Creation date of the IAM role. */ @core.attr(String, { computed: true }) public createDate!: string | core.StringOut; /** * (Optional) Description of the role. */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional) Whether to force detaching any policies the role has before destroying it. Defaults to `f * alse`. */ @core.attr(Boolean) public forceDetachPolicies?: boolean | core.BooleanOut; /** * Name of the role. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Configuration block defining an exclusive set of IAM inline policies associated with the * IAM role. See below. If no blocks are configured, Terraform will not manage any inline policies in t * his resource. Configuring one empty block (i.e., `inline_policy {}`) will cause Terraform to remove * _all_ inline policies added out of band on `apply`. */ @core.attr(InlinePolicy, { computed: true, kind: "array" }) public inlinePolicy?: core.Array | core.ArrayOut; /** * (Optional) Set of exclusive IAM managed policy ARNs to attach to the IAM role. If this attribute is * not configured, Terraform will ignore policy attachments to this resource. When configured, Terrafor * m will align the role's managed policy attachments with this set by attaching or detaching managed p * olicies. Configuring an empty set (i.e., `managed_policy_arns = []`) will cause Terraform to remove * _all_ managed policy attachments. */ @core.attr(String, { computed: true, kind: "array" }) public managedPolicyArns?: core.Array | core.ArrayOut; /** * (Optional) Maximum session duration (in seconds) that you want to set for the specified role. If you * do not specify a value for this setting, the default maximum of one hour is applied. This setting c * an have a value from 1 hour to 12 hours. */ @core.attr(Number) public maxSessionDuration?: number | core.NumberOut; /** * (Optional, Forces new resource) Friendly name of the role. If omitted, Terraform will assign a rando * m, unique name. See [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identif * iers.html) for more information. */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional, Forces new resource) Creates a unique friendly name beginning with the specified prefix. * Conflicts with `name`. */ @core.attr(String, { computed: true }) public namePrefix?: string | core.StringOut; /** * (Optional) Path to the role. See [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/ * Using_Identifiers.html) for more information. */ @core.attr(String) public path?: string | core.StringOut; /** * (Optional) ARN of the policy that is used to set the permissions boundary for the role. */ @core.attr(String) public permissionsBoundary?: string | core.StringOut; /** * Key-value mapping of tags for the IAM role. If configured with a provider [`default_tags` configurat * ion block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurat * ion-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * Stable and unique string identifying the role. */ @core.attr(String, { computed: true }) public uniqueId!: string | core.StringOut; constructor(name: string, args?: RoleArgs) { super(name, "aws_iam_role", args); } public override getNamespace(): string { return "aws_iam"; } }