Viewing docs for AWS v7.28.0
published on Thursday, Apr 30, 2026 by Pulumi
published on Thursday, Apr 30, 2026 by Pulumi
Viewing docs for AWS v7.28.0
published on Thursday, Apr 30, 2026 by Pulumi
published on Thursday, Apr 30, 2026 by Pulumi
The ECS task definition data source allows access to details of a specific AWS ECS task definition.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const mongoTaskDefinition = new aws.ecs.TaskDefinition("mongo", {
family: "mongodb",
containerDefinitions: `[
{
\\"cpu\\": 128,
\\"environment\\": [{
\\"name\\": \\"SECRET\\",
\\"value\\": \\"KEY\\"
}],
\\"essential\\": true,
\\"image\\": \\"mongo:latest\\",
\\"memory\\": 128,
\\"memoryReservation\\": 64,
\\"name\\": \\"mongodb\\"
}
]
`,
});
// Simply specify the family to find the latest ACTIVE revision in that family.
const mongo = aws.ecs.getTaskDefinitionOutput({
taskDefinition: mongoTaskDefinition.family,
});
const foo = new aws.ecs.Cluster("foo", {name: "foo"});
const mongoService = new aws.ecs.Service("mongo", {
name: "mongo",
cluster: foo.id,
desiredCount: 2,
taskDefinition: mongo.apply(mongo => mongo.arn),
});
import pulumi
import pulumi_aws as aws
mongo_task_definition = aws.ecs.TaskDefinition("mongo",
family="mongodb",
container_definitions="""[
{
\"cpu\": 128,
\"environment\": [{
\"name\": \"SECRET\",
\"value\": \"KEY\"
}],
\"essential\": true,
\"image\": \"mongo:latest\",
\"memory\": 128,
\"memoryReservation\": 64,
\"name\": \"mongodb\"
}
]
""")
# Simply specify the family to find the latest ACTIVE revision in that family.
mongo = aws.ecs.get_task_definition_output(task_definition=mongo_task_definition.family)
foo = aws.ecs.Cluster("foo", name="foo")
mongo_service = aws.ecs.Service("mongo",
name="mongo",
cluster=foo.id,
desired_count=2,
task_definition=mongo.arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mongoTaskDefinition, err := ecs.NewTaskDefinition(ctx, "mongo", &ecs.TaskDefinitionArgs{
Family: pulumi.String("mongodb"),
ContainerDefinitions: pulumi.String(`[
{
\"cpu\": 128,
\"environment\": [{
\"name\": \"SECRET\",
\"value\": \"KEY\"
}],
\"essential\": true,
\"image\": \"mongo:latest\",
\"memory\": 128,
\"memoryReservation\": 64,
\"name\": \"mongodb\"
}
]
`),
})
if err != nil {
return err
}
// Simply specify the family to find the latest ACTIVE revision in that family.
mongo := ecs.LookupTaskDefinitionOutput(ctx, ecs.GetTaskDefinitionOutputArgs{
TaskDefinition: mongoTaskDefinition.Family,
}, nil)
foo, err := ecs.NewCluster(ctx, "foo", &ecs.ClusterArgs{
Name: pulumi.String("foo"),
})
if err != nil {
return err
}
_, err = ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
Name: pulumi.String("mongo"),
Cluster: foo.ID(),
DesiredCount: pulumi.Int(2),
TaskDefinition: pulumi.String(mongo.ApplyT(func(mongo ecs.GetTaskDefinitionResult) (*string, error) {
return &mongo.Arn, nil
}).(pulumi.StringPtrOutput)),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var mongoTaskDefinition = new Aws.Ecs.TaskDefinition("mongo", new()
{
Family = "mongodb",
ContainerDefinitions = @"[
{
\""cpu\"": 128,
\""environment\"": [{
\""name\"": \""SECRET\"",
\""value\"": \""KEY\""
}],
\""essential\"": true,
\""image\"": \""mongo:latest\"",
\""memory\"": 128,
\""memoryReservation\"": 64,
\""name\"": \""mongodb\""
}
]
",
});
// Simply specify the family to find the latest ACTIVE revision in that family.
var mongo = Aws.Ecs.GetTaskDefinition.Invoke(new()
{
TaskDefinition = mongoTaskDefinition.Family,
});
var foo = new Aws.Ecs.Cluster("foo", new()
{
Name = "foo",
});
var mongoService = new Aws.Ecs.Service("mongo", new()
{
Name = "mongo",
Cluster = foo.Id,
DesiredCount = 2,
TaskDefinition = mongo.Apply(getTaskDefinitionResult => getTaskDefinitionResult.Arn),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.TaskDefinition;
import com.pulumi.aws.ecs.TaskDefinitionArgs;
import com.pulumi.aws.ecs.EcsFunctions;
import com.pulumi.aws.ecs.inputs.GetTaskDefinitionArgs;
import com.pulumi.aws.ecs.Cluster;
import com.pulumi.aws.ecs.ClusterArgs;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var mongoTaskDefinition = new TaskDefinition("mongoTaskDefinition", TaskDefinitionArgs.builder()
.family("mongodb")
.containerDefinitions("""
[
{
\"cpu\": 128,
\"environment\": [{
\"name\": \"SECRET\",
\"value\": \"KEY\"
}],
\"essential\": true,
\"image\": \"mongo:latest\",
\"memory\": 128,
\"memoryReservation\": 64,
\"name\": \"mongodb\"
}
]
""")
.build());
// Simply specify the family to find the latest ACTIVE revision in that family.
final var mongo = EcsFunctions.getTaskDefinition(GetTaskDefinitionArgs.builder()
.taskDefinition(mongoTaskDefinition.family())
.build());
var foo = new Cluster("foo", ClusterArgs.builder()
.name("foo")
.build());
var mongoService = new Service("mongoService", ServiceArgs.builder()
.name("mongo")
.cluster(foo.id())
.desiredCount(2)
.taskDefinition(mongo.applyValue(_mongo -> _mongo.arn()))
.build());
}
}
resources:
foo:
type: aws:ecs:Cluster
properties:
name: foo
mongoTaskDefinition:
type: aws:ecs:TaskDefinition
name: mongo
properties:
family: mongodb
containerDefinitions: |
[
{
\"cpu\": 128,
\"environment\": [{
\"name\": \"SECRET\",
\"value\": \"KEY\"
}],
\"essential\": true,
\"image\": \"mongo:latest\",
\"memory\": 128,
\"memoryReservation\": 64,
\"name\": \"mongodb\"
}
]
mongoService:
type: aws:ecs:Service
name: mongo
properties:
name: mongo
cluster: ${foo.id}
desiredCount: 2 # Track the latest ACTIVE revision
taskDefinition: ${mongo.arn}
variables:
# Simply specify the family to find the latest ACTIVE revision in that family.
mongo:
fn::invoke:
function: aws:ecs:getTaskDefinition
arguments:
taskDefinition: ${mongoTaskDefinition.family}
Using getTaskDefinition
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTaskDefinition(args: GetTaskDefinitionArgs, opts?: InvokeOptions): Promise<GetTaskDefinitionResult>
function getTaskDefinitionOutput(args: GetTaskDefinitionOutputArgs, opts?: InvokeOptions): Output<GetTaskDefinitionResult>def get_task_definition(region: Optional[str] = None,
task_definition: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTaskDefinitionResult
def get_task_definition_output(region: pulumi.Input[Optional[str]] = None,
task_definition: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTaskDefinitionResult]func LookupTaskDefinition(ctx *Context, args *LookupTaskDefinitionArgs, opts ...InvokeOption) (*LookupTaskDefinitionResult, error)
func LookupTaskDefinitionOutput(ctx *Context, args *LookupTaskDefinitionOutputArgs, opts ...InvokeOption) LookupTaskDefinitionResultOutput> Note: This function is named LookupTaskDefinition in the Go SDK.
public static class GetTaskDefinition
{
public static Task<GetTaskDefinitionResult> InvokeAsync(GetTaskDefinitionArgs args, InvokeOptions? opts = null)
public static Output<GetTaskDefinitionResult> Invoke(GetTaskDefinitionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTaskDefinitionResult> getTaskDefinition(GetTaskDefinitionArgs args, InvokeOptions options)
public static Output<GetTaskDefinitionResult> getTaskDefinition(GetTaskDefinitionArgs args, InvokeOptions options)
fn::invoke:
function: aws:ecs/getTaskDefinition:getTaskDefinition
arguments:
# arguments dictionaryThe following arguments are supported:
- Task
Definition string - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Task
Definition string - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- task
Definition String - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- task
Definition string - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- task_
definition str - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- task
Definition String - Family for the latest ACTIVE revision, family and revision (family:revision) for a specific revision in the family, the ARN of the task definition to access to.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
getTaskDefinition Result
The following output properties are available:
- Arn string
- ARN of the task definition.
- Arn
Without stringRevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - Container
Definitions string - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- Cpu string
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - Enable
Fault boolInjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - Ephemeral
Storages List<GetTask Definition Ephemeral Storage> - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- Execution
Role stringArn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- Family string
- A unique name for your task definition. The following arguments are optional:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipc
Mode string - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - Memory string
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - Network
Mode string - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - Pid
Mode string - Process namespace to use for the containers in the task. The valid values are
hostandtask. - Placement
Constraints List<GetTask Definition Placement Constraint> - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - Proxy
Configurations List<GetTask Definition Proxy Configuration> - Configuration block for the App Mesh proxy. Detailed below.
- Region string
- Requires
Compatibilities List<string> - Set of launch types required by the task. The valid values are
EC2andFARGATE. - Revision int
- Revision of the task in a particular family.
- Runtime
Platforms List<GetTask Definition Runtime Platform> - Configuration block for runtimePlatform that containers in your task may use.
- Status string
- Status of the task definition.
- Task
Definition string - Task
Role stringArn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- Volumes
List<Get
Task Definition Volume> - Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
- Arn string
- ARN of the task definition.
- Arn
Without stringRevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - Container
Definitions string - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- Cpu string
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - Enable
Fault boolInjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - Ephemeral
Storages []GetTask Definition Ephemeral Storage - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- Execution
Role stringArn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- Family string
- A unique name for your task definition. The following arguments are optional:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipc
Mode string - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - Memory string
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - Network
Mode string - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - Pid
Mode string - Process namespace to use for the containers in the task. The valid values are
hostandtask. - Placement
Constraints []GetTask Definition Placement Constraint - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - Proxy
Configurations []GetTask Definition Proxy Configuration - Configuration block for the App Mesh proxy. Detailed below.
- Region string
- Requires
Compatibilities []string - Set of launch types required by the task. The valid values are
EC2andFARGATE. - Revision int
- Revision of the task in a particular family.
- Runtime
Platforms []GetTask Definition Runtime Platform - Configuration block for runtimePlatform that containers in your task may use.
- Status string
- Status of the task definition.
- Task
Definition string - Task
Role stringArn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- Volumes
[]Get
Task Definition Volume - Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
- arn String
- ARN of the task definition.
- arn
Without StringRevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - container
Definitions String - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- cpu String
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - enable
Fault BooleanInjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - ephemeral
Storages List<GetTask Definition Ephemeral Storage> - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- execution
Role StringArn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- family String
- A unique name for your task definition. The following arguments are optional:
- id String
- The provider-assigned unique ID for this managed resource.
- ipc
Mode String - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - memory String
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - network
Mode String - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - pid
Mode String - Process namespace to use for the containers in the task. The valid values are
hostandtask. - placement
Constraints List<GetTask Definition Placement Constraint> - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - proxy
Configurations List<GetTask Definition Proxy Configuration> - Configuration block for the App Mesh proxy. Detailed below.
- region String
- requires
Compatibilities List<String> - Set of launch types required by the task. The valid values are
EC2andFARGATE. - revision Integer
- Revision of the task in a particular family.
- runtime
Platforms List<GetTask Definition Runtime Platform> - Configuration block for runtimePlatform that containers in your task may use.
- status String
- Status of the task definition.
- task
Definition String - task
Role StringArn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- volumes
List<Get
Task Definition Volume> - Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
- arn string
- ARN of the task definition.
- arn
Without stringRevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - container
Definitions string - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- cpu string
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - enable
Fault booleanInjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - ephemeral
Storages GetTask Definition Ephemeral Storage[] - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- execution
Role stringArn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- family string
- A unique name for your task definition. The following arguments are optional:
- id string
- The provider-assigned unique ID for this managed resource.
- ipc
Mode string - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - memory string
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - network
Mode string - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - pid
Mode string - Process namespace to use for the containers in the task. The valid values are
hostandtask. - placement
Constraints GetTask Definition Placement Constraint[] - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - proxy
Configurations GetTask Definition Proxy Configuration[] - Configuration block for the App Mesh proxy. Detailed below.
- region string
- requires
Compatibilities string[] - Set of launch types required by the task. The valid values are
EC2andFARGATE. - revision number
- Revision of the task in a particular family.
- runtime
Platforms GetTask Definition Runtime Platform[] - Configuration block for runtimePlatform that containers in your task may use.
- status string
- Status of the task definition.
- task
Definition string - task
Role stringArn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- volumes
Get
Task Definition Volume[] - Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
- arn str
- ARN of the task definition.
- arn_
without_ strrevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - container_
definitions str - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- cpu str
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - enable_
fault_ boolinjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - ephemeral_
storages Sequence[GetTask Definition Ephemeral Storage] - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- execution_
role_ strarn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- family str
- A unique name for your task definition. The following arguments are optional:
- id str
- The provider-assigned unique ID for this managed resource.
- ipc_
mode str - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - memory str
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - network_
mode str - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - pid_
mode str - Process namespace to use for the containers in the task. The valid values are
hostandtask. - placement_
constraints Sequence[GetTask Definition Placement Constraint] - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - proxy_
configurations Sequence[GetTask Definition Proxy Configuration] - Configuration block for the App Mesh proxy. Detailed below.
- region str
- requires_
compatibilities Sequence[str] - Set of launch types required by the task. The valid values are
EC2andFARGATE. - revision int
- Revision of the task in a particular family.
- runtime_
platforms Sequence[GetTask Definition Runtime Platform] - Configuration block for runtimePlatform that containers in your task may use.
- status str
- Status of the task definition.
- task_
definition str - task_
role_ strarn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- volumes
Sequence[Get
Task Definition Volume] - Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
- arn String
- ARN of the task definition.
- arn
Without StringRevision - ARN of the Task Definition with the trailing
revisionremoved. This may be useful for situations where the latest task definition is always desired. If a revision isn't specified, the latest ACTIVE revision is used. See the AWS documentation for details. - container
Definitions String - A list of valid container definitions provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the Task Definition Parameters section from the official Developer Guide.
- cpu String
- Number of cpu units used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - enable
Fault BooleanInjection - Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is
false. - ephemeral
Storages List<Property Map> - The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
- execution
Role StringArn - ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
- family String
- A unique name for your task definition. The following arguments are optional:
- id String
- The provider-assigned unique ID for this managed resource.
- ipc
Mode String - IPC resource namespace to be used for the containers in the task The valid values are
host,task, andnone. - memory String
- Amount (in MiB) of memory used by the task. If the
requiresCompatibilitiesisFARGATEthis field is required. - network
Mode String - Docker networking mode to use for the containers in the task. Valid values are
none,bridge,awsvpc, andhost. - pid
Mode String - Process namespace to use for the containers in the task. The valid values are
hostandtask. - placement
Constraints List<Property Map> - Configuration block for rules that are taken into consideration during task placement. Maximum number of
placementConstraintsis10. Detailed below. - proxy
Configurations List<Property Map> - Configuration block for the App Mesh proxy. Detailed below.
- region String
- requires
Compatibilities List<String> - Set of launch types required by the task. The valid values are
EC2andFARGATE. - revision Number
- Revision of the task in a particular family.
- runtime
Platforms List<Property Map> - Configuration block for runtimePlatform that containers in your task may use.
- status String
- Status of the task definition.
- task
Definition String - task
Role StringArn - ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
- volumes List<Property Map>
- Attributes corresponding to the
volumeargument of theaws.ecs.TaskDefinitionresource.
Supporting Types
GetTaskDefinitionEphemeralStorage
- Size
In intGib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
- Size
In intGib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
- size
In IntegerGib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
- size
In numberGib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
- size_
in_ intgib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
- size
In NumberGib - The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is
21GiB and the maximum supported value is200GiB.
GetTaskDefinitionPlacementConstraint
- Expression string
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- Type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- Expression string
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- Type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- expression String
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type String
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- expression string
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- expression str
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type str
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- expression String
- Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type String
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
GetTaskDefinitionProxyConfiguration
- Container
Name string - Name of the container that will serve as the App Mesh proxy.
- Properties Dictionary<string, string>
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- Type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- Container
Name string - Name of the container that will serve as the App Mesh proxy.
- Properties map[string]string
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- Type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- container
Name String - Name of the container that will serve as the App Mesh proxy.
- properties Map<String,String>
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- type String
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- container
Name string - Name of the container that will serve as the App Mesh proxy.
- properties {[key: string]: string}
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- type string
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- container_
name str - Name of the container that will serve as the App Mesh proxy.
- properties Mapping[str, str]
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- type str
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
- container
Name String - Name of the container that will serve as the App Mesh proxy.
- properties Map<String>
- Set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.
- type String
- Proxy type. The default value is
APPMESH. The only supported value isAPPMESH.
GetTaskDefinitionRuntimePlatform
- Cpu
Architecture string - Must be set to either
X86_64orARM64; see cpu architecture - Operating
System stringFamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
- Cpu
Architecture string - Must be set to either
X86_64orARM64; see cpu architecture - Operating
System stringFamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
- cpu
Architecture String - Must be set to either
X86_64orARM64; see cpu architecture - operating
System StringFamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
- cpu
Architecture string - Must be set to either
X86_64orARM64; see cpu architecture - operating
System stringFamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
- cpu_
architecture str - Must be set to either
X86_64orARM64; see cpu architecture - operating_
system_ strfamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
- cpu
Architecture String - Must be set to either
X86_64orARM64; see cpu architecture - operating
System StringFamily - If the
requiresCompatibilitiesisFARGATEthis field is required; must be set to a valid option from the operating system family in the runtime platform setting
GetTaskDefinitionVolume
- Configure
At boolLaunch - Docker
Volume List<GetConfigurations Task Definition Volume Docker Volume Configuration> - Efs
Volume List<GetConfigurations Task Definition Volume Efs Volume Configuration> - Fsx
Windows List<GetFile Server Volume Configurations Task Definition Volume Fsx Windows File Server Volume Configuration> - Host
Path string - Name string
- S3files
Volume List<GetConfigurations Task Definition Volume S3files Volume Configuration>
- Configure
At boolLaunch - Docker
Volume []GetConfigurations Task Definition Volume Docker Volume Configuration - Efs
Volume []GetConfigurations Task Definition Volume Efs Volume Configuration - Fsx
Windows []GetFile Server Volume Configurations Task Definition Volume Fsx Windows File Server Volume Configuration - Host
Path string - Name string
- S3files
Volume []GetConfigurations Task Definition Volume S3files Volume Configuration
- configure
At BooleanLaunch - docker
Volume List<GetConfigurations Task Definition Volume Docker Volume Configuration> - efs
Volume List<GetConfigurations Task Definition Volume Efs Volume Configuration> - fsx
Windows List<GetFile Server Volume Configurations Task Definition Volume Fsx Windows File Server Volume Configuration> - host
Path String - name String
- s3files
Volume List<GetConfigurations Task Definition Volume S3files Volume Configuration>
- configure
At booleanLaunch - docker
Volume GetConfigurations Task Definition Volume Docker Volume Configuration[] - efs
Volume GetConfigurations Task Definition Volume Efs Volume Configuration[] - fsx
Windows GetFile Server Volume Configurations Task Definition Volume Fsx Windows File Server Volume Configuration[] - host
Path string - name string
- s3files
Volume GetConfigurations Task Definition Volume S3files Volume Configuration[]
- configure_
at_ boollaunch - docker_
volume_ Sequence[Getconfigurations Task Definition Volume Docker Volume Configuration] - efs_
volume_ Sequence[Getconfigurations Task Definition Volume Efs Volume Configuration] - fsx_
windows_ Sequence[Getfile_ server_ volume_ configurations Task Definition Volume Fsx Windows File Server Volume Configuration] - host_
path str - name str
- s3files_
volume_ Sequence[Getconfigurations Task Definition Volume S3files Volume Configuration]
GetTaskDefinitionVolumeDockerVolumeConfiguration
- Autoprovision bool
- Driver string
- Driver
Opts Dictionary<string, string> - Labels Dictionary<string, string>
- Scope string
- Autoprovision bool
- Driver string
- Driver
Opts map[string]string - Labels map[string]string
- Scope string
- autoprovision Boolean
- driver String
- driver
Opts Map<String,String> - labels Map<String,String>
- scope String
- autoprovision boolean
- driver string
- driver
Opts {[key: string]: string} - labels {[key: string]: string}
- scope string
- autoprovision bool
- driver str
- driver_
opts Mapping[str, str] - labels Mapping[str, str]
- scope str
- autoprovision Boolean
- driver String
- driver
Opts Map<String> - labels Map<String>
- scope String
GetTaskDefinitionVolumeEfsVolumeConfiguration
- List<Property Map>
- file
System StringId - root
Directory String - transit
Encryption String - transit
Encryption NumberPort
GetTaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig
- Access
Point stringId - Iam string
- Access
Point stringId - Iam string
- access
Point StringId - iam String
- access
Point stringId - iam string
- access_
point_ strid - iam str
- access
Point StringId - iam String
GetTaskDefinitionVolumeFsxWindowsFileServerVolumeConfiguration
- List<Property Map>
- file
System StringId - root
Directory String
GetTaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfig
- Credentials
Parameter string - Domain string
- Credentials
Parameter string - Domain string
- credentials
Parameter String - domain String
- credentials
Parameter string - domain string
- credentials_
parameter str - domain str
- credentials
Parameter String - domain String
GetTaskDefinitionVolumeS3filesVolumeConfiguration
- Access
Point stringArn - File
System stringArn - Root
Directory string - Transit
Encryption intPort
- Access
Point stringArn - File
System stringArn - Root
Directory string - Transit
Encryption intPort
- access
Point StringArn - file
System StringArn - root
Directory String - transit
Encryption IntegerPort
- access
Point stringArn - file
System stringArn - root
Directory string - transit
Encryption numberPort
- access
Point StringArn - file
System StringArn - root
Directory String - transit
Encryption NumberPort
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
Viewing docs for AWS v7.28.0
published on Thursday, Apr 30, 2026 by Pulumi
published on Thursday, Apr 30, 2026 by Pulumi
