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

export interface GroupPolicyArgs extends core.ResourceArgs {
  group: string | core.StringOut;

  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  policy: string | core.StringOut;
}

export class GroupPolicy extends core.Resource<GroupPolicyArgs> {
  @core.attr(String)
  public group!: string | core.StringOut;

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

  constructor(name: string, args?: GroupPolicyArgs) {
    super(name, "aws_iam_group_policy", args);
  }

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