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

export interface RolePolicyAttachmentArgs extends core.ResourceArgs {
  policyArn: string | core.StringOut;

  role: string | core.StringOut;
}

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

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

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

  constructor(name: string, args?: RolePolicyAttachmentArgs) {
    super(name, "aws_iam_role_policy_attachment", args);
  }

  public override getNamespace(): string {
    return "aws_iam";
  }
}
