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

export interface RepositoryPolicyArgs extends core.ResourceArgs {
  policy: string | core.StringOut;

  repositoryName: string | core.StringOut;
}

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

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

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

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

  constructor(name: string, args?: RepositoryPolicyArgs) {
    super(name, "aws_ecrpublic_repository_policy", args);
  }

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