ecs¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.
-
class
pulumi_aws.ecs.
AwaitableGetClusterResult
(arn=None, cluster_name=None, pending_tasks_count=None, registered_container_instances_count=None, running_tasks_count=None, settings=None, status=None, id=None)¶
-
class
pulumi_aws.ecs.
AwaitableGetContainerDefinitionResult
(container_name=None, cpu=None, disable_networking=None, docker_labels=None, environment=None, image=None, image_digest=None, memory=None, memory_reservation=None, task_definition=None, id=None)¶
-
class
pulumi_aws.ecs.
AwaitableGetServiceResult
(arn=None, cluster_arn=None, desired_count=None, launch_type=None, scheduling_strategy=None, service_name=None, task_definition=None, id=None)¶
-
class
pulumi_aws.ecs.
AwaitableGetTaskDefinitionResult
(family=None, network_mode=None, revision=None, status=None, task_definition=None, task_role_arn=None, id=None)¶
-
class
pulumi_aws.ecs.
Cluster
(resource_name, opts=None, name=None, settings=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides an ECS cluster.
The
setting
configuration block supports the following:name
- (Required) Name of the setting to manage. Valid values:containerInsights
.value
- (Required) The value to assign to the setting. Value values areenabled
anddisabled
.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)
settings (pulumi.Input[list]) – Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
tags (pulumi.Input[dict]) – Key-value mapping of resource tags
The settings object supports the following:
name
(pulumi.Input[str]
) - The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)value
(pulumi.Input[str]
)
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/ecs_cluster.html.markdown.
-
arn
= None¶ The Amazon Resource Name (ARN) that identifies the cluster
-
name
= None¶ The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)
-
settings
= None¶ Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
name
(str
) - The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)value
(str
)
Key-value mapping of resource tags
-
static
get
(resource_name, id, opts=None, arn=None, name=None, settings=None, tags=None)¶ Get an existing Cluster resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) that identifies the cluster
name (pulumi.Input[str]) – The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)
settings (pulumi.Input[list]) – Configuration block(s) with cluster settings. For example, this can be used to enable CloudWatch Container Insights for a cluster. Defined below.
tags (pulumi.Input[dict]) – Key-value mapping of resource tags
The settings object supports the following:
name
(pulumi.Input[str]
) - The name of the cluster (up to 255 letters, numbers, hyphens, and underscores)value
(pulumi.Input[str]
)
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/ecs_cluster.html.markdown.
-
translate_output_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
translate_input_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
class
pulumi_aws.ecs.
GetClusterResult
(arn=None, cluster_name=None, pending_tasks_count=None, registered_container_instances_count=None, running_tasks_count=None, settings=None, status=None, id=None)¶ A collection of values returned by getCluster.
-
arn
= None¶ The ARN of the ECS Cluster
-
pending_tasks_count
= None¶ The number of pending tasks for the ECS Cluster
-
registered_container_instances_count
= None¶ The number of registered container instances for the ECS Cluster
-
running_tasks_count
= None¶ The number of running tasks for the ECS Cluster
-
settings
= None¶ The settings associated with the ECS Cluster.
-
status
= None¶ The status of the ECS Cluster
-
id
= None¶ id is the provider-assigned unique ID for this managed resource.
-
-
class
pulumi_aws.ecs.
GetContainerDefinitionResult
(container_name=None, cpu=None, disable_networking=None, docker_labels=None, environment=None, image=None, image_digest=None, memory=None, memory_reservation=None, task_definition=None, id=None)¶ A collection of values returned by getContainerDefinition.
-
cpu
= None¶ The CPU limit for this container definition
-
disable_networking
= None¶ Indicator if networking is disabled
-
docker_labels
= None¶ Set docker labels
-
environment
= None¶ The environment in use
-
image
= None¶ The docker image in use, including the digest
-
image_digest
= None¶ The digest of the docker image in use
-
memory
= None¶ The memory limit for this container definition
-
memory_reservation
= None¶ The soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
-
id
= None¶ id is the provider-assigned unique ID for this managed resource.
-
-
class
pulumi_aws.ecs.
GetServiceResult
(arn=None, cluster_arn=None, desired_count=None, launch_type=None, scheduling_strategy=None, service_name=None, task_definition=None, id=None)¶ A collection of values returned by getService.
-
arn
= None¶ The ARN of the ECS Service
-
desired_count
= None¶ The number of tasks for the ECS Service
-
launch_type
= None¶ The launch type for the ECS Service
-
scheduling_strategy
= None¶ The scheduling strategy for the ECS Service
-
task_definition
= None¶ The family for the latest ACTIVE revision
-
id
= None¶ id is the provider-assigned unique ID for this managed resource.
-
-
class
pulumi_aws.ecs.
GetTaskDefinitionResult
(family=None, network_mode=None, revision=None, status=None, task_definition=None, task_role_arn=None, id=None)¶ A collection of values returned by getTaskDefinition.
-
family
= None¶ The family of this task definition
-
network_mode
= None¶ The Docker networking mode to use for the containers in this task.
-
revision
= None¶ The revision of this task definition
-
status
= None¶ The status of this task definition
-
task_role_arn
= None¶ The ARN of the IAM role that containers in this task can assume
-
id
= None¶ id is the provider-assigned unique ID for this managed resource.
-
-
class
pulumi_aws.ecs.
Service
(resource_name, opts=None, cluster=None, deployment_controller=None, deployment_maximum_percent=None, deployment_minimum_healthy_percent=None, desired_count=None, enable_ecs_managed_tags=None, health_check_grace_period_seconds=None, iam_role=None, launch_type=None, load_balancers=None, name=None, network_configuration=None, ordered_placement_strategies=None, placement_constraints=None, platform_version=None, propagate_tags=None, scheduling_strategy=None, service_registries=None, tags=None, task_definition=None, wait_for_steady_state=None, __props__=None, __name__=None, __opts__=None)¶ Note: To prevent a race condition during service deletion, make sure to set
depends_on
to the relatediam.RolePolicy
; otherwise, the policy may be destroyed too soon and the ECS service will then get stuck in theDRAINING
state.Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).
See ECS Services section in AWS developer guide.
The
deployment_controller
configuration block supports the following:type
- (Optional) Type of deployment controller. Valid values:CODE_DEPLOY
,ECS
. Default:ECS
.
load_balancer
supports the following:elb_name
- (Required for ELB Classic) The name of the ELB (Classic) to associate with the service.target_group_arn
- (Required for ALB/NLB) The ARN of the Load Balancer target group to associate with the service.container_name
- (Required) The name of the container to associate with the load balancer (as it appears in a container definition).container_port
- (Required) The port on the container to associate with the load balancer.
Version note: Multiple
load_balancer
configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.ordered_placement_strategy
supports the following:type
- (Required) The type of placement strategy. Must be one of:binpack
,random
, orspread
field
- (Optional) For thespread
placement strategy, valid values areinstanceId
(orhost
, which has the same effect), or any platform or custom attribute that is applied to a container instance. For thebinpack
type, valid values arememory
andcpu
. For therandom
type, this attribute is not needed. For more information, see Placement Strategy.
Note: for
spread
,host
andinstanceId
will be normalized, by AWS, to beinstanceId
. This means the statefile will showinstanceId
but your config will differ if you usehost
.placement_constraints
support the following:type
- (Required) The type of constraint. The only valid values at this time arememberOf
anddistinctInstance
.expression
- (Optional) Cluster Query Language expression to apply to the constraint. Does not need to be specified for thedistinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
network_configuration
support the following:subnets
- (Required) The subnets associated with the task or service.security_groups
- (Optional) The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.assign_public_ip
- (Optional) Assign a public IP address to the ENI (Fargate launch type only). Valid values aretrue
orfalse
. Defaultfalse
.
For more information, see Task Networking
service_registries
support the following:registry_arn
- (Required) The ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(servicediscovery.Service
). For more information, see Serviceport
- (Optional) The port value used if your Service Discovery service specified an SRV record.container_port
- (Optional) The port value, already specified in the task definition, to be used for your service discovery service.container_name
- (Optional) The container name value, already specified in the task definition, to be used for your service discovery service.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
cluster (pulumi.Input[str]) – ARN of an ECS cluster
deployment_controller (pulumi.Input[dict]) – Configuration block containing deployment controller configuration. Defined below.
deployment_maximum_percent (pulumi.Input[float]) – The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the
DAEMON
scheduling strategy.deployment_minimum_healthy_percent (pulumi.Input[float]) – The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
desired_count (pulumi.Input[float]) – The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.enable_ecs_managed_tags (pulumi.Input[bool]) – Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
health_check_grace_period_seconds (pulumi.Input[float]) – Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
iam_role (pulumi.Input[str]) – ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the
awsvpc
network mode. If usingawsvpc
network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.launch_type (pulumi.Input[str]) – The launch type on which to run your service. The valid values are
EC2
andFARGATE
. Defaults toEC2
.load_balancers (pulumi.Input[list]) – A load balancer block. Load balancers documented below.
name (pulumi.Input[str]) – The name of the service (up to 255 letters, numbers, hyphens, and underscores)
network_configuration (pulumi.Input[dict]) – The network configuration for the service. This parameter is required for task definitions that use the
awsvpc
network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.ordered_placement_strategies (pulumi.Input[list]) – Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of
ordered_placement_strategy
blocks is5
. Defined below.placement_constraints (pulumi.Input[list]) – rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
. Defined below.platform_version (pulumi.Input[str]) – The platform version on which to run your service. Only applicable for
launch_type
set toFARGATE
. Defaults toLATEST
. More information about Fargate platform versions can be found in the AWS ECS User Guide.propagate_tags (pulumi.Input[str]) – Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are
SERVICE
andTASK_DEFINITION
.scheduling_strategy (pulumi.Input[str]) – The scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that *Fargate tasks do not support the ``DAEMON` scheduling strategy* <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html>`_.service_registries (pulumi.Input[dict]) – The service discovery registries for the service. The maximum number of
service_registries
blocks is1
.tags (pulumi.Input[dict]) – Key-value mapping of resource tags
task_definition (pulumi.Input[str]) – The family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service.wait_for_steady_state (pulumi.Input[bool]) – If
true
, this provider will 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. Defaultfalse
.
The deployment_controller object supports the following:
type
(pulumi.Input[str]
)
The load_balancers object supports the following:
containerName
(pulumi.Input[str]
)containerPort
(pulumi.Input[float]
)elbName
(pulumi.Input[str]
)target_group_arn
(pulumi.Input[str]
)
The network_configuration object supports the following:
assignPublicIp
(pulumi.Input[bool]
)security_groups
(pulumi.Input[list]
)subnets
(pulumi.Input[list]
)
The ordered_placement_strategies object supports the following:
field
(pulumi.Input[str]
)type
(pulumi.Input[str]
)
The placement_constraints object supports the following:
expression
(pulumi.Input[str]
)type
(pulumi.Input[str]
)
The service_registries object supports the following:
containerName
(pulumi.Input[str]
)containerPort
(pulumi.Input[float]
)port
(pulumi.Input[float]
)registryArn
(pulumi.Input[str]
)
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/ecs_service.html.markdown.
-
cluster
= None¶ ARN of an ECS cluster
-
deployment_controller
= None¶ Configuration block containing deployment controller configuration. Defined below.
type
(str
)
-
deployment_maximum_percent
= None¶ The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the
DAEMON
scheduling strategy.
-
deployment_minimum_healthy_percent
= None¶ The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
-
desired_count
= None¶ The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
-
health_check_grace_period_seconds
= None¶ Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
-
iam_role
= None¶ ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the
awsvpc
network mode. If usingawsvpc
network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
-
launch_type
= None¶ The launch type on which to run your service. The valid values are
EC2
andFARGATE
. Defaults toEC2
.
-
load_balancers
= None¶ A load balancer block. Load balancers documented below.
containerName
(str
)containerPort
(float
)elbName
(str
)target_group_arn
(str
)
-
name
= None¶ The name of the service (up to 255 letters, numbers, hyphens, and underscores)
-
network_configuration
= None¶ The network configuration for the service. This parameter is required for task definitions that use the
awsvpc
network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.assignPublicIp
(bool
)security_groups
(list
)subnets
(list
)
-
ordered_placement_strategies
= None¶ Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of
ordered_placement_strategy
blocks is5
. Defined below.field
(str
)type
(str
)
-
placement_constraints
= None¶ rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
. Defined below.expression
(str
)type
(str
)
-
platform_version
= None¶ The platform version on which to run your service. Only applicable for
launch_type
set toFARGATE
. Defaults toLATEST
. More information about Fargate platform versions can be found in the AWS ECS User Guide.
Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are
SERVICE
andTASK_DEFINITION
.
-
scheduling_strategy
= None¶ The scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that *Fargate tasks do not support the ``DAEMON` scheduling strategy* <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html>`_.
-
service_registries
= None¶ The service discovery registries for the service. The maximum number of
service_registries
blocks is1
.containerName
(str
)containerPort
(float
)port
(float
)registryArn
(str
)
Key-value mapping of resource tags
-
task_definition
= None¶ The family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service.
-
wait_for_steady_state
= None¶ If
true
, this provider will 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. Defaultfalse
.
-
static
get
(resource_name, id, opts=None, cluster=None, deployment_controller=None, deployment_maximum_percent=None, deployment_minimum_healthy_percent=None, desired_count=None, enable_ecs_managed_tags=None, health_check_grace_period_seconds=None, iam_role=None, launch_type=None, load_balancers=None, name=None, network_configuration=None, ordered_placement_strategies=None, placement_constraints=None, platform_version=None, propagate_tags=None, scheduling_strategy=None, service_registries=None, tags=None, task_definition=None, wait_for_steady_state=None)¶ Get an existing Service resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cluster (pulumi.Input[str]) – ARN of an ECS cluster
deployment_controller (pulumi.Input[dict]) – Configuration block containing deployment controller configuration. Defined below.
deployment_maximum_percent (pulumi.Input[float]) – The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the
DAEMON
scheduling strategy.deployment_minimum_healthy_percent (pulumi.Input[float]) – The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
desired_count (pulumi.Input[float]) – The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.enable_ecs_managed_tags (pulumi.Input[bool]) – Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
health_check_grace_period_seconds (pulumi.Input[float]) – Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
iam_role (pulumi.Input[str]) – ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the
awsvpc
network mode. If usingawsvpc
network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.launch_type (pulumi.Input[str]) – The launch type on which to run your service. The valid values are
EC2
andFARGATE
. Defaults toEC2
.load_balancers (pulumi.Input[list]) – A load balancer block. Load balancers documented below.
name (pulumi.Input[str]) – The name of the service (up to 255 letters, numbers, hyphens, and underscores)
network_configuration (pulumi.Input[dict]) – The network configuration for the service. This parameter is required for task definitions that use the
awsvpc
network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.ordered_placement_strategies (pulumi.Input[list]) – Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. The maximum number of
ordered_placement_strategy
blocks is5
. Defined below.placement_constraints (pulumi.Input[list]) – rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
. Defined below.platform_version (pulumi.Input[str]) –
The platform version on which to run your service. Only applicable for
launch_type
set toFARGATE
. Defaults toLATEST
. More information about Fargate platform versions can be found in the AWS ECS User Guide.propagate_tags (pulumi.Input[str]) – Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are
SERVICE
andTASK_DEFINITION
.scheduling_strategy (pulumi.Input[str]) – The scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that *Fargate tasks do not support the ``DAEMON` scheduling strategy* <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html>`_.service_registries (pulumi.Input[dict]) – The service discovery registries for the service. The maximum number of
service_registries
blocks is1
.tags (pulumi.Input[dict]) – Key-value mapping of resource tags
task_definition (pulumi.Input[str]) – The family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service.wait_for_steady_state (pulumi.Input[bool]) – If
true
, this provider will 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. Defaultfalse
.
The deployment_controller object supports the following:
type
(pulumi.Input[str]
)
The load_balancers object supports the following:
containerName
(pulumi.Input[str]
)containerPort
(pulumi.Input[float]
)elbName
(pulumi.Input[str]
)target_group_arn
(pulumi.Input[str]
)
The network_configuration object supports the following:
assignPublicIp
(pulumi.Input[bool]
)security_groups
(pulumi.Input[list]
)subnets
(pulumi.Input[list]
)
The ordered_placement_strategies object supports the following:
field
(pulumi.Input[str]
)type
(pulumi.Input[str]
)
The placement_constraints object supports the following:
expression
(pulumi.Input[str]
)type
(pulumi.Input[str]
)
The service_registries object supports the following:
containerName
(pulumi.Input[str]
)containerPort
(pulumi.Input[float]
)port
(pulumi.Input[float]
)registryArn
(pulumi.Input[str]
)
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/ecs_service.html.markdown.
-
translate_output_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
translate_input_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
class
pulumi_aws.ecs.
TaskDefinition
(resource_name, opts=None, container_definitions=None, cpu=None, execution_role_arn=None, family=None, ipc_mode=None, memory=None, network_mode=None, pid_mode=None, placement_constraints=None, proxy_configuration=None, requires_compatibilities=None, tags=None, task_role_arn=None, volumes=None, __props__=None, __name__=None, __opts__=None)¶ Manages a revision of an ECS task definition to be used in
ecs.Service
.- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
container_definitions (pulumi.Input[str]) – A list of valid [container definitions] (http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters] (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official Developer Guide.
cpu (pulumi.Input[str]) – The number of cpu units used by the task. If the
requires_compatibilities
isFARGATE
this field is required.execution_role_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
family (pulumi.Input[str]) – A unique name for your task definition.
ipc_mode (pulumi.Input[str]) – The IPC resource namespace to be used for the containers in the task The valid values are
host
,task
, andnone
.memory (pulumi.Input[str]) – The amount (in MiB) of memory used by the task. If the
requires_compatibilities
isFARGATE
this field is required.network_mode (pulumi.Input[str]) – The Docker networking mode to use for the containers in the task. The valid values are
none
,bridge
,awsvpc
, andhost
.pid_mode (pulumi.Input[str]) – The process namespace to use for the containers in the task. The valid values are
host
andtask
.placement_constraints (pulumi.Input[list]) – A set of placement constraints rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
.proxy_configuration (pulumi.Input[dict]) – The proxy configuration details for the App Mesh proxy.
requires_compatibilities (pulumi.Input[list]) – A set of launch types required by the task. The valid values are
EC2
andFARGATE
.tags (pulumi.Input[dict]) – Key-value mapping of resource tags
task_role_arn (pulumi.Input[str]) – The ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
volumes (pulumi.Input[list]) – A set of volume blocks that containers in your task may use.
The placement_constraints object supports the following:
expression
(pulumi.Input[str]
) - Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.type
(pulumi.Input[str]
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
The proxy_configuration object supports the following:
containerName
(pulumi.Input[str]
) - The name of the container that will serve as the App Mesh proxy.properties
(pulumi.Input[dict]
) - The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.type
(pulumi.Input[str]
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
The volumes object supports the following:
dockerVolumeConfiguration
(pulumi.Input[dict]
) - Used to configure a docker volumeautoprovision
(pulumi.Input[bool]
) - If this value istrue
, the Docker volume is created if it does not already exist. Note: This field is only used if the scope isshared
.driver
(pulumi.Input[str]
) - The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement.driverOpts
(pulumi.Input[dict]
) - A map of Docker driver specific options.labels
(pulumi.Input[dict]
) - A map of custom metadata to add to your Docker volume.scope
(pulumi.Input[str]
) - The scope for the Docker volume, which determines its lifecycle, eithertask
orshared
. Docker volumes that are scoped to atask
are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that arescoped
as shared persist after the task stops.
hostPath
(pulumi.Input[str]
) - The path on the host container instance that is presented to the container. If not set, ECS will create a nonpersistent data volume that starts empty and is deleted after the task has finished.name
(pulumi.Input[str]
) - The name of the volume. This name is referenced in thesourceVolume
parameter of container definition in themountPoints
section.
-
arn
= None¶ Full ARN of the Task Definition (including both
family
andrevision
).
-
container_definitions
= None¶ A list of valid [container definitions] (http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters] (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official Developer Guide.
-
cpu
= None¶ The number of cpu units used by the task. If the
requires_compatibilities
isFARGATE
this field is required.
-
execution_role_arn
= None¶ The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
-
family
= None¶ A unique name for your task definition.
-
ipc_mode
= None¶ The IPC resource namespace to be used for the containers in the task The valid values are
host
,task
, andnone
.
-
memory
= None¶ The amount (in MiB) of memory used by the task. If the
requires_compatibilities
isFARGATE
this field is required.
-
network_mode
= None¶ The Docker networking mode to use for the containers in the task. The valid values are
none
,bridge
,awsvpc
, andhost
.
-
pid_mode
= None¶ The process namespace to use for the containers in the task. The valid values are
host
andtask
.
-
placement_constraints
= None¶ A set of placement constraints rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
.expression
(str
) - Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.type
(str
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
-
proxy_configuration
= None¶ The proxy configuration details for the App Mesh proxy.
containerName
(str
) - The name of the container that will serve as the App Mesh proxy.properties
(dict
) - The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.type
(str
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
-
requires_compatibilities
= None¶ A set of launch types required by the task. The valid values are
EC2
andFARGATE
.
-
revision
= None¶ The revision of the task in a particular family.
Key-value mapping of resource tags
-
task_role_arn
= None¶ The ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
-
volumes
= None¶ A set of volume blocks that containers in your task may use.
dockerVolumeConfiguration
(dict
) - Used to configure a docker volumeautoprovision
(bool
) - If this value istrue
, the Docker volume is created if it does not already exist. Note: This field is only used if the scope isshared
.driver
(str
) - The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement.driverOpts
(dict
) - A map of Docker driver specific options.labels
(dict
) - A map of custom metadata to add to your Docker volume.scope
(str
) - The scope for the Docker volume, which determines its lifecycle, eithertask
orshared
. Docker volumes that are scoped to atask
are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that arescoped
as shared persist after the task stops.
hostPath
(str
) - The path on the host container instance that is presented to the container. If not set, ECS will create a nonpersistent data volume that starts empty and is deleted after the task has finished.name
(str
) - The name of the volume. This name is referenced in thesourceVolume
parameter of container definition in themountPoints
section.
-
static
get
(resource_name, id, opts=None, arn=None, container_definitions=None, cpu=None, execution_role_arn=None, family=None, ipc_mode=None, memory=None, network_mode=None, pid_mode=None, placement_constraints=None, proxy_configuration=None, requires_compatibilities=None, revision=None, tags=None, task_role_arn=None, volumes=None)¶ Get an existing TaskDefinition resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
arn (pulumi.Input[str]) – Full ARN of the Task Definition (including both
family
andrevision
).container_definitions (pulumi.Input[str]) –
A list of valid [container definitions] (http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters] (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official Developer Guide.
cpu (pulumi.Input[str]) – The number of cpu units used by the task. If the
requires_compatibilities
isFARGATE
this field is required.execution_role_arn (pulumi.Input[str]) – The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
family (pulumi.Input[str]) – A unique name for your task definition.
ipc_mode (pulumi.Input[str]) – The IPC resource namespace to be used for the containers in the task The valid values are
host
,task
, andnone
.memory (pulumi.Input[str]) – The amount (in MiB) of memory used by the task. If the
requires_compatibilities
isFARGATE
this field is required.network_mode (pulumi.Input[str]) – The Docker networking mode to use for the containers in the task. The valid values are
none
,bridge
,awsvpc
, andhost
.pid_mode (pulumi.Input[str]) – The process namespace to use for the containers in the task. The valid values are
host
andtask
.placement_constraints (pulumi.Input[list]) – A set of placement constraints rules that are taken into consideration during task placement. Maximum number of
placement_constraints
is10
.proxy_configuration (pulumi.Input[dict]) – The proxy configuration details for the App Mesh proxy.
requires_compatibilities (pulumi.Input[list]) – A set of launch types required by the task. The valid values are
EC2
andFARGATE
.revision (pulumi.Input[float]) – The revision of the task in a particular family.
tags (pulumi.Input[dict]) – Key-value mapping of resource tags
task_role_arn (pulumi.Input[str]) – The ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
volumes (pulumi.Input[list]) – A set of volume blocks that containers in your task may use.
The placement_constraints object supports the following:
expression
(pulumi.Input[str]
) - Cluster Query Language expression to apply to the constraint. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.type
(pulumi.Input[str]
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
The proxy_configuration object supports the following:
containerName
(pulumi.Input[str]
) - The name of the container that will serve as the App Mesh proxy.properties
(pulumi.Input[dict]
) - The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified a key-value mapping.type
(pulumi.Input[str]
) - The proxy type. The default value isAPPMESH
. The only supported value isAPPMESH
.
The volumes object supports the following:
dockerVolumeConfiguration
(pulumi.Input[dict]
) - Used to configure a docker volumeautoprovision
(pulumi.Input[bool]
) - If this value istrue
, the Docker volume is created if it does not already exist. Note: This field is only used if the scope isshared
.driver
(pulumi.Input[str]
) - The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement.driverOpts
(pulumi.Input[dict]
) - A map of Docker driver specific options.labels
(pulumi.Input[dict]
) - A map of custom metadata to add to your Docker volume.scope
(pulumi.Input[str]
) - The scope for the Docker volume, which determines its lifecycle, eithertask
orshared
. Docker volumes that are scoped to atask
are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that arescoped
as shared persist after the task stops.
hostPath
(pulumi.Input[str]
) - The path on the host container instance that is presented to the container. If not set, ECS will create a nonpersistent data volume that starts empty and is deleted after the task has finished.name
(pulumi.Input[str]
) - The name of the volume. This name is referenced in thesourceVolume
parameter of container definition in themountPoints
section.
-
translate_output_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
translate_input_property
(prop)¶ Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
-
pulumi_aws.ecs.
get_cluster
(cluster_name=None, opts=None)¶ The ECS Cluster data source allows access to details of a specific cluster within an AWS ECS service.
- Parameters
cluster_name (str) – The name of the ECS Cluster
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/ecs_cluster.html.markdown.
-
pulumi_aws.ecs.
get_container_definition
(container_name=None, task_definition=None, opts=None)¶ The ECS container definition data source allows access to details of a specific container within an AWS ECS service.
- Parameters
container_name (str) – The name of the container definition
task_definition (str) – The ARN of the task definition which contains the container
-
pulumi_aws.ecs.
get_service
(cluster_arn=None, service_name=None, opts=None)¶ The ECS Service data source allows access to details of a specific Service within a AWS ECS Cluster.
- Parameters
cluster_arn (str) – The arn of the ECS Cluster
service_name (str) – The name of the ECS Service
This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/d/ecs_service.html.markdown.
-
pulumi_aws.ecs.
get_task_definition
(task_definition=None, opts=None)¶ The ECS task definition data source allows access to details of a specific AWS ECS task definition.
- Parameters
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.