Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ecs types #616

Merged
merged 2 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CHANGELOG
[#581](https://github.com/pulumi/pulumi-awsx/pull/581)
* Add `cloudtrail.Trail` component which can generate the required roles and bucket for a CloudTrail.
* Update `lb.NetworkTargetGroupHealthCheck` to allow for `path` and `matcher` properties.
* Update ECS types [#616](https://github.com/pulumi/pulumi-awsx/pull/616)

## 0.22.0 (2020-09-01)

Expand Down
7 changes: 7 additions & 0 deletions nodejs/awsx/ecs/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ export interface Container {
*/
hostname?: pulumi.Input<string>;

/**
* When this parameter is true, this allows you to deploy containerized applications that
* require stdin or a tty to be allocated. This parameter maps to OpenStdin in the Create a
* container section of the Docker Remote API and the --interactive option to docker run.
*/
interactive?: pulumi.Input<boolean>;

/**
* The links parameter allows containers to communicate with each other without the need for
* port mappings. This parameter is only supported if the network mode of a task definition is
Expand Down
32 changes: 20 additions & 12 deletions nodejs/awsx/ecs/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ export interface ServiceArgs {
*/
enableEcsManagedTags?: pulumi.Input<boolean>;

/**
* Enable to force a new task deployment of the service. This can be used to update tasks
* to use a newer Docker image with same image/tag combination (e.g. `myimage:latest`), roll
* Fargate tasks onto a newer platform version, or immediately deploy `orderedPlacementStrategy`
* and `placementConstraints` updates.
*/
forceNewDeployment?: pulumi.Input<boolean>;

/**
* Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent
* premature shutdown, up to 7200. Only valid for services configured to use load balancers.
Expand Down Expand Up @@ -282,6 +290,18 @@ export interface ServiceArgs {
*/
serviceRegistries?: aws.ecs.ServiceArgs["serviceRegistries"];

/**
* Key-value mapping of resource tags
*/
tags?: pulumi.Input<aws.Tags>;

/**
* Wait for the service to reach a steady state (like [`aws ecs wait
* services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html))
* before continuing. Defaults to `true`.
*/
waitForSteadyState?: pulumi.Input<boolean>;

// Changes we made to the core args type.

/**
Expand All @@ -298,18 +318,6 @@ export interface ServiceArgs {
* Security groups determining how this service can be reached.
*/
securityGroups: x.ec2.SecurityGroup[];

/**
* Wait for the service to reach a steady state (like [`aws ecs wait
* services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html))
* before continuing. Defaults to `true`.
*/
waitForSteadyState?: pulumi.Input<boolean>;

/**
* Key-value mapping of resource tags
*/
tags?: pulumi.Input<aws.Tags>;
}

// Make sure our exported args shape is compatible with the overwrite shape we're trying to provide.
Expand Down
79 changes: 50 additions & 29 deletions nodejs/awsx/ecs/taskDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ type OverwriteShape = utils.Overwrite<aws.ecs.TaskDefinitionArgs, {
}>;

export interface TaskDefinitionArgs {
// Properties copied from aws.ecs.TaskDefinitionArgs
// Added for AWSX

/**
* The vpc that the service for this task will run in. Does not normally need to be explicitly
Expand All @@ -299,29 +299,26 @@ export interface TaskDefinitionArgs {
vpc?: x.ec2.Vpc;

/**
* A set of placement constraints rules that are taken into consideration during task placement.
* Maximum number of `placement_constraints` is `10`.
*/
placementConstraints?: aws.ecs.TaskDefinitionArgs["placementConstraints"];

/**
* A set of volume blocks that containers in your task may use.
* Log group for logging information related to the service. If `undefined` a default instance
* with a one-day retention policy will be created. If `null`, no log group will be created.
*/
volumes?: aws.ecs.TaskDefinitionArgs["volumes"];
logGroup?: aws.cloudwatch.LogGroup | null;

// Properties we've added/changed.
// Copied from aws.ecs.TaskDefinitionArgs

/**
* Log group for logging information related to the service. If `undefined` a default instance
* with a one-day retention policy will be created. If `null`, no log group will be created.
* All the containers to make a ClusterTaskDefinition from. Useful when creating a
* ClusterService that will contain many containers within.
*
* Either [container] or [containers] must be provided.
*/
logGroup?: aws.cloudwatch.LogGroup | null;
containers: Record<string, ecs.Container>;

/**
* IAM role that allows your Amazon ECS container task to make calls to other AWS services. If
* `undefined`, a default will be created for the task. If `null`, no task will be created.
* 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]
*/
taskRole?: aws.iam.Role | null;
cpu?: pulumi.Input<string>;

/**
* The execution role that the Amazon ECS container agent and the Docker daemon can assume.
Expand All @@ -336,21 +333,20 @@ export interface TaskDefinitionArgs {
family?: pulumi.Input<string>;

/**
* 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]
* Configuration block(s) with Inference Accelerators settings. Detailed below.
*/
cpu?: pulumi.Input<string>;
inferenceAccelerators?: pulumi.Input<pulumi.Input<aws.types.input.ecs.TaskDefinitionInferenceAccelerator>[]>;

/**
* 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]
* The IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
*/
memory?: pulumi.Input<string>;
ipcMode?: pulumi.Input<string>;

/**
* A set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
* 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]
*/
requiresCompatibilities: pulumi.Input<["FARGATE"] | ["EC2"]>;
memory?: pulumi.Input<string>;

/**
* The Docker networking mode to use for the containers in the task. The valid values are
Expand All @@ -359,17 +355,42 @@ export interface TaskDefinitionArgs {
networkMode?: pulumi.Input<"none" | "bridge" | "awsvpc" | "host">;

/**
* All the containers to make a ClusterTaskDefinition from. Useful when creating a
* ClusterService that will contain many containers within.
*
* Either [container] or [containers] must be provided.
* The process namespace to use for the containers in the task. The valid values are `host` and `task`.
*/
containers: Record<string, ecs.Container>;
pidMode?: pulumi.Input<string>;

/**
* A set of placement constraints rules that are taken into consideration during task placement.
* Maximum number of `placement_constraints` is `10`.
*/
placementConstraints?: aws.ecs.TaskDefinitionArgs["placementConstraints"];

/**
* The proxy configuration details for the App Mesh proxy.
*/
proxyConfiguration?: aws.ecs.TaskDefinitionArgs["proxyConfiguration"];

/**
* A set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
*/
requiresCompatibilities: pulumi.Input<["FARGATE"] | ["EC2"]>;

/**
* Key-value mapping of resource tags
*/
tags?: pulumi.Input<aws.Tags>;

/**
* IAM role that allows your Amazon ECS container task to make calls to other AWS services. If
* `undefined`, a default will be created for the task. If `null`, no task will be created.
*/
taskRole?: aws.iam.Role | null;

/**
* A set of volume blocks that containers in your task may use.
*/
volumes?: aws.ecs.TaskDefinitionArgs["volumes"];

}

// Make sure our exported args shape is compatible with the overwrite shape we're trying to provide.
Expand Down