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

export interface BucketPolicyArgs extends core.ResourceArgs {
  bucket: string | core.StringOut;

  policy: string | core.StringOut;
}

export class BucketPolicy extends core.Resource<BucketPolicyArgs> {
  @core.attr(String)
  public bucket!: string | core.StringOut;

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

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

  constructor(name: string, args?: BucketPolicyArgs) {
    super(name, "aws_s3control_bucket_policy", args);
  }

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