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

export interface VolumeAttachmentArgs extends core.ResourceArgs {
  deviceName: string | core.StringOut;

  forceDetach?: boolean | core.BooleanOut;

  instanceId: string | core.StringOut;

  skipDestroy?: boolean | core.BooleanOut;

  stopInstanceBeforeDetaching?: boolean | core.BooleanOut;

  volumeId: string | core.StringOut;
}

export class VolumeAttachment extends core.Resource<VolumeAttachmentArgs> {
  @core.attr(String)
  public deviceName!: string | core.StringOut;

  @core.attr(Boolean)
  public forceDetach?: boolean | core.BooleanOut;

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

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

  @core.attr(Boolean)
  public skipDestroy?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public stopInstanceBeforeDetaching?: boolean | core.BooleanOut;

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

  constructor(name: string, args?: VolumeAttachmentArgs) {
    super(name, "aws_volume_attachment", args);
  }

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