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

export interface PolicyAttachmentArgs extends core.ResourceArgs {
  groups?: core.Array<string> | core.ArrayOut<core.StringOut>;

  name: string | core.StringOut;

  policyArn: string | core.StringOut;

  roles?: core.Array<string> | core.ArrayOut<core.StringOut>;

  users?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class PolicyAttachment extends core.Resource<PolicyAttachmentArgs> {
  @core.attr(String, { kind: "array" })
  public groups?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

  @core.attr(String, { kind: "array" })
  public roles?: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { kind: "array" })
  public users?: core.Array<string> | core.ArrayOut<core.StringOut>;

  constructor(name: string, args?: PolicyAttachmentArgs) {
    super(name, "aws_iam_policy_attachment", args);
  }

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