import * as core from "@terrascript/core"; export interface NetworkConfigurationArgs extends core.SchemaArgs { assignPublicIp?: boolean | core.BooleanOut; securityGroups?: core.Array | core.ArrayOut; subnets: core.Array | core.ArrayOut; } export class NetworkConfiguration extends core.Schema { @core.attr(Boolean) public assignPublicIp?: boolean | core.BooleanOut; @core.attr(String, { kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public subnets!: core.Array | core.ArrayOut; } export interface CapacityProviderStrategyArgs extends core.SchemaArgs { base?: number | core.NumberOut; capacityProvider: string | core.StringOut; weight: number | core.NumberOut; } export class CapacityProviderStrategy extends core.Schema { @core.attr(Number) public base?: number | core.NumberOut; @core.attr(String) public capacityProvider!: string | core.StringOut; @core.attr(Number) public weight!: number | core.NumberOut; } export interface ServiceRegistriesArgs extends core.SchemaArgs { containerName?: string | core.StringOut; containerPort?: number | core.NumberOut; port?: number | core.NumberOut; registryArn: string | core.StringOut; } export class ServiceRegistries extends core.Schema { @core.attr(String) public containerName?: string | core.StringOut; @core.attr(Number) public containerPort?: number | core.NumberOut; @core.attr(Number) public port?: number | core.NumberOut; @core.attr(String) public registryArn!: string | core.StringOut; } export interface LoadBalancerArgs extends core.SchemaArgs { containerName: string | core.StringOut; containerPort?: number | core.NumberOut; loadBalancerName?: string | core.StringOut; targetGroupArn?: string | core.StringOut; } export class LoadBalancer extends core.Schema { @core.attr(String) public containerName!: string | core.StringOut; @core.attr(Number) public containerPort?: number | core.NumberOut; @core.attr(String) public loadBalancerName?: string | core.StringOut; @core.attr(String) public targetGroupArn?: string | core.StringOut; } export interface ScaleArgs extends core.SchemaArgs { unit?: string | core.StringOut; value?: number | core.NumberOut; } export class Scale extends core.Schema { @core.attr(String) public unit?: string | core.StringOut; @core.attr(Number) public value?: number | core.NumberOut; } export interface TaskSetArgs extends core.ResourceArgs { /** * (Optional) The capacity provider strategy to use for the service. Can be one or more. [Defined belo * w](#capacity_provider_strategy). */ capacityProviderStrategy?: | core.Array | core.ArrayOut; /** * (Required) The short name or ARN of the cluster that hosts the service to create the task set in. */ cluster: string | core.StringOut; /** * (Optional) The external ID associated with the task set. */ externalId?: string | core.StringOut; /** * (Optional) Whether to allow deleting the task set without waiting for scaling down to 0. You can for * ce a task set to delete even if it's in the process of scaling a resource. Normally, Terraform drain * s all the tasks before deleting the task set. This bypasses that behavior and potentially leaves res * ources dangling. */ forceDelete?: boolean | core.BooleanOut; /** * (Optional) The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and * EXTERNAL`. Defaults to `EC2`. */ launchType?: string | core.StringOut; /** * (Optional) Details on load balancers that are used with a task set. [Detailed below](#load_balancer) * . */ loadBalancer?: core.Array | core.ArrayOut; /** * (Optional) The network configuration for the service. This parameter is required for task definition * s that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not s * upported for other network modes. [Detailed below](#network_configuration). */ networkConfiguration?: NetworkConfiguration; /** * (Optional) The platform version on which to run your service. Only applicable for `launch_type` set * to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in * the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versi * ons.html). */ platformVersion?: string | core.StringOut; /** * (Optional) A floating-point percentage of the desired number of tasks to place and keep running in t * he task set. [Detailed below](#scale). */ scale?: Scale; /** * (Required) The short name or ARN of the ECS service. */ service: string | core.StringOut; /** * (Optional) The service discovery registries for the service. The maximum number of `service_registri * es` blocks is `1`. [Detailed below](#service_registries). */ serviceRegistries?: ServiceRegistries; /** * (Optional) A map of tags to assign to the file system. If configured with a provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags * configuration-block) present, tags with matching keys will overwrite those defined at the provider- * level. If you have set `copy_tags_to_backups` to true, and you specify one or more tags, no existing * file system tags are copied from the file system to the backup. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Required) The family and revision (`family:revision`) or full ARN of the task definition that you w * ant to run in your service. */ taskDefinition: string | core.StringOut; /** * (Optional) Whether `terraform` should wait until the task set has reached `STEADY_STATE`. */ waitUntilStable?: boolean | core.BooleanOut; /** * (Optional) Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (o * r `µs`), `ms`, `s`, `m`, and `h`. Default `10m`. */ waitUntilStableTimeout?: string | core.StringOut; } export class TaskSet extends core.Resource { /** * The Amazon Resource Name (ARN) that identifies the task set. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) The capacity provider strategy to use for the service. Can be one or more. [Defined belo * w](#capacity_provider_strategy). */ @core.attr(CapacityProviderStrategy, { kind: "array" }) public capacityProviderStrategy?: | core.Array | core.ArrayOut; /** * (Required) The short name or ARN of the cluster that hosts the service to create the task set in. */ @core.attr(String) public cluster!: string | core.StringOut; /** * (Optional) The external ID associated with the task set. */ @core.attr(String, { computed: true }) public externalId?: string | core.StringOut; /** * (Optional) Whether to allow deleting the task set without waiting for scaling down to 0. You can for * ce a task set to delete even if it's in the process of scaling a resource. Normally, Terraform drain * s all the tasks before deleting the task set. This bypasses that behavior and potentially leaves res * ources dangling. */ @core.attr(Boolean) public forceDelete?: boolean | core.BooleanOut; /** * The `task_set_id`, `service` and `cluster` separated by commas (`,`). */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and * EXTERNAL`. Defaults to `EC2`. */ @core.attr(String, { computed: true }) public launchType?: string | core.StringOut; /** * (Optional) Details on load balancers that are used with a task set. [Detailed below](#load_balancer) * . */ @core.attr(LoadBalancer, { kind: "array" }) public loadBalancer?: core.Array | core.ArrayOut; /** * (Optional) The network configuration for the service. This parameter is required for task definition * s that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not s * upported for other network modes. [Detailed below](#network_configuration). */ @core.attr(NetworkConfiguration) public networkConfiguration?: NetworkConfiguration; /** * (Optional) The platform version on which to run your service. Only applicable for `launch_type` set * to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in * the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versi * ons.html). */ @core.attr(String, { computed: true }) public platformVersion?: string | core.StringOut; /** * (Optional) A floating-point percentage of the desired number of tasks to place and keep running in t * he task set. [Detailed below](#scale). */ @core.attr(Scale, { computed: true }) public scale?: Scale; /** * (Required) The short name or ARN of the ECS service. */ @core.attr(String) public service!: string | core.StringOut; /** * (Optional) The service discovery registries for the service. The maximum number of `service_registri * es` blocks is `1`. [Detailed below](#service_registries). */ @core.attr(ServiceRegistries) public serviceRegistries?: ServiceRegistries; /** * The stability status. This indicates whether the task set has reached a steady state. */ @core.attr(String, { computed: true }) public stabilityStatus!: string | core.StringOut; /** * The status of the task set. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) A map of tags to assign to the file system. If configured with a provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags * configuration-block) present, tags with matching keys will overwrite those defined at the provider- * level. If you have set `copy_tags_to_backups` to true, and you specify one or more tags, no existing * file system tags are copied from the file system to the backup. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Required) The family and revision (`family:revision`) or full ARN of the task definition that you w * ant to run in your service. */ @core.attr(String) public taskDefinition!: string | core.StringOut; /** * The ID of the task set. */ @core.attr(String, { computed: true }) public taskSetId!: string | core.StringOut; /** * (Optional) Whether `terraform` should wait until the task set has reached `STEADY_STATE`. */ @core.attr(Boolean) public waitUntilStable?: boolean | core.BooleanOut; /** * (Optional) Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (o * r `µs`), `ms`, `s`, `m`, and `h`. Default `10m`. */ @core.attr(String) public waitUntilStableTimeout?: string | core.StringOut; constructor(name: string, args?: TaskSetArgs) { super(name, "aws_ecs_task_set", args); } public override getNamespace(): string { return "aws_ecs"; } }