import * as core from "@terrascript/core"; export interface RolePolicyArgs extends core.ResourceArgs { /** * (Optional) The name of the role policy. If omitted, Terraform will */ name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified */ namePrefix?: string | core.StringOut; /** * (Required) The inline policy document. This is a JSON formatted string. For more information about b * uilding IAM policy documents with Terraform, see the [AWS IAM Policy Document Guide](https://learn.h * ashicorp.com/terraform/aws/iam-policy) */ policy: string | core.StringOut; /** * (Required) The name of the IAM role to attach to the policy. */ role: string | core.StringOut; } export class RolePolicy extends core.Resource { /** * The role policy ID, in the form of `role_name:role_policy_name`. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The name of the role policy. If omitted, Terraform will */ @core.attr(String, { computed: true }) public name?: string | core.StringOut; /** * (Optional) Creates a unique name beginning with the specified */ @core.attr(String) public namePrefix?: string | core.StringOut; /** * (Required) The inline policy document. This is a JSON formatted string. For more information about b * uilding IAM policy documents with Terraform, see the [AWS IAM Policy Document Guide](https://learn.h * ashicorp.com/terraform/aws/iam-policy) */ @core.attr(String) public policy!: string | core.StringOut; /** * (Required) The name of the IAM role to attach to the policy. */ @core.attr(String) public role!: string | core.StringOut; constructor(name: string, args?: RolePolicyArgs) { super(name, "aws_iam_role_policy", args); } public override getNamespace(): string { return "aws_iam"; } }