aws.ecs.Service
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const mongo = new aws.ecs.Service("mongo", {
name: "mongodb",
cluster: fooAwsEcsCluster.id,
taskDefinition: mongoAwsEcsTaskDefinition.arn,
desiredCount: 3,
iamRole: fooAwsIamRole.arn,
orderedPlacementStrategies: [{
type: "binpack",
field: "cpu",
}],
loadBalancers: [{
targetGroupArn: fooAwsLbTargetGroup.arn,
containerName: "mongo",
containerPort: 8080,
}],
placementConstraints: [{
type: "memberOf",
expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
}],
}, {
dependsOn: [foo],
});
import pulumi
import pulumi_aws as aws
mongo = aws.ecs.Service("mongo",
name="mongodb",
cluster=foo_aws_ecs_cluster["id"],
task_definition=mongo_aws_ecs_task_definition["arn"],
desired_count=3,
iam_role=foo_aws_iam_role["arn"],
ordered_placement_strategies=[{
"type": "binpack",
"field": "cpu",
}],
load_balancers=[{
"target_group_arn": foo_aws_lb_target_group["arn"],
"container_name": "mongo",
"container_port": 8080,
}],
placement_constraints=[{
"type": "memberOf",
"expression": "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
}],
opts = pulumi.ResourceOptions(depends_on=[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{
Name: pulumi.String("mongodb"),
Cluster: pulumi.Any(fooAwsEcsCluster.Id),
TaskDefinition: pulumi.Any(mongoAwsEcsTaskDefinition.Arn),
DesiredCount: pulumi.Int(3),
IamRole: pulumi.Any(fooAwsIamRole.Arn),
OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
&ecs.ServiceOrderedPlacementStrategyArgs{
Type: pulumi.String("binpack"),
Field: pulumi.String("cpu"),
},
},
LoadBalancers: ecs.ServiceLoadBalancerArray{
&ecs.ServiceLoadBalancerArgs{
TargetGroupArn: pulumi.Any(fooAwsLbTargetGroup.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{
foo,
}))
if err != nil {
return err
}
return nil
})
}
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()
{
Name = "mongodb",
Cluster = fooAwsEcsCluster.Id,
TaskDefinition = mongoAwsEcsTaskDefinition.Arn,
DesiredCount = 3,
IamRole = fooAwsIamRole.Arn,
OrderedPlacementStrategies = new[]
{
new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
{
Type = "binpack",
Field = "cpu",
},
},
LoadBalancers = new[]
{
new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
{
TargetGroupArn = fooAwsLbTargetGroup.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 =
{
foo,
},
});
});
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()
.name("mongodb")
.cluster(fooAwsEcsCluster.id())
.taskDefinition(mongoAwsEcsTaskDefinition.arn())
.desiredCount(3)
.iamRole(fooAwsIamRole.arn())
.orderedPlacementStrategies(ServiceOrderedPlacementStrategyArgs.builder()
.type("binpack")
.field("cpu")
.build())
.loadBalancers(ServiceLoadBalancerArgs.builder()
.targetGroupArn(fooAwsLbTargetGroup.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(foo)
.build());
}
}
resources:
mongo:
type: aws:ecs:Service
properties:
name: mongodb
cluster: ${fooAwsEcsCluster.id}
taskDefinition: ${mongoAwsEcsTaskDefinition.arn}
desiredCount: 3
iamRole: ${fooAwsIamRole.arn}
orderedPlacementStrategies:
- type: binpack
field: cpu
loadBalancers:
- targetGroupArn: ${fooAwsLbTargetGroup.arn}
containerName: mongo
containerPort: 8080
placementConstraints:
- type: memberOf
expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]
options:
dependson:
- ${foo}
Ignoring Changes to Desired Count
You can use ignoreChanges
to create an ECS service with an initial count of running instances, then ignore any changes to that count caused externally (e.g. Application Autoscaling).
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {desiredCount: 2});
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example", desired_count=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
})
}
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()
{
DesiredCount = 2,
});
});
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());
}
}
resources:
example:
type: aws:ecs:Service
properties:
desiredCount: 2 # Optional: Allow external changes without this provider plan difference
Daemon Scheduling Strategy
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bar = new aws.ecs.Service("bar", {
name: "bar",
cluster: foo.id,
taskDefinition: barAwsEcsTaskDefinition.arn,
schedulingStrategy: "DAEMON",
});
import pulumi
import pulumi_aws as aws
bar = aws.ecs.Service("bar",
name="bar",
cluster=foo["id"],
task_definition=bar_aws_ecs_task_definition["arn"],
scheduling_strategy="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{
Name: pulumi.String("bar"),
Cluster: pulumi.Any(foo.Id),
TaskDefinition: pulumi.Any(barAwsEcsTaskDefinition.Arn),
SchedulingStrategy: pulumi.String("DAEMON"),
})
if err != nil {
return err
}
return nil
})
}
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()
{
Name = "bar",
Cluster = foo.Id,
TaskDefinition = barAwsEcsTaskDefinition.Arn,
SchedulingStrategy = "DAEMON",
});
});
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()
.name("bar")
.cluster(foo.id())
.taskDefinition(barAwsEcsTaskDefinition.arn())
.schedulingStrategy("DAEMON")
.build());
}
}
resources:
bar:
type: aws:ecs:Service
properties:
name: bar
cluster: ${foo.id}
taskDefinition: ${barAwsEcsTaskDefinition.arn}
schedulingStrategy: DAEMON
CloudWatch Deployment Alarms
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {
name: "example",
cluster: exampleAwsEcsCluster.id,
alarms: {
enable: true,
rollback: true,
alarmNames: [exampleAwsCloudwatchMetricAlarm.alarmName],
},
});
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example",
name="example",
cluster=example_aws_ecs_cluster["id"],
alarms={
"enable": True,
"rollback": True,
"alarm_names": [example_aws_cloudwatch_metric_alarm["alarmName"]],
})
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{
Name: pulumi.String("example"),
Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
Alarms: &ecs.ServiceAlarmsArgs{
Enable: pulumi.Bool(true),
Rollback: pulumi.Bool(true),
AlarmNames: pulumi.StringArray{
exampleAwsCloudwatchMetricAlarm.AlarmName,
},
},
})
if err != nil {
return err
}
return nil
})
}
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()
{
Name = "example",
Cluster = exampleAwsEcsCluster.Id,
Alarms = new Aws.Ecs.Inputs.ServiceAlarmsArgs
{
Enable = true,
Rollback = true,
AlarmNames = new[]
{
exampleAwsCloudwatchMetricAlarm.AlarmName,
},
},
});
});
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()
.name("example")
.cluster(exampleAwsEcsCluster.id())
.alarms(ServiceAlarmsArgs.builder()
.enable(true)
.rollback(true)
.alarmNames(exampleAwsCloudwatchMetricAlarm.alarmName())
.build())
.build());
}
}
resources:
example:
type: aws:ecs:Service
properties:
name: example
cluster: ${exampleAwsEcsCluster.id}
alarms:
enable: true
rollback: true
alarmNames:
- ${exampleAwsCloudwatchMetricAlarm.alarmName}
External Deployment Controller
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {
name: "example",
cluster: exampleAwsEcsCluster.id,
deploymentController: {
type: "EXTERNAL",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example",
name="example",
cluster=example_aws_ecs_cluster["id"],
deployment_controller={
"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{
Name: pulumi.String("example"),
Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
DeploymentController: &ecs.ServiceDeploymentControllerArgs{
Type: pulumi.String("EXTERNAL"),
},
})
if err != nil {
return err
}
return nil
})
}
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()
{
Name = "example",
Cluster = exampleAwsEcsCluster.Id,
DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
{
Type = "EXTERNAL",
},
});
});
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()
.name("example")
.cluster(exampleAwsEcsCluster.id())
.deploymentController(ServiceDeploymentControllerArgs.builder()
.type("EXTERNAL")
.build())
.build());
}
}
resources:
example:
type: aws:ecs:Service
properties:
name: example
cluster: ${exampleAwsEcsCluster.id}
deploymentController:
type: EXTERNAL
Redeploy Service On Every Apply
The key used with triggers
is arbitrary.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ecs.Service("example", {
forceNewDeployment: true,
triggers: {
redeployment: "plantimestamp()",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ecs.Service("example",
force_new_deployment=True,
triggers={
"redeployment": "plantimestamp()",
})
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{
ForceNewDeployment: pulumi.Bool(true),
Triggers: pulumi.StringMap{
"redeployment": pulumi.String("plantimestamp()"),
},
})
if err != nil {
return err
}
return nil
})
}
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()
{
ForceNewDeployment = true,
Triggers =
{
{ "redeployment", "plantimestamp()" },
},
});
});
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()
.forceNewDeployment(true)
.triggers(Map.of("redeployment", "plantimestamp()"))
.build());
}
}
resources:
example:
type: aws:ecs:Service
properties:
forceNewDeployment: true
triggers:
redeployment: plantimestamp()
Create Service Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
@overload
def Service(resource_name: str,
args: Optional[ServiceArgs] = None,
opts: Optional[ResourceOptions] = None)
@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_delete: 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,
volume_configuration: Optional[ServiceVolumeConfigurationArgs] = None,
wait_for_steady_state: Optional[bool] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsServiceResource = new Aws.Ecs.Service("awsServiceResource", new()
{
Alarms = new Aws.Ecs.Inputs.ServiceAlarmsArgs
{
AlarmNames = new[]
{
"string",
},
Enable = false,
Rollback = false,
},
CapacityProviderStrategies = new[]
{
new Aws.Ecs.Inputs.ServiceCapacityProviderStrategyArgs
{
CapacityProvider = "string",
Base = 0,
Weight = 0,
},
},
Cluster = "string",
DeploymentCircuitBreaker = new Aws.Ecs.Inputs.ServiceDeploymentCircuitBreakerArgs
{
Enable = false,
Rollback = false,
},
DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
{
Type = "string",
},
DeploymentMaximumPercent = 0,
DeploymentMinimumHealthyPercent = 0,
DesiredCount = 0,
EnableEcsManagedTags = false,
EnableExecuteCommand = false,
ForceDelete = false,
ForceNewDeployment = false,
HealthCheckGracePeriodSeconds = 0,
IamRole = "string",
LaunchType = "string",
LoadBalancers = new[]
{
new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
{
ContainerName = "string",
ContainerPort = 0,
ElbName = "string",
TargetGroupArn = "string",
},
},
Name = "string",
NetworkConfiguration = new Aws.Ecs.Inputs.ServiceNetworkConfigurationArgs
{
Subnets = new[]
{
"string",
},
AssignPublicIp = false,
SecurityGroups = new[]
{
"string",
},
},
OrderedPlacementStrategies = new[]
{
new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
{
Type = "string",
Field = "string",
},
},
PlacementConstraints = new[]
{
new Aws.Ecs.Inputs.ServicePlacementConstraintArgs
{
Type = "string",
Expression = "string",
},
},
PlatformVersion = "string",
PropagateTags = "string",
SchedulingStrategy = "string",
ServiceConnectConfiguration = new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationArgs
{
Enabled = false,
LogConfiguration = new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationLogConfigurationArgs
{
LogDriver = "string",
Options =
{
{ "string", "string" },
},
SecretOptions = new[]
{
new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs
{
Name = "string",
ValueFrom = "string",
},
},
},
Namespace = "string",
Services = new[]
{
new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationServiceArgs
{
PortName = "string",
ClientAlias = new[]
{
new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationServiceClientAliasArgs
{
Port = 0,
DnsName = "string",
},
},
DiscoveryName = "string",
IngressPortOverride = 0,
Timeout = new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationServiceTimeoutArgs
{
IdleTimeoutSeconds = 0,
PerRequestTimeoutSeconds = 0,
},
Tls = new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationServiceTlsArgs
{
IssuerCertAuthority = new Aws.Ecs.Inputs.ServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityArgs
{
AwsPcaAuthorityArn = "string",
},
KmsKey = "string",
RoleArn = "string",
},
},
},
},
ServiceRegistries = new Aws.Ecs.Inputs.ServiceServiceRegistriesArgs
{
RegistryArn = "string",
ContainerName = "string",
ContainerPort = 0,
Port = 0,
},
Tags =
{
{ "string", "string" },
},
TaskDefinition = "string",
Triggers =
{
{ "string", "string" },
},
VolumeConfiguration = new Aws.Ecs.Inputs.ServiceVolumeConfigurationArgs
{
ManagedEbsVolume = new Aws.Ecs.Inputs.ServiceVolumeConfigurationManagedEbsVolumeArgs
{
RoleArn = "string",
Encrypted = false,
FileSystemType = "string",
Iops = 0,
KmsKeyId = "string",
SizeInGb = 0,
SnapshotId = "string",
TagSpecifications = new[]
{
new Aws.Ecs.Inputs.ServiceVolumeConfigurationManagedEbsVolumeTagSpecificationArgs
{
ResourceType = "string",
PropagateTags = "string",
Tags =
{
{ "string", "string" },
},
},
},
Throughput = 0,
VolumeType = "string",
},
Name = "string",
},
WaitForSteadyState = false,
});
example, err := ecs.NewService(ctx, "awsServiceResource", &ecs.ServiceArgs{
Alarms: &ecs.ServiceAlarmsArgs{
AlarmNames: pulumi.StringArray{
pulumi.String("string"),
},
Enable: pulumi.Bool(false),
Rollback: pulumi.Bool(false),
},
CapacityProviderStrategies: ecs.ServiceCapacityProviderStrategyArray{
&ecs.ServiceCapacityProviderStrategyArgs{
CapacityProvider: pulumi.String("string"),
Base: pulumi.Int(0),
Weight: pulumi.Int(0),
},
},
Cluster: pulumi.String("string"),
DeploymentCircuitBreaker: &ecs.ServiceDeploymentCircuitBreakerArgs{
Enable: pulumi.Bool(false),
Rollback: pulumi.Bool(false),
},
DeploymentController: &ecs.ServiceDeploymentControllerArgs{
Type: pulumi.String("string"),
},
DeploymentMaximumPercent: pulumi.Int(0),
DeploymentMinimumHealthyPercent: pulumi.Int(0),
DesiredCount: pulumi.Int(0),
EnableEcsManagedTags: pulumi.Bool(false),
EnableExecuteCommand: pulumi.Bool(false),
ForceDelete: pulumi.Bool(false),
ForceNewDeployment: pulumi.Bool(false),
HealthCheckGracePeriodSeconds: pulumi.Int(0),
IamRole: pulumi.String("string"),
LaunchType: pulumi.String("string"),
LoadBalancers: ecs.ServiceLoadBalancerArray{
&ecs.ServiceLoadBalancerArgs{
ContainerName: pulumi.String("string"),
ContainerPort: pulumi.Int(0),
ElbName: pulumi.String("string"),
TargetGroupArn: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
NetworkConfiguration: &ecs.ServiceNetworkConfigurationArgs{
Subnets: pulumi.StringArray{
pulumi.String("string"),
},
AssignPublicIp: pulumi.Bool(false),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
},
OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
&ecs.ServiceOrderedPlacementStrategyArgs{
Type: pulumi.String("string"),
Field: pulumi.String("string"),
},
},
PlacementConstraints: ecs.ServicePlacementConstraintArray{
&ecs.ServicePlacementConstraintArgs{
Type: pulumi.String("string"),
Expression: pulumi.String("string"),
},
},
PlatformVersion: pulumi.String("string"),
PropagateTags: pulumi.String("string"),
SchedulingStrategy: pulumi.String("string"),
ServiceConnectConfiguration: &ecs.ServiceServiceConnectConfigurationArgs{
Enabled: pulumi.Bool(false),
LogConfiguration: &ecs.ServiceServiceConnectConfigurationLogConfigurationArgs{
LogDriver: pulumi.String("string"),
Options: pulumi.StringMap{
"string": pulumi.String("string"),
},
SecretOptions: ecs.ServiceServiceConnectConfigurationLogConfigurationSecretOptionArray{
&ecs.ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs{
Name: pulumi.String("string"),
ValueFrom: pulumi.String("string"),
},
},
},
Namespace: pulumi.String("string"),
Services: ecs.ServiceServiceConnectConfigurationServiceArray{
&ecs.ServiceServiceConnectConfigurationServiceArgs{
PortName: pulumi.String("string"),
ClientAlias: ecs.ServiceServiceConnectConfigurationServiceClientAliasArray{
&ecs.ServiceServiceConnectConfigurationServiceClientAliasArgs{
Port: pulumi.Int(0),
DnsName: pulumi.String("string"),
},
},
DiscoveryName: pulumi.String("string"),
IngressPortOverride: pulumi.Int(0),
Timeout: &ecs.ServiceServiceConnectConfigurationServiceTimeoutArgs{
IdleTimeoutSeconds: pulumi.Int(0),
PerRequestTimeoutSeconds: pulumi.Int(0),
},
Tls: &ecs.ServiceServiceConnectConfigurationServiceTlsArgs{
IssuerCertAuthority: &ecs.ServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityArgs{
AwsPcaAuthorityArn: pulumi.String("string"),
},
KmsKey: pulumi.String("string"),
RoleArn: pulumi.String("string"),
},
},
},
},
ServiceRegistries: &ecs.ServiceServiceRegistriesArgs{
RegistryArn: pulumi.String("string"),
ContainerName: pulumi.String("string"),
ContainerPort: pulumi.Int(0),
Port: pulumi.Int(0),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TaskDefinition: pulumi.String("string"),
Triggers: pulumi.StringMap{
"string": pulumi.String("string"),
},
VolumeConfiguration: &ecs.ServiceVolumeConfigurationArgs{
ManagedEbsVolume: &ecs.ServiceVolumeConfigurationManagedEbsVolumeArgs{
RoleArn: pulumi.String("string"),
Encrypted: pulumi.Bool(false),
FileSystemType: pulumi.String("string"),
Iops: pulumi.Int(0),
KmsKeyId: pulumi.String("string"),
SizeInGb: pulumi.Int(0),
SnapshotId: pulumi.String("string"),
TagSpecifications: ecs.ServiceVolumeConfigurationManagedEbsVolumeTagSpecificationArray{
&ecs.ServiceVolumeConfigurationManagedEbsVolumeTagSpecificationArgs{
ResourceType: pulumi.String("string"),
PropagateTags: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
Throughput: pulumi.Int(0),
VolumeType: pulumi.String("string"),
},
Name: pulumi.String("string"),
},
WaitForSteadyState: pulumi.Bool(false),
})
var awsServiceResource = new Service("awsServiceResource", ServiceArgs.builder()
.alarms(ServiceAlarmsArgs.builder()
.alarmNames("string")
.enable(false)
.rollback(false)
.build())
.capacityProviderStrategies(ServiceCapacityProviderStrategyArgs.builder()
.capacityProvider("string")
.base(0)
.weight(0)
.build())
.cluster("string")
.deploymentCircuitBreaker(ServiceDeploymentCircuitBreakerArgs.builder()
.enable(false)
.rollback(false)
.build())
.deploymentController(ServiceDeploymentControllerArgs.builder()
.type("string")
.build())
.deploymentMaximumPercent(0)
.deploymentMinimumHealthyPercent(0)
.desiredCount(0)
.enableEcsManagedTags(false)
.enableExecuteCommand(false)
.forceDelete(false)
.forceNewDeployment(false)
.healthCheckGracePeriodSeconds(0)
.iamRole("string")
.launchType("string")
.loadBalancers(ServiceLoadBalancerArgs.builder()
.containerName("string")
.containerPort(0)
.elbName("string")
.targetGroupArn("string")
.build())
.name("string")
.networkConfiguration(ServiceNetworkConfigurationArgs.builder()
.subnets("string")
.assignPublicIp(false)
.securityGroups("string")
.build())
.orderedPlacementStrategies(ServiceOrderedPlacementStrategyArgs.builder()
.type("string")
.field("string")
.build())
.placementConstraints(ServicePlacementConstraintArgs.builder()
.type("string")
.expression("string")
.build())
.platformVersion("string")
.propagateTags("string")
.schedulingStrategy("string")
.serviceConnectConfiguration(ServiceServiceConnectConfigurationArgs.builder()
.enabled(false)
.logConfiguration(ServiceServiceConnectConfigurationLogConfigurationArgs.builder()
.logDriver("string")
.options(Map.of("string", "string"))
.secretOptions(ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs.builder()
.name("string")
.valueFrom("string")
.build())
.build())
.namespace("string")
.services(ServiceServiceConnectConfigurationServiceArgs.builder()
.portName("string")
.clientAlias(ServiceServiceConnectConfigurationServiceClientAliasArgs.builder()
.port(0)
.dnsName("string")
.build())
.discoveryName("string")
.ingressPortOverride(0)
.timeout(ServiceServiceConnectConfigurationServiceTimeoutArgs.builder()
.idleTimeoutSeconds(0)
.perRequestTimeoutSeconds(0)
.build())
.tls(ServiceServiceConnectConfigurationServiceTlsArgs.builder()
.issuerCertAuthority(ServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityArgs.builder()
.awsPcaAuthorityArn("string")
.build())
.kmsKey("string")
.roleArn("string")
.build())
.build())
.build())
.serviceRegistries(ServiceServiceRegistriesArgs.builder()
.registryArn("string")
.containerName("string")
.containerPort(0)
.port(0)
.build())
.tags(Map.of("string", "string"))
.taskDefinition("string")
.triggers(Map.of("string", "string"))
.volumeConfiguration(ServiceVolumeConfigurationArgs.builder()
.managedEbsVolume(ServiceVolumeConfigurationManagedEbsVolumeArgs.builder()
.roleArn("string")
.encrypted(false)
.fileSystemType("string")
.iops(0)
.kmsKeyId("string")
.sizeInGb(0)
.snapshotId("string")
.tagSpecifications(ServiceVolumeConfigurationManagedEbsVolumeTagSpecificationArgs.builder()
.resourceType("string")
.propagateTags("string")
.tags(Map.of("string", "string"))
.build())
.throughput(0)
.volumeType("string")
.build())
.name("string")
.build())
.waitForSteadyState(false)
.build());
aws_service_resource = aws.ecs.Service("awsServiceResource",
alarms={
"alarmNames": ["string"],
"enable": False,
"rollback": False,
},
capacity_provider_strategies=[{
"capacityProvider": "string",
"base": 0,
"weight": 0,
}],
cluster="string",
deployment_circuit_breaker={
"enable": False,
"rollback": False,
},
deployment_controller={
"type": "string",
},
deployment_maximum_percent=0,
deployment_minimum_healthy_percent=0,
desired_count=0,
enable_ecs_managed_tags=False,
enable_execute_command=False,
force_delete=False,
force_new_deployment=False,
health_check_grace_period_seconds=0,
iam_role="string",
launch_type="string",
load_balancers=[{
"containerName": "string",
"containerPort": 0,
"elbName": "string",
"targetGroupArn": "string",
}],
name="string",
network_configuration={
"subnets": ["string"],
"assignPublicIp": False,
"securityGroups": ["string"],
},
ordered_placement_strategies=[{
"type": "string",
"field": "string",
}],
placement_constraints=[{
"type": "string",
"expression": "string",
}],
platform_version="string",
propagate_tags="string",
scheduling_strategy="string",
service_connect_configuration={
"enabled": False,
"logConfiguration": {
"logDriver": "string",
"options": {
"string": "string",
},
"secretOptions": [{
"name": "string",
"valueFrom": "string",
}],
},
"namespace": "string",
"services": [{
"portName": "string",
"clientAlias": [{
"port": 0,
"dnsName": "string",
}],
"discoveryName": "string",
"ingressPortOverride": 0,
"timeout": {
"idleTimeoutSeconds": 0,
"perRequestTimeoutSeconds": 0,
},
"tls": {
"issuerCertAuthority": {
"awsPcaAuthorityArn": "string",
},
"kmsKey": "string",
"roleArn": "string",
},
}],
},
service_registries={
"registryArn": "string",
"containerName": "string",
"containerPort": 0,
"port": 0,
},
tags={
"string": "string",
},
task_definition="string",
triggers={
"string": "string",
},
volume_configuration={
"managedEbsVolume": {
"roleArn": "string",
"encrypted": False,
"fileSystemType": "string",
"iops": 0,
"kmsKeyId": "string",
"sizeInGb": 0,
"snapshotId": "string",
"tagSpecifications": [{
"resourceType": "string",
"propagateTags": "string",
"tags": {
"string": "string",
},
}],
"throughput": 0,
"volumeType": "string",
},
"name": "string",
},
wait_for_steady_state=False)
const awsServiceResource = new aws.ecs.Service("awsServiceResource", {
alarms: {
alarmNames: ["string"],
enable: false,
rollback: false,
},
capacityProviderStrategies: [{
capacityProvider: "string",
base: 0,
weight: 0,
}],
cluster: "string",
deploymentCircuitBreaker: {
enable: false,
rollback: false,
},
deploymentController: {
type: "string",
},
deploymentMaximumPercent: 0,
deploymentMinimumHealthyPercent: 0,
desiredCount: 0,
enableEcsManagedTags: false,
enableExecuteCommand: false,
forceDelete: false,
forceNewDeployment: false,
healthCheckGracePeriodSeconds: 0,
iamRole: "string",
launchType: "string",
loadBalancers: [{
containerName: "string",
containerPort: 0,
elbName: "string",
targetGroupArn: "string",
}],
name: "string",
networkConfiguration: {
subnets: ["string"],
assignPublicIp: false,
securityGroups: ["string"],
},
orderedPlacementStrategies: [{
type: "string",
field: "string",
}],
placementConstraints: [{
type: "string",
expression: "string",
}],
platformVersion: "string",
propagateTags: "string",
schedulingStrategy: "string",
serviceConnectConfiguration: {
enabled: false,
logConfiguration: {
logDriver: "string",
options: {
string: "string",
},
secretOptions: [{
name: "string",
valueFrom: "string",
}],
},
namespace: "string",
services: [{
portName: "string",
clientAlias: [{
port: 0,
dnsName: "string",
}],
discoveryName: "string",
ingressPortOverride: 0,
timeout: {
idleTimeoutSeconds: 0,
perRequestTimeoutSeconds: 0,
},
tls: {
issuerCertAuthority: {
awsPcaAuthorityArn: "string",
},
kmsKey: "string",
roleArn: "string",
},
}],
},
serviceRegistries: {
registryArn: "string",
containerName: "string",
containerPort: 0,
port: 0,
},
tags: {
string: "string",
},
taskDefinition: "string",
triggers: {
string: "string",
},
volumeConfiguration: {
managedEbsVolume: {
roleArn: "string",
encrypted: false,
fileSystemType: "string",
iops: 0,
kmsKeyId: "string",
sizeInGb: 0,
snapshotId: "string",
tagSpecifications: [{
resourceType: "string",
propagateTags: "string",
tags: {
string: "string",
},
}],
throughput: 0,
volumeType: "string",
},
name: "string",
},
waitForSteadyState: false,
});
type: aws:ecs:Service
properties:
alarms:
alarmNames:
- string
enable: false
rollback: false
capacityProviderStrategies:
- base: 0
capacityProvider: string
weight: 0
cluster: string
deploymentCircuitBreaker:
enable: false
rollback: false
deploymentController:
type: string
deploymentMaximumPercent: 0
deploymentMinimumHealthyPercent: 0
desiredCount: 0
enableEcsManagedTags: false
enableExecuteCommand: false
forceDelete: false
forceNewDeployment: false
healthCheckGracePeriodSeconds: 0
iamRole: string
launchType: string
loadBalancers:
- containerName: string
containerPort: 0
elbName: string
targetGroupArn: string
name: string
networkConfiguration:
assignPublicIp: false
securityGroups:
- string
subnets:
- string
orderedPlacementStrategies:
- field: string
type: string
placementConstraints:
- expression: string
type: string
platformVersion: string
propagateTags: string
schedulingStrategy: string
serviceConnectConfiguration:
enabled: false
logConfiguration:
logDriver: string
options:
string: string
secretOptions:
- name: string
valueFrom: string
namespace: string
services:
- clientAlias:
- dnsName: string
port: 0
discoveryName: string
ingressPortOverride: 0
portName: string
timeout:
idleTimeoutSeconds: 0
perRequestTimeoutSeconds: 0
tls:
issuerCertAuthority:
awsPcaAuthorityArn: string
kmsKey: string
roleArn: string
serviceRegistries:
containerName: string
containerPort: 0
port: 0
registryArn: string
tags:
string: string
taskDefinition: string
triggers:
string: string
volumeConfiguration:
managedEbsVolume:
encrypted: false
fileSystemType: string
iops: 0
kmsKeyId: string
roleArn: string
sizeInGb: 0
snapshotId: string
tagSpecifications:
- propagateTags: string
resourceType: string
tags:
string: string
throughput: 0
volumeType: string
name: string
waitForSteadyState: false
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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- Force
Delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - Volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- Force
Delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - Volume
Configuration ServiceVolume Configuration Args - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete Boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute booleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable_
execute_ boolcommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force_
delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume_
configuration ServiceVolume Configuration Args - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete Boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration Property Map - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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_delete: 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,
volume_configuration: Optional[ServiceVolumeConfigurationArgs] = 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- Force
Delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - Volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- Force
Delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - Volume
Configuration ServiceVolume Configuration Args - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete Boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute booleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration ServiceVolume Configuration - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable_
execute_ boolcommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force_
delete bool - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume_
configuration ServiceVolume Configuration Args - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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. Conflicts withlaunch_type
. - 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
- Whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Whether to enable Amazon ECS Exec for the tasks within the service.
- force
Delete Boolean - Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the
REPLICA
scheduling strategy. - 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. When using the forceNewDeployment property you also need to configure the triggers property. - 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
. Conflicts withcapacity_provider_strategy
. - 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
- 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 - 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. - 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
"plantimestamp()"
. When using the triggers property you also need to set the forceNewDeployment property to True. - volume
Configuration Property Map - Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- Rollback bool
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- Rollback bool
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- rollback Boolean
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- rollback boolean
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- rollback bool
- 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
- Whether to use the CloudWatch alarm option in the service deployment process.
- rollback Boolean
- 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
- Whether to use Service Connect with this service.
- Log
Configuration ServiceService Connect Configuration Log Configuration - Log configuration for the container. See below.
- Namespace string
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - Services
List<Service
Service Connect Configuration Service> - List of Service Connect service objects. See below.
- Enabled bool
- Whether to use Service Connect with this service.
- Log
Configuration ServiceService Connect Configuration Log Configuration - Log configuration for the container. See below.
- Namespace string
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - Services
[]Service
Service Connect Configuration Service - List of Service Connect service objects. See below.
- enabled Boolean
- Whether to use Service Connect with this service.
- log
Configuration ServiceService Connect Configuration Log Configuration - Log configuration for the container. See below.
- namespace String
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - services
List<Service
Service Connect Configuration Service> - List of Service Connect service objects. See below.
- enabled boolean
- Whether to use Service Connect with this service.
- log
Configuration ServiceService Connect Configuration Log Configuration - Log configuration for the container. See below.
- namespace string
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - services
Service
Service Connect Configuration Service[] - List of Service Connect service objects. See below.
- enabled bool
- Whether to use Service Connect with this service.
- log_
configuration ServiceService Connect Configuration Log Configuration - Log configuration for the container. See below.
- namespace str
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - services
Sequence[Service
Service Connect Configuration Service] - List of Service Connect service objects. See below.
- enabled Boolean
- Whether to use Service Connect with this service.
- log
Configuration Property Map - Log configuration for the container. See below.
- namespace String
- Namespace name or ARN of the
aws.servicediscovery.HttpNamespace
for use with Service Connect. - services List<Property Map>
- List of Service Connect service objects. See below.
ServiceServiceConnectConfigurationLogConfiguration, ServiceServiceConnectConfigurationLogConfigurationArgs
- Log
Driver string - Log driver to use for the container.
- Options Dictionary<string, string>
- Configuration options to send to the log driver.
- Secret
Options List<ServiceService Connect Configuration Log Configuration Secret Option> - Secrets to pass to the log configuration. See below.
- Log
Driver string - Log driver to use for the container.
- Options map[string]string
- Configuration options to send to the log driver.
- Secret
Options []ServiceService Connect Configuration Log Configuration Secret Option - Secrets to pass to the log configuration. See below.
- log
Driver String - Log driver to use for the container.
- options Map<String,String>
- Configuration options to send to the log driver.
- secret
Options List<ServiceService Connect Configuration Log Configuration Secret Option> - Secrets to pass to the log configuration. See below.
- log
Driver string - Log driver to use for the container.
- options {[key: string]: string}
- Configuration options to send to the log driver.
- secret
Options ServiceService Connect Configuration Log Configuration Secret Option[] - Secrets to pass to the log configuration. See below.
- log_
driver str - Log driver to use for the container.
- options Mapping[str, str]
- Configuration options to send to the log driver.
- secret_
options Sequence[ServiceService Connect Configuration Log Configuration Secret Option] - Secrets to pass to the log configuration. See below.
- log
Driver String - Log driver to use for the container.
- options Map<String>
- Configuration options to send to the log driver.
- secret
Options List<Property Map> - Secrets to pass to the log configuration. See below.
ServiceServiceConnectConfigurationLogConfigurationSecretOption, ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs
- name str
- Name of the secret.
- value_
from str - 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 - 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> - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- Ingress
Port intOverride - Port number for the Service Connect proxy to listen on.
- Timeout
Service
Service Connect Configuration Service Timeout - Configuration timeouts for Service Connect
- Tls
Service
Service Connect Configuration Service Tls - Configuration for enabling Transport Layer Security (TLS)
- Port
Name string - 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 - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- Ingress
Port intOverride - Port number for the Service Connect proxy to listen on.
- Timeout
Service
Service Connect Configuration Service Timeout - Configuration timeouts for Service Connect
- Tls
Service
Service Connect Configuration Service Tls - Configuration for enabling Transport Layer Security (TLS)
- port
Name String - 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> - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port IntegerOverride - Port number for the Service Connect proxy to listen on.
- timeout
Service
Service Connect Configuration Service Timeout - Configuration timeouts for Service Connect
- tls
Service
Service Connect Configuration Service Tls - Configuration for enabling Transport Layer Security (TLS)
- port
Name string - 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[] - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port numberOverride - Port number for the Service Connect proxy to listen on.
- timeout
Service
Service Connect Configuration Service Timeout - Configuration timeouts for Service Connect
- tls
Service
Service Connect Configuration Service Tls - Configuration for enabling Transport Layer Security (TLS)
- port_
name str - 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] - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress_
port_ intoverride - Port number for the Service Connect proxy to listen on.
- timeout
Service
Service Connect Configuration Service Timeout - Configuration timeouts for Service Connect
- tls
Service
Service Connect Configuration Service Tls - Configuration for enabling Transport Layer Security (TLS)
- port
Name String - Name of one of the
portMappings
from all the containers in the task definition of this Amazon ECS service. - client
Alias List<Property Map> - 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 - Name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.
- ingress
Port NumberOverride - Port number for the Service Connect proxy to listen on.
- timeout Property Map
- Configuration timeouts for Service Connect
- tls Property Map
- Configuration for enabling Transport Layer Security (TLS)
ServiceServiceConnectConfigurationServiceClientAlias, ServiceServiceConnectConfigurationServiceClientAliasArgs
ServiceServiceConnectConfigurationServiceTimeout, ServiceServiceConnectConfigurationServiceTimeoutArgs
- Idle
Timeout intSeconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- Per
Request intTimeout Seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
- Idle
Timeout intSeconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- Per
Request intTimeout Seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
- idle
Timeout IntegerSeconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- per
Request IntegerTimeout Seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
- idle
Timeout numberSeconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- per
Request numberTimeout Seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
- idle_
timeout_ intseconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- per_
request_ inttimeout_ seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
- idle
Timeout NumberSeconds - Amount of time in seconds a connection will stay active while idle. A value of 0 can be set to disable idleTimeout.
- per
Request NumberTimeout Seconds - Amount of time in seconds for the upstream to respond with a complete response per request. A value of 0 can be set to disable perRequestTimeout. Can only be set when appProtocol isn't TCP.
ServiceServiceConnectConfigurationServiceTls, ServiceServiceConnectConfigurationServiceTlsArgs
- Service
Service Connect Configuration Service Tls Issuer Cert Authority - Details of the certificate authority which will issue the certificate.
- Kms
Key string - KMS key used to encrypt the private key in Secrets Manager.
- Role
Arn string - ARN of the IAM Role that's associated with the Service Connect TLS.
- Service
Service Connect Configuration Service Tls Issuer Cert Authority - Details of the certificate authority which will issue the certificate.
- Kms
Key string - KMS key used to encrypt the private key in Secrets Manager.
- Role
Arn string - ARN of the IAM Role that's associated with the Service Connect TLS.
- Service
Service Connect Configuration Service Tls Issuer Cert Authority - Details of the certificate authority which will issue the certificate.
- kms
Key String - KMS key used to encrypt the private key in Secrets Manager.
- role
Arn String - ARN of the IAM Role that's associated with the Service Connect TLS.
- Service
Service Connect Configuration Service Tls Issuer Cert Authority - Details of the certificate authority which will issue the certificate.
- kms
Key string - KMS key used to encrypt the private key in Secrets Manager.
- role
Arn string - ARN of the IAM Role that's associated with the Service Connect TLS.
- Service
Service Connect Configuration Service Tls Issuer Cert Authority - Details of the certificate authority which will issue the certificate.
- kms_
key str - KMS key used to encrypt the private key in Secrets Manager.
- role_
arn str - ARN of the IAM Role that's associated with the Service Connect TLS.
- Property Map
- Details of the certificate authority which will issue the certificate.
- kms
Key String - KMS key used to encrypt the private key in Secrets Manager.
- role
Arn String - ARN of the IAM Role that's associated with the Service Connect TLS.
ServiceServiceConnectConfigurationServiceTlsIssuerCertAuthority, ServiceServiceConnectConfigurationServiceTlsIssuerCertAuthorityArgs
- string
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
- string
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
- String
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
- string
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
- str
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
- String
- ARN of the
aws.acmpca.CertificateAuthority
used to create the TLS Certificates.
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.
ServiceVolumeConfiguration, ServiceVolumeConfigurationArgs
- Managed
Ebs ServiceVolume Volume Configuration Managed Ebs Volume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- Name string
- Name of the volume.
- Managed
Ebs ServiceVolume Volume Configuration Managed Ebs Volume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- Name string
- Name of the volume.
- managed
Ebs ServiceVolume Volume Configuration Managed Ebs Volume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- name String
- Name of the volume.
- managed
Ebs ServiceVolume Volume Configuration Managed Ebs Volume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- name string
- Name of the volume.
- managed_
ebs_ Servicevolume Volume Configuration Managed Ebs Volume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- name str
- Name of the volume.
- managed
Ebs Property MapVolume - Configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. See below.
- name String
- Name of the volume.
ServiceVolumeConfigurationManagedEbsVolume, ServiceVolumeConfigurationManagedEbsVolumeArgs
- Role
Arn string - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - Encrypted bool
- Whether the volume should be encrypted. Default value is
true
. - File
System stringType - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - Iops int
- Number of I/O operations per second (IOPS).
- Kms
Key stringId - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- Size
In intGb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - Snapshot
Id string - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - List<Service
Volume Configuration Managed Ebs Volume Tag Specification> - The tags to apply to the volume. See below.
- Throughput int
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- Volume
Type string - Volume type.
- Role
Arn string - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - Encrypted bool
- Whether the volume should be encrypted. Default value is
true
. - File
System stringType - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - Iops int
- Number of I/O operations per second (IOPS).
- Kms
Key stringId - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- Size
In intGb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - Snapshot
Id string - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - []Service
Volume Configuration Managed Ebs Volume Tag Specification - The tags to apply to the volume. See below.
- Throughput int
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- Volume
Type string - Volume type.
- role
Arn String - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - encrypted Boolean
- Whether the volume should be encrypted. Default value is
true
. - file
System StringType - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - iops Integer
- Number of I/O operations per second (IOPS).
- kms
Key StringId - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- size
In IntegerGb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - snapshot
Id String - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - List<Service
Volume Configuration Managed Ebs Volume Tag Specification> - The tags to apply to the volume. See below.
- throughput Integer
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- volume
Type String - Volume type.
- role
Arn string - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - encrypted boolean
- Whether the volume should be encrypted. Default value is
true
. - file
System stringType - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - iops number
- Number of I/O operations per second (IOPS).
- kms
Key stringId - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- size
In numberGb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - snapshot
Id string - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - Service
Volume Configuration Managed Ebs Volume Tag Specification[] - The tags to apply to the volume. See below.
- throughput number
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- volume
Type string - Volume type.
- role_
arn str - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - encrypted bool
- Whether the volume should be encrypted. Default value is
true
. - file_
system_ strtype - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - iops int
- Number of I/O operations per second (IOPS).
- kms_
key_ strid - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- size_
in_ intgb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - snapshot_
id str - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - tag_
specifications Sequence[ServiceVolume Configuration Managed Ebs Volume Tag Specification] - The tags to apply to the volume. See below.
- throughput int
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- volume_
type str - Volume type.
- role
Arn String - Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. Recommended using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. - encrypted Boolean
- Whether the volume should be encrypted. Default value is
true
. - file
System StringType - Linux filesystem type for the volume. For volumes created from a snapshot, same filesystem type must be specified that the volume was using when the snapshot was created. Valid values are
ext3
,ext4
,xfs
. Default value isxfs
. - iops Number
- Number of I/O operations per second (IOPS).
- kms
Key StringId - Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.
- size
In NumberGb - Size of the volume in GiB. You must specify either a
size_in_gb
or asnapshot_id
. You can optionally specify a volume size greater than or equal to the snapshot size. - snapshot
Id String - Snapshot that Amazon ECS uses to create the volume. You must specify either a
size_in_gb
or asnapshot_id
. - List<Property Map>
- The tags to apply to the volume. See below.
- throughput Number
- Throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.
- volume
Type String - Volume type.
ServiceVolumeConfigurationManagedEbsVolumeTagSpecification, ServiceVolumeConfigurationManagedEbsVolumeTagSpecificationArgs
- Resource
Type string - The type of volume resource. Valid values,
volume
. - string
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- Dictionary<string, string>
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
- Resource
Type string - The type of volume resource. Valid values,
volume
. - string
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- map[string]string
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
- resource
Type String - The type of volume resource. Valid values,
volume
. - String
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- Map<String,String>
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
- resource
Type string - The type of volume resource. Valid values,
volume
. - string
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- {[key: string]: string}
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
- resource_
type str - The type of volume resource. Valid values,
volume
. - str
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- Mapping[str, str]
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
- resource
Type String - The type of volume resource. Valid values,
volume
. - String
- Determines whether to propagate the tags from the task definition to the Amazon EBS volume.
- Map<String>
- The tags applied to this Amazon EBS volume.
AmazonECSCreated
andAmazonECSManaged
are reserved tags that can't be used.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.