import * as core from "@terrascript/core";

export interface RolePolicyArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  policy: string | core.StringOut;

  role: string | core.StringOut;
}

export class RolePolicy extends core.Resource<RolePolicyArgs> {
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String, { computed: true })
  public name?: string | core.StringOut;

  @core.attr(String)
  public namePrefix?: string | core.StringOut;

  @core.attr(String)
  public policy!: string | core.StringOut;

  @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";
  }
}
