GetTaskDefinition
The ECS task definition data source allows access to details of a specific AWS ECS task definition.
Example Usage
Coming soon!
Coming soon!
Coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const mongoTaskDefinition = new aws.ecs.TaskDefinition("mongo", {
containerDefinitions: `[
{
"cpu": 128,
"environment": [{
"name": "SECRET",
"value": "KEY"
}],
"essential": true,
"image": "mongo:latest",
"memory": 128,
"memoryReservation": 64,
"name": "mongodb"
}
]
`,
family: "mongodb",
});
// Simply specify the family to find the latest ACTIVE revision in that family.
const mongoEcsTaskDefinition = mongoTaskDefinition.family.apply(family => aws.ecs.getTaskDefinition({
taskDefinition: family,
}, { async: true }));
const foo = new aws.ecs.Cluster("foo", {});
const mongoService = new aws.ecs.Service("mongo", {
cluster: foo.id,
desiredCount: 2,
taskDefinition: pulumi.all([mongoTaskDefinition.family, mongoTaskDefinition.revision, mongoEcsTaskDefinition]).apply(([family, revision, mongoEcsTaskDefinition]) => `${family}:${(() => {
throw "tf2pulumi error: NYI: call to max";
return (() => { throw "NYI: call to max"; })();
})()}`),
});Using GetTaskDefinition
function getTaskDefinition(args: GetTaskDefinitionArgs, opts?: InvokeOptions): Promise<GetTaskDefinitionResult>function get_task_definition(task_definition=None, opts=None)func LookupTaskDefinition(ctx *Context, args *LookupTaskDefinitionArgs, opts ...InvokeOption) (*LookupTaskDefinitionResult, error)Note: This function is named
LookupTaskDefinitionin the Go SDK.
public static class GetTaskDefinition {
public static Task<GetTaskDefinitionResult> InvokeAsync(GetTaskDefinitionArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Task
Definition string The 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.
- Task
Definition string The 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.
- task
Definition string The 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.
- task_
definition str The 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.
GetTaskDefinition Result
The following output properties are available:
- Family string
The family of this task definition
- Id string
The provider-assigned unique ID for this managed resource.
- Network
Mode string The Docker networking mode to use for the containers in this task.
- Revision int
The revision of this task definition
- Status string
The status of this task definition
- Task
Definition string - Task
Role stringArn The ARN of the IAM role that containers in this task can assume
- Family string
The family of this task definition
- Id string
The provider-assigned unique ID for this managed resource.
- Network
Mode string The Docker networking mode to use for the containers in this task.
- Revision int
The revision of this task definition
- Status string
The status of this task definition
- Task
Definition string - Task
Role stringArn The ARN of the IAM role that containers in this task can assume
- family string
The family of this task definition
- id string
The provider-assigned unique ID for this managed resource.
- network
Mode string The Docker networking mode to use for the containers in this task.
- revision number
The revision of this task definition
- status string
The status of this task definition
- task
Definition string - task
Role stringArn The ARN of the IAM role that containers in this task can assume
- family str
The family of this task definition
- id str
The provider-assigned unique ID for this managed resource.
- network_
mode str The Docker networking mode to use for the containers in this task.
- revision float
The revision of this task definition
- status str
The status of this task definition
- task_
definition str - task_
role_ strarn The ARN of the IAM role that containers in this task can assume
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.