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

export interface KeyPairArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  namePrefix?: string | core.StringOut;

  pgpKey?: string | core.StringOut;

  publicKey?: string | core.StringOut;
}

export class KeyPair extends core.Resource<KeyPairArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

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

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

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

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

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

  @core.attr(String)
  public namePrefix?: string | core.StringOut;

  @core.attr(String)
  public pgpKey?: string | core.StringOut;

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

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

  constructor(name: string, args?: KeyPairArgs) {
    super(name, "aws_lightsail_key_pair", args);
  }

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