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

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

  repository: string | core.StringOut;
}

export class LifecyclePolicy extends core.Resource<LifecyclePolicyArgs> {
  @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?: LifecyclePolicyArgs) {
    super(name, "aws_ecr_lifecycle_policy", args);
  }

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