UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

106 lines 3.32 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getTaskDefinitionOutput = exports.getTaskDefinition = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The ECS task definition data source allows access to details of * a specific AWS ECS task definition. * * ## Example Usage * * ```typescript * 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), * }); * ``` */ function getTaskDefinition(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ecs/getTaskDefinition:getTaskDefinition", { "region": args.region, "taskDefinition": args.taskDefinition, }, opts); } exports.getTaskDefinition = getTaskDefinition; /** * The ECS task definition data source allows access to details of * a specific AWS ECS task definition. * * ## Example Usage * * ```typescript * 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), * }); * ``` */ function getTaskDefinitionOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ecs/getTaskDefinition:getTaskDefinition", { "region": args.region, "taskDefinition": args.taskDefinition, }, opts); } exports.getTaskDefinitionOutput = getTaskDefinitionOutput; //# sourceMappingURL=getTaskDefinition.js.map