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

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

  keyNamePrefix?: string | core.StringOut;

  publicKey: string | core.StringOut;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<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 fingerprint!: string | core.StringOut;

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

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

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

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

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

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

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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