@pulumi/awsx
Version:
[](https://github.com/pulumi/pulumi-awsx/actions) [](https://slack.pulumi.com) [ • 7.32 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as pulumiAws from "@pulumi/aws";
/**
* Create a TaskDefinition resource with the given unique name, arguments, and options.
* Creates required log-group and task & execution roles.
* Presents required Service load balancers if target group included in port mappings.
*/
export declare class FargateTaskDefinition extends pulumi.ComponentResource {
/**
* Returns true if the given object is an instance of FargateTaskDefinition. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is FargateTaskDefinition;
/**
* Auto-created IAM task execution role that the Amazon ECS container agent and the Docker daemon can assume.
*/
readonly executionRole: pulumi.Output<pulumiAws.iam.Role | undefined>;
/**
* Computed load balancers from target groups specified of container port mappings.
*/
readonly loadBalancers: pulumi.Output<pulumiAws.types.output.ecs.ServiceLoadBalancer[]>;
/**
* Auto-created Log Group resource for use by containers.
*/
readonly logGroup: pulumi.Output<pulumiAws.cloudwatch.LogGroup | undefined>;
/**
* Underlying ECS Task Definition resource
*/
readonly taskDefinition: pulumi.Output<pulumiAws.ecs.TaskDefinition>;
/**
* Auto-created IAM role that allows your Amazon ECS container task to make calls to other AWS services.
*/
readonly taskRole: pulumi.Output<pulumiAws.iam.Role | undefined>;
/**
* Create a FargateTaskDefinition resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: FargateTaskDefinitionArgs, opts?: pulumi.ComponentResourceOptions);
}
/**
* The set of arguments for constructing a FargateTaskDefinition resource.
*/
export interface FargateTaskDefinitionArgs {
/**
* Single container to make a TaskDefinition from. Useful for simple cases where there aren't
* multiple containers, especially when creating a TaskDefinition to call [run] on.
*
* Either [container] or [containers] must be provided.
*/
container?: inputs.ecs.TaskDefinitionContainerDefinitionArgs;
/**
* All the containers to make a TaskDefinition from. Useful when creating a Service that will
* contain many containers within.
*
* Either [container] or [containers] must be provided.
*/
containers?: {
[key: string]: inputs.ecs.TaskDefinitionContainerDefinitionArgs;
};
/**
* The number of cpu units used by the task. If not provided, a default will be computed based on the cumulative needs specified by [containerDefinitions]
*/
cpu?: pulumi.Input<string>;
/**
* Enables fault injection and allows for fault injection requests to be accepted from the task's containers. Default is `false`.
*/
enableFaultInjection?: pulumi.Input<boolean>;
/**
* 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.
*/
ephemeralStorage?: pulumi.Input<pulumiAws.types.input.ecs.TaskDefinitionEphemeralStorage>;
/**
* The execution role that the Amazon ECS container agent and the Docker daemon can assume.
* Will be created automatically if not defined.
*/
executionRole?: inputs.awsx.DefaultRoleWithPolicyArgs;
/**
* An optional unique name for your task definition. If not specified, then a default will be created.
*/
family?: pulumi.Input<string>;
/**
* IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
*/
ipcMode?: pulumi.Input<string>;
/**
* A set of volume blocks that containers in your task may use.
*/
logGroup?: inputs.awsx.DefaultLogGroupArgs;
/**
* The amount (in MiB) of memory used by the task. If not provided, a default will be computed
* based on the cumulative needs specified by [containerDefinitions]
*/
memory?: pulumi.Input<string>;
/**
* Process namespace to use for the containers in the task. The valid values are `host` and `task`.
*/
pidMode?: pulumi.Input<string>;
/**
* Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
*/
placementConstraints?: pulumi.Input<pulumi.Input<pulumiAws.types.input.ecs.TaskDefinitionPlacementConstraint>[]>;
/**
* Configuration block for the App Mesh proxy. Detailed below.
*/
proxyConfiguration?: pulumi.Input<pulumiAws.types.input.ecs.TaskDefinitionProxyConfiguration>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* Configuration block for runtime_platform that containers in your task may use.
*/
runtimePlatform?: pulumi.Input<pulumiAws.types.input.ecs.TaskDefinitionRuntimePlatform>;
/**
* Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
*/
skipDestroy?: pulumi.Input<boolean>;
/**
* Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* IAM role that allows your Amazon ECS container task to make calls to other AWS services.
* Will be created automatically if not defined.
*/
taskRole?: inputs.awsx.DefaultRoleWithPolicyArgs;
/**
* Whether should track latest `ACTIVE` task definition on AWS or the one created with the resource stored in state. Default is `false`. Useful in the event the task definition is modified outside of this resource.
*/
trackLatest?: pulumi.Input<boolean>;
/**
* Configuration block for volumes that containers in your task may use. Detailed below.
*
* > **NOTE:** Proper escaping is required for JSON field values containing quotes (`"`) such as `environment` values. If directly setting the JSON, they should be escaped as `\"` in the JSON, e.g., `"value": "I \"love\" escaped quotes"`. If using a variable value, they should be escaped as `\\\"` in the variable, e.g., `value = "I \\\"love\\\" escaped quotes"` in the variable and `"value": "${var.myvariable}"` in the JSON.
*
* > **Note:** Fault injection only works with tasks using the `awsvpc` or `host` network modes. Fault injection isn't available on Windows.
*/
volumes?: pulumi.Input<pulumi.Input<pulumiAws.types.input.ecs.TaskDefinitionVolume>[]>;
}