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

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

export class RegistryPolicy extends core.Resource<RegistryPolicyArgs> {
  @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;

  constructor(name: string, args?: RegistryPolicyArgs) {
    super(name, "aws_ecr_registry_policy", args);
  }

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