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

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

  repository: 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 repository!: string | core.StringOut;

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

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