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

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

  partitionCount?: number | core.NumberOut;

  spreadLevel?: string | core.StringOut;

  strategy: string | core.StringOut;

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

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

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

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

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

  @core.attr(Number, { computed: true })
  public partitionCount?: number | core.NumberOut;

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

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

  @core.attr(String)
  public strategy!: 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?: PlacementGroupArgs) {
    super(name, "aws_placement_group", args);
  }

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