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 LookupTaskDefinition in the Go SDK.

public static class GetTaskDefinition {
    public static Task<GetTaskDefinitionResult> InvokeAsync(GetTaskDefinitionArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

TaskDefinition 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.

TaskDefinition 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.

taskDefinition 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.

NetworkMode 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

TaskDefinition string
TaskRoleArn string

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.

NetworkMode 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

TaskDefinition string
TaskRoleArn string

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.

networkMode 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

taskDefinition string
taskRoleArn string

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_arn str

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 aws Terraform Provider.