Try AWS Native preview for resources not in the classic version.
aws.ecs.Service
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Note: To prevent a race condition during service deletion, make sure to set
depends_on
to the relatedaws.iam.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.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var mongo = new Aws.Ecs.Service("mongo", new()
{
Cluster = aws_ecs_cluster.Foo.Id,
TaskDefinition = aws_ecs_task_definition.Mongo.Arn,
DesiredCount = 3,
IamRole = aws_iam_role.Foo.Arn,
OrderedPlacementStrategies = new[]
{
new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
{
Type = "binpack",
Field = "cpu",
},
},
LoadBalancers = new[]
{
new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
{
TargetGroupArn = aws_lb_target_group.Foo.Arn,
ContainerName = "mongo",
ContainerPort = 8080,
},
},
PlacementConstraints = new[]
{
new Aws.Ecs.Inputs.ServicePlacementConstraintArgs
{
Type = "memberOf",
Expression = "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
},
},
}, new CustomResourceOptions
{
DependsOn = new[]
{
aws_iam_role_policy.Foo,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
Cluster: pulumi.Any(aws_ecs_cluster.Foo.Id),
TaskDefinition: pulumi.Any(aws_ecs_task_definition.Mongo.Arn),
DesiredCount: pulumi.Int(3),
IamRole: pulumi.Any(aws_iam_role.Foo.Arn),
OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
&ecs.ServiceOrderedPlacementStrategyArgs{
Type: pulumi.String("binpack"),
Field: pulumi.String("cpu"),
},
},
LoadBalancers: ecs.ServiceLoadBalancerArray{
&ecs.ServiceLoadBalancerArgs{
TargetGroupArn: pulumi.Any(aws_lb_target_group.Foo.Arn),
ContainerName: pulumi.String("mongo"),
ContainerPort: pulumi.Int(8080),
},
},
PlacementConstraints: ecs.ServicePlacementConstraintArray{
&ecs.ServicePlacementConstraintArgs{
Type: pulumi.String("memberOf"),
Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
aws_iam_role_policy.Foo,
}))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import com.pulumi.aws.ecs.inputs.ServiceOrderedPlacementStrategyArgs;
import com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs;
import com.pulumi.aws.ecs.inputs.ServicePlacementConstraintArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var mongo = new Service("mongo", ServiceArgs.builder()
.cluster(aws_ecs_cluster.foo().id())
.taskDefinition(aws_ecs_task_definition.mongo().arn())
.desiredCount(3)
.iamRole(aws_iam_role.foo().arn())
.orderedPlacementStrategies(ServiceOrderedPlacementStrategyArgs.builder()
.type("binpack")
.field("cpu")
.build())
.loadBalancers(ServiceLoadBalancerArgs.builder()
.targetGroupArn(aws_lb_target_group.foo().arn())
.containerName("mongo")
.containerPort(8080)
.build())
.placementConstraints(ServicePlacementConstraintArgs.builder()
.type("memberOf")
.expression("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(aws_iam_role_policy.foo())
.build());
}
}
import pulumi
import pulumi_aws as aws
mongo = aws.ecs.Service("mongo",
cluster=aws_ecs_cluster["foo"]["id"],
task_definition=aws_ecs_task_definition["mongo"]["arn"],
desired_count=3,
iam_role=aws_iam_role["foo"]["arn"],
ordered_placement_strategies=[aws.ecs.ServiceOrderedPlacementStrategyArgs(
type="binpack",
field="cpu",
)],
load_balancers=[aws.ecs.ServiceLoadBalancerArgs(
target_group_arn=aws_lb_target_group["foo"]["arn"],
container_name="mongo",
container_port=8080,
)],
placement_constraints=[aws.ecs.ServicePlacementConstraintArgs(
type="memberOf",
expression="attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
)],
opts=pulumi.ResourceOptions(depends_on=[aws_iam_role_policy["foo"]]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const mongo = new aws.ecs.Service("mongo", {
cluster: aws_ecs_cluster.foo.id,
taskDefinition: aws_ecs_task_definition.mongo.arn,
desiredCount: 3,
iamRole: aws_iam_role.foo.arn,
orderedPlacementStrategies: [{
type: "binpack",
field: "cpu",
}],
loadBalancers: [{
targetGroupArn: aws_lb_target_group.foo.arn,
containerName: "mongo",
containerPort: 8080,
}],
placementConstraints: [{
type: "memberOf",
expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
}],
}, {
dependsOn: [aws_iam_role_policy.foo],
});
resources:
mongo:
type: aws:ecs:Service
properties:
cluster: ${aws_ecs_cluster.foo.id}
taskDefinition: ${aws_ecs_task_definition.mongo.arn}
desiredCount: 3
iamRole: ${aws_iam_role.foo.arn}
orderedPlacementStrategies:
- type: binpack
field: cpu
loadBalancers:
- targetGroupArn: ${aws_lb_target_group.foo.arn}
containerName: mongo
containerPort: 8080
placementConstraints:
- type: memberOf
expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]
options:
dependson:
- ${aws_iam_role_policy.foo}
Ignoring Changes to Desired Count
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// ... other configurations ...
var example = new Aws.Ecs.Service("example", new()
{
DesiredCount = 2,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
DesiredCount: pulumi.Int(2),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Service("example", ServiceArgs.builder()
.desiredCount(2)
.build());
}
}
import pulumi
import pulumi_aws as aws
# ... other configurations ...
example = aws.ecs.Service("example", desired_count=2)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// ... other configurations ...
const example = new aws.ecs.Service("example", {desiredCount: 2});
resources:
example:
type: aws:ecs:Service
properties:
# Example: Create service with 2 instances to start
desiredCount: 2
Daemon Scheduling Strategy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var bar = new Aws.Ecs.Service("bar", new()
{
Cluster = aws_ecs_cluster.Foo.Id,
TaskDefinition = aws_ecs_task_definition.Bar.Arn,
SchedulingStrategy = "DAEMON",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewService(ctx, "bar", &ecs.ServiceArgs{
Cluster: pulumi.Any(aws_ecs_cluster.Foo.Id),
TaskDefinition: pulumi.Any(aws_ecs_task_definition.Bar.Arn),
SchedulingStrategy: pulumi.String("DAEMON"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var bar = new Service("bar", ServiceArgs.builder()
.cluster(aws_ecs_cluster.foo().id())
.taskDefinition(aws_ecs_task_definition.bar().arn())
.schedulingStrategy("DAEMON")
.build());
}
}
import pulumi
import pulumi_aws as aws
bar = aws.ecs.Service("bar",
cluster=aws_ecs_cluster["foo"]["id"],
task_definition=aws_ecs_task_definition["bar"]["arn"],
scheduling_strategy="DAEMON")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = new aws.ecs.Service("bar", {
cluster: aws_ecs_cluster.foo.id,
taskDefinition: aws_ecs_task_definition.bar.arn,
schedulingStrategy: "DAEMON",
});
resources:
bar:
type: aws:ecs:Service
properties:
cluster: ${aws_ecs_cluster.foo.id}
taskDefinition: ${aws_ecs_task_definition.bar.arn}
schedulingStrategy: DAEMON
CloudWatch Deployment Alarms
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ecs.Service("example", new()
{
Cluster = aws_ecs_cluster.Example.Id,
Alarms = new Aws.Ecs.Inputs.ServiceAlarmsArgs
{
Enable = true,
Rollback = true,
AlarmNames = new[]
{
aws_cloudwatch_metric_alarm.Example.Alarm_name,
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
Cluster: pulumi.Any(aws_ecs_cluster.Example.Id),
Alarms: &ecs.ServiceAlarmsArgs{
Enable: pulumi.Bool(true),
Rollback: pulumi.Bool(true),
AlarmNames: pulumi.StringArray{
aws_cloudwatch_metric_alarm.Example.Alarm_name,
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Service("example", ServiceArgs.builder()
.cluster(aws_ecs_cluster.example().id())
.alarms(ServiceAlarmsArgs.builder()
.enable(true)
.rollback(true)
.alarmNames(aws_cloudwatch_metric_alarm.example().alarm_name())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example",
cluster=aws_ecs_cluster["example"]["id"],
alarms=aws.ecs.ServiceAlarmsArgs(
enable=True,
rollback=True,
alarm_names=[aws_cloudwatch_metric_alarm["example"]["alarm_name"]],
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {
cluster: aws_ecs_cluster.example.id,
alarms: {
enable: true,
rollback: true,
alarmNames: [aws_cloudwatch_metric_alarm.example.alarm_name],
},
});
resources:
example:
type: aws:ecs:Service
properties:
cluster: ${aws_ecs_cluster.example.id}
alarms:
enable: true
rollback: true
alarmNames:
- ${aws_cloudwatch_metric_alarm.example.alarm_name}
External Deployment Controller
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ecs.Service("example", new()
{
Cluster = aws_ecs_cluster.Example.Id,
DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
{
Type = "EXTERNAL",
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
Cluster: pulumi.Any(aws_ecs_cluster.Example.Id),
DeploymentController: &ecs.ServiceDeploymentControllerArgs{
Type: pulumi.String("EXTERNAL"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Service;
import com.pulumi.aws.ecs.ServiceArgs;
import com.pulumi.aws.ecs.inputs.ServiceDeploymentControllerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Service("example", ServiceArgs.builder()
.cluster(aws_ecs_cluster.example().id())
.deploymentController(ServiceDeploymentControllerArgs.builder()
.type("EXTERNAL")
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example",
cluster=aws_ecs_cluster["example"]["id"],
deployment_controller=aws.ecs.ServiceDeploymentControllerArgs(
type="EXTERNAL",
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {
cluster: aws_ecs_cluster.example.id,
deploymentController: {
type: "EXTERNAL",
},
});
resources:
example:
type: aws:ecs:Service
properties:
cluster: ${aws_ecs_cluster.example.id}
deploymentController:
type: EXTERNAL
Create Service Resource
new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
@overload
def Service(resource_name: str,
opts: Optional[ResourceOptions] = None,
alarms: Optional[ServiceAlarmsArgs] = None,
capacity_provider_strategies: Optional[Sequence[ServiceCapacityProviderStrategyArgs]] = None,
cluster: Optional[str] = None,
deployment_circuit_breaker: Optional[ServiceDeploymentCircuitBreakerArgs] = None,
deployment_controller: Optional[ServiceDeploymentControllerArgs] = None,
deployment_maximum_percent: Optional[int] = None,
deployment_minimum_healthy_percent: Optional[int] = None,
desired_count: Optional[int] = None,
enable_ecs_managed_tags: Optional[bool] = None,
enable_execute_command: Optional[bool] = None,
force_new_deployment: Optional[bool] = None,
health_check_grace_period_seconds: Optional[int] = None,
iam_role: Optional[str] = None,
launch_type: Optional[str] = None,
load_balancers: Optional[Sequence[ServiceLoadBalancerArgs]] = None,
name: Optional[str] = None,
network_configuration: Optional[ServiceNetworkConfigurationArgs] = None,
ordered_placement_strategies: Optional[Sequence[ServiceOrderedPlacementStrategyArgs]] = None,
placement_constraints: Optional[Sequence[ServicePlacementConstraintArgs]] = None,
platform_version: Optional[str] = None,
propagate_tags: Optional[str] = None,
scheduling_strategy: Optional[str] = None,
service_connect_configuration: Optional[ServiceServiceConnectConfigurationArgs] = None,
service_registries: Optional[ServiceServiceRegistriesArgs] = None,
tags: Optional[Mapping[str, str]] = None,
task_definition: Optional[str] = None,
triggers: Optional[Mapping[str, str]] = None,
wait_for_steady_state: Optional[bool] = None)
@overload
def Service(resource_name: str,
args: Optional[ServiceArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewService(ctx *Context, name string, args *ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs? args = null, CustomResourceOptions? opts = null)
public Service(String name, ServiceArgs args)
public Service(String name, ServiceArgs args, CustomResourceOptions options)
type: aws:ecs:Service
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Service Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Service resource accepts the following input properties:
- Alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- Capacity
Provider List<ServiceStrategies Capacity Provider Strategy> Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- Cluster string
ARN of an ECS cluster.
- Deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- Deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- Deployment
Maximum intPercent 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 intHealthy Percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Force
New boolDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- Health
Check intGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- Load
Balancers List<ServiceLoad Balancer> Configuration block for load balancers. See below.
- Name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- Network
Configuration ServiceNetwork Configuration 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. See below.- Ordered
Placement List<ServiceStrategies Ordered Placement Strategy> Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- Placement
Constraints List<ServicePlacement Constraint> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- Platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- Service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- Service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Dictionary<string, string>
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.- Task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- Triggers Dictionary<string, string>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- Wait
For boolSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- Alarms
Service
Alarms Args Information about the CloudWatch alarms. See below.
- Capacity
Provider []ServiceStrategies Capacity Provider Strategy Args Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- Cluster string
ARN of an ECS cluster.
- Deployment
Circuit ServiceBreaker Deployment Circuit Breaker Args Configuration block for deployment circuit breaker. See below.
- Deployment
Controller ServiceDeployment Controller Args Configuration block for deployment controller configuration. See below.
- Deployment
Maximum intPercent 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 intHealthy Percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Force
New boolDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- Health
Check intGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- Load
Balancers []ServiceLoad Balancer Args Configuration block for load balancers. See below.
- Name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- Network
Configuration ServiceNetwork Configuration Args 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. See below.- Ordered
Placement []ServiceStrategies Ordered Placement Strategy Args Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- Placement
Constraints []ServicePlacement Constraint Args Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- Platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- Service
Connect ServiceConfiguration Service Connect Configuration Args The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- Service
Registries ServiceService Registries Args Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- map[string]string
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.- Task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- Triggers map[string]string
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- Wait
For boolSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- capacity
Provider List<ServiceStrategies Capacity Provider Strategy> Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster String
ARN of an ECS cluster.
- deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- deployment
Maximum IntegerPercent 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 IntegerHealthy Percent 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 Integer Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- Boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New BooleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check IntegerGrace Period Seconds 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 String 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 String Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers List<ServiceLoad Balancer> Configuration block for load balancers. See below.
- name String
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration ServiceNetwork Configuration 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. See below.- ordered
Placement List<ServiceStrategies Ordered Placement Strategy> Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints List<ServicePlacement Constraint> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version String 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.- String
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 String Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Map<String,String>
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.- task
Definition String Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Map<String,String>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For BooleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- capacity
Provider ServiceStrategies Capacity Provider Strategy[] Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster string
ARN of an ECS cluster.
- deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- deployment
Maximum numberPercent 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 numberHealthy Percent 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 number Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute booleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New booleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check numberGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers ServiceLoad Balancer[] Configuration block for load balancers. See below.
- name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration ServiceNetwork Configuration 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. See below.- ordered
Placement ServiceStrategies Ordered Placement Strategy[] Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints ServicePlacement Constraint[] Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- {[key: string]: string}
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.- task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers {[key: string]: string}
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For booleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Args Information about the CloudWatch alarms. See below.
- capacity_
provider_ Sequence[Servicestrategies Capacity Provider Strategy Args] Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster str
ARN of an ECS cluster.
- deployment_
circuit_ Servicebreaker Deployment Circuit Breaker Args Configuration block for deployment circuit breaker. See below.
- deployment_
controller ServiceDeployment Controller Args Configuration block for deployment controller configuration. See below.
- deployment_
maximum_ intpercent 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_ inthealthy_ percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable_
execute_ boolcommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force_
new_ booldeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health_
check_ intgrace_ period_ seconds 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 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 str Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load_
balancers Sequence[ServiceLoad Balancer Args] Configuration block for load balancers. See below.
- name str
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network_
configuration ServiceNetwork Configuration Args 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. See below.- ordered_
placement_ Sequence[Servicestrategies Ordered Placement Strategy Args] Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement_
constraints Sequence[ServicePlacement Constraint Args] Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform_
version str 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.- 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 str Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service_
connect_ Serviceconfiguration Service Connect Configuration Args The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service_
registries ServiceService Registries Args Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Mapping[str, str]
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.- task_
definition str Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Mapping[str, str]
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait_
for_ boolsteady_ state If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms Property Map
Information about the CloudWatch alarms. See below.
- capacity
Provider List<Property Map>Strategies Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster String
ARN of an ECS cluster.
- deployment
Circuit Property MapBreaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller Property Map Configuration block for deployment controller configuration. See below.
- deployment
Maximum NumberPercent 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 NumberHealthy Percent 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 Number Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- Boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New BooleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check NumberGrace Period Seconds 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 String 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 String Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers List<Property Map> Configuration block for load balancers. See below.
- name String
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration Property Map 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. See below.- ordered
Placement List<Property Map>Strategies Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints List<Property Map> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version String 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.- String
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 String Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect Property MapConfiguration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries Property Map Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Map<String>
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.- task
Definition String Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Map<String>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For BooleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- Id string
The provider-assigned unique ID for this managed resource.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- id str
The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
- id String
The provider-assigned unique ID for this managed resource.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.
Look up Existing Service Resource
Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Service
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alarms: Optional[ServiceAlarmsArgs] = None,
capacity_provider_strategies: Optional[Sequence[ServiceCapacityProviderStrategyArgs]] = None,
cluster: Optional[str] = None,
deployment_circuit_breaker: Optional[ServiceDeploymentCircuitBreakerArgs] = None,
deployment_controller: Optional[ServiceDeploymentControllerArgs] = None,
deployment_maximum_percent: Optional[int] = None,
deployment_minimum_healthy_percent: Optional[int] = None,
desired_count: Optional[int] = None,
enable_ecs_managed_tags: Optional[bool] = None,
enable_execute_command: Optional[bool] = None,
force_new_deployment: Optional[bool] = None,
health_check_grace_period_seconds: Optional[int] = None,
iam_role: Optional[str] = None,
launch_type: Optional[str] = None,
load_balancers: Optional[Sequence[ServiceLoadBalancerArgs]] = None,
name: Optional[str] = None,
network_configuration: Optional[ServiceNetworkConfigurationArgs] = None,
ordered_placement_strategies: Optional[Sequence[ServiceOrderedPlacementStrategyArgs]] = None,
placement_constraints: Optional[Sequence[ServicePlacementConstraintArgs]] = None,
platform_version: Optional[str] = None,
propagate_tags: Optional[str] = None,
scheduling_strategy: Optional[str] = None,
service_connect_configuration: Optional[ServiceServiceConnectConfigurationArgs] = None,
service_registries: Optional[ServiceServiceRegistriesArgs] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
task_definition: Optional[str] = None,
triggers: Optional[Mapping[str, str]] = None,
wait_for_steady_state: Optional[bool] = None) -> Service
func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- Capacity
Provider List<ServiceStrategies Capacity Provider Strategy> Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- Cluster string
ARN of an ECS cluster.
- Deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- Deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- Deployment
Maximum intPercent 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 intHealthy Percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Force
New boolDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- Health
Check intGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- Load
Balancers List<ServiceLoad Balancer> Configuration block for load balancers. See below.
- Name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- Network
Configuration ServiceNetwork Configuration 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. See below.- Ordered
Placement List<ServiceStrategies Ordered Placement Strategy> Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- Placement
Constraints List<ServicePlacement Constraint> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- Platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- Service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- Service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Dictionary<string, string>
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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- Triggers Dictionary<string, string>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- Wait
For boolSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- Alarms
Service
Alarms Args Information about the CloudWatch alarms. See below.
- Capacity
Provider []ServiceStrategies Capacity Provider Strategy Args Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- Cluster string
ARN of an ECS cluster.
- Deployment
Circuit ServiceBreaker Deployment Circuit Breaker Args Configuration block for deployment circuit breaker. See below.
- Deployment
Controller ServiceDeployment Controller Args Configuration block for deployment controller configuration. See below.
- Deployment
Maximum intPercent 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 intHealthy Percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Force
New boolDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- Health
Check intGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- Load
Balancers []ServiceLoad Balancer Args Configuration block for load balancers. See below.
- Name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- Network
Configuration ServiceNetwork Configuration Args 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. See below.- Ordered
Placement []ServiceStrategies Ordered Placement Strategy Args Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- Placement
Constraints []ServicePlacement Constraint Args Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- Platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- Service
Connect ServiceConfiguration Service Connect Configuration Args The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- Service
Registries ServiceService Registries Args Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- map[string]string
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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- Triggers map[string]string
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- Wait
For boolSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- capacity
Provider List<ServiceStrategies Capacity Provider Strategy> Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster String
ARN of an ECS cluster.
- deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- deployment
Maximum IntegerPercent 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 IntegerHealthy Percent 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 Integer Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- Boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New BooleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check IntegerGrace Period Seconds 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 String 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 String Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers List<ServiceLoad Balancer> Configuration block for load balancers. See below.
- name String
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration ServiceNetwork Configuration 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. See below.- ordered
Placement List<ServiceStrategies Ordered Placement Strategy> Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints List<ServicePlacement Constraint> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version String 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.- String
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 String Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Map<String,String>
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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- task
Definition String Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Map<String,String>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For BooleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Information about the CloudWatch alarms. See below.
- capacity
Provider ServiceStrategies Capacity Provider Strategy[] Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster string
ARN of an ECS cluster.
- deployment
Circuit ServiceBreaker Deployment Circuit Breaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller ServiceDeployment Controller Configuration block for deployment controller configuration. See below.
- deployment
Maximum numberPercent 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 numberHealthy Percent 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 number Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute booleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New booleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check numberGrace Period Seconds 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 string 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 string Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers ServiceLoad Balancer[] Configuration block for load balancers. See below.
- name string
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration ServiceNetwork Configuration 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. See below.- ordered
Placement ServiceStrategies Ordered Placement Strategy[] Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints ServicePlacement Constraint[] Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version string 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.- string
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 string Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect ServiceConfiguration Service Connect Configuration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries ServiceService Registries Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- {[key: string]: string}
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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- task
Definition string Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers {[key: string]: string}
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For booleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms
Service
Alarms Args Information about the CloudWatch alarms. See below.
- capacity_
provider_ Sequence[Servicestrategies Capacity Provider Strategy Args] Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster str
ARN of an ECS cluster.
- deployment_
circuit_ Servicebreaker Deployment Circuit Breaker Args Configuration block for deployment circuit breaker. See below.
- deployment_
controller ServiceDeployment Controller Args Configuration block for deployment controller configuration. See below.
- deployment_
maximum_ intpercent 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_ inthealthy_ percent 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 int Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- bool
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable_
execute_ boolcommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force_
new_ booldeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health_
check_ intgrace_ period_ seconds 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 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 str Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load_
balancers Sequence[ServiceLoad Balancer Args] Configuration block for load balancers. See below.
- name str
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network_
configuration ServiceNetwork Configuration Args 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. See below.- ordered_
placement_ Sequence[Servicestrategies Ordered Placement Strategy Args] Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement_
constraints Sequence[ServicePlacement Constraint Args] Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform_
version str 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.- 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 str Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service_
connect_ Serviceconfiguration Service Connect Configuration Args The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service_
registries ServiceService Registries Args Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Mapping[str, str]
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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- task_
definition str Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Mapping[str, str]
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait_
for_ boolsteady_ state If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
- alarms Property Map
Information about the CloudWatch alarms. See below.
- capacity
Provider List<Property Map>Strategies Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if
force_new_deployment = true
and not changing from 0capacity_provider_strategy
blocks to greater than 0, or vice versa. See below.- cluster String
ARN of an ECS cluster.
- deployment
Circuit Property MapBreaker Configuration block for deployment circuit breaker. See below.
- deployment
Controller Property Map Configuration block for deployment controller configuration. See below.
- deployment
Maximum NumberPercent 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 NumberHealthy Percent 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 Number Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the
DAEMON
scheduling strategy.- Boolean
Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- force
New BooleanDeployment 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 deployordered_placement_strategy
andplacement_constraints
updates.- health
Check NumberGrace Period Seconds 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 String 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 String Launch type on which to run your service. The valid values are
EC2
,FARGATE
, andEXTERNAL
. Defaults toEC2
.- load
Balancers List<Property Map> Configuration block for load balancers. See below.
- name String
Name of the service (up to 255 letters, numbers, hyphens, and underscores)
The following arguments are optional:
- network
Configuration Property Map 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. See below.- ordered
Placement List<Property Map>Strategies Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. The maximum number ofordered_placement_strategy
blocks is5
. See below.- placement
Constraints List<Property Map> Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless
force_new_deployment
is enabled. Maximum number ofplacement_constraints
is10
. See below.- platform
Version String 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.- String
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 String Scheduling strategy to use for the service. The valid values are
REPLICA
andDAEMON
. Defaults toREPLICA
. Note that Tasks using the Fargate launch type or theCODE_DEPLOY
orEXTERNAL
deployment controller types don't support theDAEMON
scheduling strategy.- service
Connect Property MapConfiguration The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
- service
Registries Property Map Service discovery registries for the service. The maximum number of
service_registries
blocks is1
. See below.- Map<String>
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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- task
Definition String Family and revision (
family:revision
) or full ARN of the task definition that you want to run in your service. Required unless using theEXTERNAL
deployment controller. If a revision is not specified, the latestACTIVE
revision is used.- triggers Map<String>
Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with
timestamp()
. See example above.- wait
For BooleanSteady State If
true
, this provider will wait for the service to reach a steady state (likeaws ecs wait services-stable
) before continuing. Defaultfalse
.
Supporting Types
ServiceAlarms, ServiceAlarmsArgs
- Alarm
Names List<string> One or more CloudWatch alarm names.
- Enable bool
Determines whether to use the CloudWatch alarm option in the service deployment process.
- Rollback bool
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- Alarm
Names []string One or more CloudWatch alarm names.
- Enable bool
Determines whether to use the CloudWatch alarm option in the service deployment process.
- Rollback bool
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- alarm
Names List<String> One or more CloudWatch alarm names.
- enable Boolean
Determines whether to use the CloudWatch alarm option in the service deployment process.
- rollback Boolean
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- alarm
Names string[] One or more CloudWatch alarm names.
- enable boolean
Determines whether to use the CloudWatch alarm option in the service deployment process.
- rollback boolean
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- alarm_
names Sequence[str] One or more CloudWatch alarm names.
- enable bool
Determines whether to use the CloudWatch alarm option in the service deployment process.
- rollback bool
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- alarm
Names List<String> One or more CloudWatch alarm names.
- enable Boolean
Determines whether to use the CloudWatch alarm option in the service deployment process.
- rollback Boolean
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
ServiceCapacityProviderStrategy, ServiceCapacityProviderStrategyArgs
- Capacity
Provider string Short name of the capacity provider.
- Base int
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- Weight int
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
- Capacity
Provider string Short name of the capacity provider.
- Base int
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- Weight int
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
- capacity
Provider String Short name of the capacity provider.
- base Integer
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- weight Integer
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
- capacity
Provider string Short name of the capacity provider.
- base number
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- weight number
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
- capacity_
provider str Short name of the capacity provider.
- base int
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- weight int
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
- capacity
Provider String Short name of the capacity provider.
- base Number
Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.
- weight Number
Relative percentage of the total number of launched tasks that should use the specified capacity provider.
ServiceDeploymentCircuitBreaker, ServiceDeploymentCircuitBreakerArgs
- Enable bool
Whether to enable the deployment circuit breaker logic for the service.
- Rollback bool
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- Enable bool
Whether to enable the deployment circuit breaker logic for the service.
- Rollback bool
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- enable Boolean
Whether to enable the deployment circuit breaker logic for the service.
- rollback Boolean
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- enable boolean
Whether to enable the deployment circuit breaker logic for the service.
- rollback boolean
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- enable bool
Whether to enable the deployment circuit breaker logic for the service.
- rollback bool
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
- enable Boolean
Whether to enable the deployment circuit breaker logic for the service.
- rollback Boolean
Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.
ServiceDeploymentController, ServiceDeploymentControllerArgs
- Type string
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
- Type string
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
- type String
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
- type string
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
- type str
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
- type String
Type of deployment controller. Valid values:
CODE_DEPLOY
,ECS
,EXTERNAL
. Default:ECS
.
ServiceLoadBalancer, ServiceLoadBalancerArgs
- Container
Name string Name of the container to associate with the load balancer (as it appears in a container definition).
- Container
Port int 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.- Elb
Name string Name of the ELB (Classic) to associate with the service.
- Target
Group stringArn ARN of the Load Balancer target group to associate with the service.
- Container
Name string Name of the container to associate with the load balancer (as it appears in a container definition).
- Container
Port int 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.- Elb
Name string Name of the ELB (Classic) to associate with the service.
- Target
Group stringArn ARN of the Load Balancer target group to associate with the service.
- container
Name String Name of the container to associate with the load balancer (as it appears in a container definition).
- container
Port Integer 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.- elb
Name String Name of the ELB (Classic) to associate with the service.
- target
Group StringArn ARN of the Load Balancer target group to associate with the service.
- container
Name string Name of the container to associate with the load balancer (as it appears in a container definition).
- container
Port number 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.- elb
Name string Name of the ELB (Classic) to associate with the service.
- target
Group stringArn ARN of the Load Balancer target group to associate with the service.
- container_
name str Name of the container to associate with the load balancer (as it appears in a container definition).
- container_
port int 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.- elb_
name str Name of the ELB (Classic) to associate with the service.
- target_
group_ strarn ARN of the Load Balancer target group to associate with the service.
- container
Name String Name of the container to associate with the load balancer (as it appears in a container definition).
- container
Port Number 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.- elb
Name String Name of the ELB (Classic) to associate with the service.
- target
Group StringArn ARN of the Load Balancer target group to associate with the service.
ServiceNetworkConfiguration, ServiceNetworkConfigurationArgs
- Subnets List<string>
Subnets associated with the task or service.
- Assign
Public boolIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- Security
Groups List<string> 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.
- Subnets []string
Subnets associated with the task or service.
- Assign
Public boolIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- Security
Groups []string 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.
- subnets List<String>
Subnets associated with the task or service.
- assign
Public BooleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- security
Groups List<String> 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.
- subnets string[]
Subnets associated with the task or service.
- assign
Public booleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- security
Groups string[] 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.
- subnets Sequence[str]
Subnets associated with the task or service.
- assign_
public_ boolip Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- security_
groups Sequence[str] 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.
- subnets List<String>
Subnets associated with the task or service.
- assign
Public BooleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see Task Networking
- security
Groups List<String> 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.
ServiceOrderedPlacementStrategy, ServiceOrderedPlacementStrategyArgs
- Type string
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- Field string
For the
spread
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
.
- Type string
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- Field string
For the
spread
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
.
- type String
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- field String
For the
spread
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
.
- type string
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- field string
For the
spread
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
.
- type str
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- field str
For the
spread
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
.
- type String
Type of placement strategy. Must be one of:
binpack
,random
, orspread
- field String
For the
spread
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
.
ServicePlacementConstraint, ServicePlacementConstraintArgs
- Type string
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- Expression string
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- Type string
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- Expression string
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type String
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- expression String
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type string
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- expression string
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type str
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- expression str
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
- type String
Type of constraint. The only valid values at this time are
memberOf
anddistinctInstance
.- expression String
Cluster Query Language expression to apply to the constraint. Does not need to be specified for the
distinctInstance
type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.
ServiceServiceConnectConfiguration, ServiceServiceConnectConfigurationArgs
- Enabled bool
Specifies whether to use Service Connect with this service.
- Log
Configuration ServiceService Connect Configuration Log Configuration The log configuration for the container. See below.
- Namespace string
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- Services
List<Service
Service Connect Configuration Service> The list of Service Connect service objects. See below.
- Enabled bool
Specifies whether to use Service Connect with this service.
- Log
Configuration ServiceService Connect Configuration Log Configuration The log configuration for the container. See below.
- Namespace string
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- Services
[]Service
Service Connect Configuration Service The list of Service Connect service objects. See below.
- enabled Boolean
Specifies whether to use Service Connect with this service.
- log
Configuration ServiceService Connect Configuration Log Configuration The log configuration for the container. See below.
- namespace String
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- services
List<Service
Service Connect Configuration Service> The list of Service Connect service objects. See below.
- enabled boolean
Specifies whether to use Service Connect with this service.
- log
Configuration ServiceService Connect Configuration Log Configuration The log configuration for the container. See below.
- namespace string
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- services
Service
Service Connect Configuration Service[] The list of Service Connect service objects. See below.
- enabled bool
Specifies whether to use Service Connect with this service.
- log_
configuration ServiceService Connect Configuration Log Configuration The log configuration for the container. See below.
- namespace str
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- services
Sequence[Service
Service Connect Configuration Service] The list of Service Connect service objects. See below.
- enabled Boolean
Specifies whether to use Service Connect with this service.
- log
Configuration Property Map The log configuration for the container. See below.
- namespace String
The namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect.- services List<Property Map>
The list of Service Connect service objects. See below.
ServiceServiceConnectConfigurationLogConfiguration, ServiceServiceConnectConfigurationLogConfigurationArgs
- Log
Driver string The log driver to use for the container.
- Options Dictionary<string, string>
The configuration options to send to the log driver.
- Secret
Options List<ServiceService Connect Configuration Log Configuration Secret Option> The secrets to pass to the log configuration. See below.
- Log
Driver string The log driver to use for the container.
- Options map[string]string
The configuration options to send to the log driver.
- Secret
Options []ServiceService Connect Configuration Log Configuration Secret Option The secrets to pass to the log configuration. See below.
- log
Driver String The log driver to use for the container.
- options Map<String,String>
The configuration options to send to the log driver.
- secret
Options List<ServiceService Connect Configuration Log Configuration Secret Option> The secrets to pass to the log configuration. See below.
- log
Driver string The log driver to use for the container.
- options {[key: string]: string}
The configuration options to send to the log driver.
- secret
Options ServiceService Connect Configuration Log Configuration Secret Option[] The secrets to pass to the log configuration. See below.
- log_
driver str The log driver to use for the container.
- options Mapping[str, str]
The configuration options to send to the log driver.
- secret_
options Sequence[ServiceService Connect Configuration Log Configuration Secret Option] The secrets to pass to the log configuration. See below.
- log
Driver String The log driver to use for the container.
- options Map<String>
The configuration options to send to the log driver.
- secret
Options List<Property Map> The secrets to pass to the log configuration. See below.
ServiceServiceConnectConfigurationLogConfigurationSecretOption, ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs
- name str
The name of the secret.
- value_
from str The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.
ServiceServiceConnectConfigurationService, ServiceServiceConnectConfigurationServiceArgs
- Port
Name string The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- Client
Alias List<ServiceService Connect Configuration Service Client Alias> The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- Discovery
Name string The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- Ingress
Port intOverride The port number for the Service Connect proxy to listen on.
- Port
Name string The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- Client
Alias []ServiceService Connect Configuration Service Client Alias The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- Discovery
Name string The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- Ingress
Port intOverride The port number for the Service Connect proxy to listen on.
- port
Name String The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- client
Alias List<ServiceService Connect Configuration Service Client Alias> The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- discovery
Name String The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port IntegerOverride The port number for the Service Connect proxy to listen on.
- port
Name string The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- client
Alias ServiceService Connect Configuration Service Client Alias[] The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- discovery
Name string The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port numberOverride The port number for the Service Connect proxy to listen on.
- port_
name str The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- client_
alias Sequence[ServiceService Connect Configuration Service Client Alias] The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- discovery_
name str The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress_
port_ intoverride The port number for the Service Connect proxy to listen on.
- port
Name String The name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service.- client
Alias List<Property Map> The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1. See below.
- discovery
Name String The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port NumberOverride The port number for the Service Connect proxy to listen on.
ServiceServiceConnectConfigurationServiceClientAlias, ServiceServiceConnectConfigurationServiceClientAliasArgs
ServiceServiceRegistries, ServiceServiceRegistriesArgs
- Registry
Arn string ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- Container
Name string Container name value, already specified in the task definition, to be used for your service discovery service.
- Container
Port int Port value, already specified in the task definition, to be used for your service discovery service.
- Port int
Port value used if your Service Discovery service specified an SRV record.
- Registry
Arn string ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- Container
Name string Container name value, already specified in the task definition, to be used for your service discovery service.
- Container
Port int Port value, already specified in the task definition, to be used for your service discovery service.
- Port int
Port value used if your Service Discovery service specified an SRV record.
- registry
Arn String ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- container
Name String Container name value, already specified in the task definition, to be used for your service discovery service.
- container
Port Integer Port value, already specified in the task definition, to be used for your service discovery service.
- port Integer
Port value used if your Service Discovery service specified an SRV record.
- registry
Arn string ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- container
Name string Container name value, already specified in the task definition, to be used for your service discovery service.
- container
Port number Port value, already specified in the task definition, to be used for your service discovery service.
- port number
Port value used if your Service Discovery service specified an SRV record.
- registry_
arn str ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- container_
name str Container name value, already specified in the task definition, to be used for your service discovery service.
- container_
port int Port value, already specified in the task definition, to be used for your service discovery service.
- port int
Port value used if your Service Discovery service specified an SRV record.
- registry
Arn String ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(
aws.servicediscovery.Service
). For more information, see Service- container
Name String Container name value, already specified in the task definition, to be used for your service discovery service.
- container
Port Number Port value, already specified in the task definition, to be used for your service discovery service.
- port Number
Port value used if your Service Discovery service specified an SRV record.
Import
Using pulumi import
, import ECS services using the name
together with ecs cluster name
. For example:
$ pulumi import aws:ecs/service:Service imported cluster-name/service-name
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.