Service

Note: To prevent a race condition during service deletion, make sure to set depends_on to the related aws.iam.RolePolicy; otherwise, the policy may be destroyed too soon and the ECS service will then get stuck in the DRAINING state.

Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).

See ECS Services section in AWS developer guide.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var mongo = new Aws.Ecs.Service("mongo", new Aws.Ecs.ServiceArgs
        {
            Cluster = aws_ecs_cluster.Foo.Id,
            TaskDefinition = aws_ecs_task_definition.Mongo.Arn,
            DesiredCount = 3,
            IamRole = aws_iam_role.Foo.Arn,
            OrderedPlacementStrategies = 
            {
                new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
                {
                    Type = "binpack",
                    Field = "cpu",
                },
            },
            LoadBalancers = 
            {
                new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
                {
                    TargetGroupArn = aws_lb_target_group.Foo.Arn,
                    ContainerName = "mongo",
                    ContainerPort = 8080,
                },
            },
            PlacementConstraints = 
            {
                new Aws.Ecs.Inputs.ServicePlacementConstraintArgs
                {
                    Type = "memberOf",
                    Expression = "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                "aws_iam_role_policy.foo",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
            Cluster:        pulumi.String(aws_ecs_cluster.Foo.Id),
            TaskDefinition: pulumi.String(aws_ecs_task_definition.Mongo.Arn),
            DesiredCount:   pulumi.Int(3),
            IamRole:        pulumi.String(aws_iam_role.Foo.Arn),
            OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
                &ecs.ServiceOrderedPlacementStrategyArgs{
                    Type:  pulumi.String("binpack"),
                    Field: pulumi.String("cpu"),
                },
            },
            LoadBalancers: ecs.ServiceLoadBalancerArray{
                &ecs.ServiceLoadBalancerArgs{
                    TargetGroupArn: pulumi.String(aws_lb_target_group.Foo.Arn),
                    ContainerName:  pulumi.String("mongo"),
                    ContainerPort:  pulumi.Int(8080),
                },
            },
            PlacementConstraints: ecs.ServicePlacementConstraintArray{
                &ecs.ServicePlacementConstraintArgs{
                    Type:       pulumi.String("memberOf"),
                    Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
                },
            },
        }, pulumi.DependsOn([]pulumi.Resource{
            "aws_iam_role_policy.foo",
        }))
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

mongo = aws.ecs.Service("mongo",
    cluster=aws_ecs_cluster["foo"]["id"],
    task_definition=aws_ecs_task_definition["mongo"]["arn"],
    desired_count=3,
    iam_role=aws_iam_role["foo"]["arn"],
    ordered_placement_strategies=[{
        "type": "binpack",
        "field": "cpu",
    }],
    load_balancers=[{
        "target_group_arn": aws_lb_target_group["foo"]["arn"],
        "container_name": "mongo",
        "containerPort": 8080,
    }],
    placement_constraints=[{
        "type": "memberOf",
        "expression": "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
    }],
    opts=ResourceOptions(depends_on=["aws_iam_role_policy.foo"]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const mongo = new aws.ecs.Service("mongo", {
    cluster: aws_ecs_cluster.foo.id,
    taskDefinition: aws_ecs_task_definition.mongo.arn,
    desiredCount: 3,
    iamRole: aws_iam_role.foo.arn,
    orderedPlacementStrategies: [{
        type: "binpack",
        field: "cpu",
    }],
    loadBalancers: [{
        targetGroupArn: aws_lb_target_group.foo.arn,
        containerName: "mongo",
        containerPort: 8080,
    }],
    placementConstraints: [{
        type: "memberOf",
        expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
    }],
}, {
    dependsOn: ["aws_iam_role_policy.foo"],
});

Ignoring Changes to Desired Count

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

example = aws.ecs.Service("example",
    desired_count=2,
    lifecycle={
        "ignoreChanges": ["desiredCount"],
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ecs.Service("example", {
    // Example: Create service with 2 instances to start
    desiredCount: 2,
}, { ignoreChanges: ["desiredCount"] });

Daemon Scheduling Strategy

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var bar = new Aws.Ecs.Service("bar", new Aws.Ecs.ServiceArgs
        {
            Cluster = aws_ecs_cluster.Foo.Id,
            SchedulingStrategy = "DAEMON",
            TaskDefinition = aws_ecs_task_definition.Bar.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecs.NewService(ctx, "bar", &ecs.ServiceArgs{
            Cluster:            pulumi.String(aws_ecs_cluster.Foo.Id),
            SchedulingStrategy: pulumi.String("DAEMON"),
            TaskDefinition:     pulumi.String(aws_ecs_task_definition.Bar.Arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

bar = aws.ecs.Service("bar",
    cluster=aws_ecs_cluster["foo"]["id"],
    scheduling_strategy="DAEMON",
    task_definition=aws_ecs_task_definition["bar"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const bar = new aws.ecs.Service("bar", {
    cluster: aws_ecs_cluster_foo.id,
    schedulingStrategy: "DAEMON",
    taskDefinition: aws_ecs_task_definition_bar.arn,
});

External Deployment Controller

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ecs.Service("example", new Aws.Ecs.ServiceArgs
        {
            Cluster = aws_ecs_cluster.Example.Id,
            DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
            {
                Type = "EXTERNAL",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ecs"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
            Cluster: pulumi.String(aws_ecs_cluster.Example.Id),
            DeploymentController: &ecs.ServiceDeploymentControllerArgs{
                Type: pulumi.String("EXTERNAL"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ecs.Service("example",
    cluster=aws_ecs_cluster["example"]["id"],
    deployment_controller={
        "type": "EXTERNAL",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ecs.Service("example", {
    cluster: aws_ecs_cluster_example.id,
    deploymentController: {
        type: "EXTERNAL",
    },
});

Create a Service Resource

new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
def Service(resource_name, opts=None, capacity_provider_strategies=None, cluster=None, deployment_controller=None, deployment_maximum_percent=None, deployment_minimum_healthy_percent=None, desired_count=None, enable_ecs_managed_tags=None, force_new_deployment=None, health_check_grace_period_seconds=None, iam_role=None, launch_type=None, load_balancers=None, name=None, network_configuration=None, ordered_placement_strategies=None, placement_constraints=None, platform_version=None, propagate_tags=None, scheduling_strategy=None, service_registries=None, tags=None, task_definition=None, wait_for_steady_state=None, __props__=None);
func NewService(ctx *Context, name string, args *ServiceArgs, opts ...ResourceOption) (*Service, error)
public Service(string name, ServiceArgs? args = null, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Service Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Service resource accepts the following input properties:

CapacityProviderStrategies List<ServiceCapacityProviderStrategyArgs>

The capacity provider strategy to use for the service. Can be one or more. Defined below.

Cluster string

ARN of an ECS cluster

DeploymentController ServiceDeploymentControllerArgs

Configuration block containing deployment controller configuration. Defined below.

DeploymentMaximumPercent int

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

DeploymentMinimumHealthyPercent int

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

DesiredCount int

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

EnableEcsManagedTags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

ForceNewDeployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

HealthCheckGracePeriodSeconds int

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.

IamRole 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 using awsvpc 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.

LaunchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

LoadBalancers List<ServiceLoadBalancerArgs>

A load balancer block. Load balancers documented below.

Name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

NetworkConfiguration ServiceNetworkConfigurationArgs

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

OrderedPlacementStrategies List<ServiceOrderedPlacementStrategyArgs>

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 of ordered_placement_strategy blocks is 5. Defined below.

PlacementConstraints List<ServicePlacementConstraintArgs>

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 of placement_constraints is 10. Defined below.

PlatformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

PropagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

SchedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

ServiceRegistries ServiceServiceRegistriesArgs

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

Tags Dictionary<string, string>

Key-value map of resource tags

TaskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

WaitForSteadyState bool
CapacityProviderStrategies []ServiceCapacityProviderStrategy

The capacity provider strategy to use for the service. Can be one or more. Defined below.

Cluster string

ARN of an ECS cluster

DeploymentController ServiceDeploymentController

Configuration block containing deployment controller configuration. Defined below.

DeploymentMaximumPercent int

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

DeploymentMinimumHealthyPercent int

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

DesiredCount int

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

EnableEcsManagedTags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

ForceNewDeployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

HealthCheckGracePeriodSeconds int

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.

IamRole 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 using awsvpc 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.

LaunchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

LoadBalancers []ServiceLoadBalancer

A load balancer block. Load balancers documented below.

Name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

NetworkConfiguration ServiceNetworkConfiguration

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

OrderedPlacementStrategies []ServiceOrderedPlacementStrategy

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 of ordered_placement_strategy blocks is 5. Defined below.

PlacementConstraints []ServicePlacementConstraint

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 of placement_constraints is 10. Defined below.

PlatformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

PropagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

SchedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

ServiceRegistries ServiceServiceRegistries

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

Tags map[string]string

Key-value map of resource tags

TaskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

WaitForSteadyState bool
capacityProviderStrategies ServiceCapacityProviderStrategy[]

The capacity provider strategy to use for the service. Can be one or more. Defined below.

cluster string

ARN of an ECS cluster

deploymentController ServiceDeploymentController

Configuration block containing deployment controller configuration. Defined below.

deploymentMaximumPercent number

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

deploymentMinimumHealthyPercent number

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

desiredCount number

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

enableEcsManagedTags boolean

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

forceNewDeployment boolean

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

healthCheckGracePeriodSeconds number

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.

iamRole 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 using awsvpc 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.

launchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

loadBalancers ServiceLoadBalancer[]

A load balancer block. Load balancers documented below.

name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

networkConfiguration ServiceNetworkConfiguration

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

orderedPlacementStrategies ServiceOrderedPlacementStrategy[]

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 of ordered_placement_strategy blocks is 5. Defined below.

placementConstraints ServicePlacementConstraint[]

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 of placement_constraints is 10. Defined below.

platformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

propagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

schedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

serviceRegistries ServiceServiceRegistries

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

tags {[key: string]: string}

Key-value map of resource tags

taskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

waitForSteadyState boolean
capacity_provider_strategies List[ServiceCapacityProviderStrategy]

The capacity provider strategy to use for the service. Can be one or more. Defined below.

cluster str

ARN of an ECS cluster

deployment_controller Dict[ServiceDeploymentController]

Configuration block containing deployment controller configuration. Defined below.

deployment_maximum_percent float

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

deployment_minimum_healthy_percent float

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

desired_count float

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

enable_ecs_managed_tags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

force_new_deployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

health_check_grace_period_seconds float

Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

iam_role 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 using awsvpc 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

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

load_balancers List[ServiceLoadBalancer]

A load balancer block. Load balancers documented below.

name str

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

network_configuration Dict[ServiceNetworkConfiguration]

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

ordered_placement_strategies List[ServiceOrderedPlacementStrategy]

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 of ordered_placement_strategy blocks is 5. Defined below.

placement_constraints List[ServicePlacementConstraint]

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 of placement_constraints is 10. Defined below.

platform_version str

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

propagate_tags str

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

scheduling_strategy str

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

service_registries Dict[ServiceServiceRegistries]

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

tags Dict[str, str]

Key-value map of resource tags

task_definition str

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

wait_for_steady_state bool

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.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, capacity_provider_strategies=None, cluster=None, deployment_controller=None, deployment_maximum_percent=None, deployment_minimum_healthy_percent=None, desired_count=None, enable_ecs_managed_tags=None, force_new_deployment=None, health_check_grace_period_seconds=None, iam_role=None, launch_type=None, load_balancers=None, name=None, network_configuration=None, ordered_placement_strategies=None, placement_constraints=None, platform_version=None, propagate_tags=None, scheduling_strategy=None, service_registries=None, tags=None, task_definition=None, wait_for_steady_state=None, __props__=None);
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)
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.

The following state arguments are supported:

CapacityProviderStrategies List<ServiceCapacityProviderStrategyArgs>

The capacity provider strategy to use for the service. Can be one or more. Defined below.

Cluster string

ARN of an ECS cluster

DeploymentController ServiceDeploymentControllerArgs

Configuration block containing deployment controller configuration. Defined below.

DeploymentMaximumPercent int

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

DeploymentMinimumHealthyPercent int

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

DesiredCount int

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

EnableEcsManagedTags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

ForceNewDeployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

HealthCheckGracePeriodSeconds int

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.

IamRole 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 using awsvpc 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.

LaunchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

LoadBalancers List<ServiceLoadBalancerArgs>

A load balancer block. Load balancers documented below.

Name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

NetworkConfiguration ServiceNetworkConfigurationArgs

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

OrderedPlacementStrategies List<ServiceOrderedPlacementStrategyArgs>

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 of ordered_placement_strategy blocks is 5. Defined below.

PlacementConstraints List<ServicePlacementConstraintArgs>

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 of placement_constraints is 10. Defined below.

PlatformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

PropagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

SchedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

ServiceRegistries ServiceServiceRegistriesArgs

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

Tags Dictionary<string, string>

Key-value map of resource tags

TaskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

WaitForSteadyState bool
CapacityProviderStrategies []ServiceCapacityProviderStrategy

The capacity provider strategy to use for the service. Can be one or more. Defined below.

Cluster string

ARN of an ECS cluster

DeploymentController ServiceDeploymentController

Configuration block containing deployment controller configuration. Defined below.

DeploymentMaximumPercent int

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

DeploymentMinimumHealthyPercent int

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

DesiredCount int

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

EnableEcsManagedTags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

ForceNewDeployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

HealthCheckGracePeriodSeconds int

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.

IamRole 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 using awsvpc 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.

LaunchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

LoadBalancers []ServiceLoadBalancer

A load balancer block. Load balancers documented below.

Name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

NetworkConfiguration ServiceNetworkConfiguration

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

OrderedPlacementStrategies []ServiceOrderedPlacementStrategy

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 of ordered_placement_strategy blocks is 5. Defined below.

PlacementConstraints []ServicePlacementConstraint

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 of placement_constraints is 10. Defined below.

PlatformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

PropagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

SchedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

ServiceRegistries ServiceServiceRegistries

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

Tags map[string]string

Key-value map of resource tags

TaskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

WaitForSteadyState bool
capacityProviderStrategies ServiceCapacityProviderStrategy[]

The capacity provider strategy to use for the service. Can be one or more. Defined below.

cluster string

ARN of an ECS cluster

deploymentController ServiceDeploymentController

Configuration block containing deployment controller configuration. Defined below.

deploymentMaximumPercent number

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

deploymentMinimumHealthyPercent number

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

desiredCount number

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

enableEcsManagedTags boolean

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

forceNewDeployment boolean

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

healthCheckGracePeriodSeconds number

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.

iamRole 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 using awsvpc 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.

launchType string

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

loadBalancers ServiceLoadBalancer[]

A load balancer block. Load balancers documented below.

name string

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

networkConfiguration ServiceNetworkConfiguration

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

orderedPlacementStrategies ServiceOrderedPlacementStrategy[]

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 of ordered_placement_strategy blocks is 5. Defined below.

placementConstraints ServicePlacementConstraint[]

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 of placement_constraints is 10. Defined below.

platformVersion string

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

propagateTags string

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

schedulingStrategy string

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

serviceRegistries ServiceServiceRegistries

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

tags {[key: string]: string}

Key-value map of resource tags

taskDefinition string

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

waitForSteadyState boolean
capacity_provider_strategies List[ServiceCapacityProviderStrategy]

The capacity provider strategy to use for the service. Can be one or more. Defined below.

cluster str

ARN of an ECS cluster

deployment_controller Dict[ServiceDeploymentController]

Configuration block containing deployment controller configuration. Defined below.

deployment_maximum_percent float

The upper limit (as a percentage of the service’s desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

deployment_minimum_healthy_percent float

The lower limit (as a percentage of the service’s desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

desired_count float

The number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

enable_ecs_managed_tags bool

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

force_new_deployment bool

Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

health_check_grace_period_seconds float

Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

iam_role 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 using awsvpc 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

The launch type on which to run your service. The valid values are EC2 and FARGATE. Defaults to EC2.

load_balancers List[ServiceLoadBalancer]

A load balancer block. Load balancers documented below.

name str

The name of the service (up to 255 letters, numbers, hyphens, and underscores)

network_configuration Dict[ServiceNetworkConfiguration]

The network configuration for the service. This parameter is required for task definitions that use the awsvpc network mode to receive their own Elastic Network Interface, and it is not supported for other network modes.

ordered_placement_strategies List[ServiceOrderedPlacementStrategy]

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 of ordered_placement_strategy blocks is 5. Defined below.

placement_constraints List[ServicePlacementConstraint]

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 of placement_constraints is 10. Defined below.

platform_version str

The platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

propagate_tags str

Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

scheduling_strategy str

The scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don’t support the DAEMON scheduling strategy.

service_registries Dict[ServiceServiceRegistries]

The service discovery registries for the service. The maximum number of service_registries blocks is 1.

tags Dict[str, str]

Key-value map of resource tags

task_definition str

The family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

wait_for_steady_state bool

Supporting Types

ServiceCapacityProviderStrategy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CapacityProvider string

The short name of the capacity provider.

Base int

The 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

The relative percentage of the total number of launched tasks that should use the specified capacity provider.

CapacityProvider string

The short name of the capacity provider.

Base int

The 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

The relative percentage of the total number of launched tasks that should use the specified capacity provider.

capacityProvider string

The short name of the capacity provider.

base number

The 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

The relative percentage of the total number of launched tasks that should use the specified capacity provider.

capacityProvider str

The short name of the capacity provider.

base float

The 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 float

The relative percentage of the total number of launched tasks that should use the specified capacity provider.

ServiceDeploymentController

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

ServiceLoadBalancer

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ContainerName string

The name of the container to associate with the load balancer (as it appears in a container definition).

ContainerPort int

The port on the container to associate with the load balancer.

ElbName string

The name of the ELB (Classic) to associate with the service.

TargetGroupArn string

The ARN of the Load Balancer target group to associate with the service.

ContainerName string

The name of the container to associate with the load balancer (as it appears in a container definition).

ContainerPort int

The port on the container to associate with the load balancer.

ElbName string

The name of the ELB (Classic) to associate with the service.

TargetGroupArn string

The ARN of the Load Balancer target group to associate with the service.

containerName string

The name of the container to associate with the load balancer (as it appears in a container definition).

containerPort number

The port on the container to associate with the load balancer.

elbName string

The name of the ELB (Classic) to associate with the service.

targetGroupArn string

The ARN of the Load Balancer target group to associate with the service.

containerPort float

The port on the container to associate with the load balancer.

container_name str

The name of the container to associate with the load balancer (as it appears in a container definition).

elbName str

The name of the ELB (Classic) to associate with the service.

target_group_arn str

The ARN of the Load Balancer target group to associate with the service.

ServiceNetworkConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Subnets List<string>

The subnets associated with the task or service.

AssignPublicIp bool

Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

SecurityGroups List<string>

The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

Subnets []string

The subnets associated with the task or service.

AssignPublicIp bool

Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

SecurityGroups []string

The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

subnets string[]

The subnets associated with the task or service.

assignPublicIp boolean

Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

securityGroups string[]

The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

subnets List[str]

The subnets associated with the task or service.

assignPublicIp bool

Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

security_groups List[str]

The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

ServiceOrderedPlacementStrategy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

The type of placement strategy. Must be one of: binpack, random, or spread

Field string

For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

Type string

The type of placement strategy. Must be one of: binpack, random, or spread

Field string

For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

type string

The type of placement strategy. Must be one of: binpack, random, or spread

field string

For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

type str

The type of placement strategy. Must be one of: binpack, random, or spread

field str

For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

ServicePlacementConstraint

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Type string

The type of constraint. The only valid values at this time are memberOf and distinctInstance.

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

The type of constraint. The only valid values at this time are memberOf and distinctInstance.

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

The type of constraint. The only valid values at this time are memberOf and distinctInstance.

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

The type of constraint. The only valid values at this time are memberOf and distinctInstance.

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.

ServiceServiceRegistries

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

RegistryArn string

The 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

ContainerName string

The container name value, already specified in the task definition, to be used for your service discovery service.

ContainerPort int

The port value, already specified in the task definition, to be used for your service discovery service.

Port int

The port value used if your Service Discovery service specified an SRV record.

RegistryArn string

The 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

ContainerName string

The container name value, already specified in the task definition, to be used for your service discovery service.

ContainerPort int

The port value, already specified in the task definition, to be used for your service discovery service.

Port int

The port value used if your Service Discovery service specified an SRV record.

registryArn string

The 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

containerName string

The container name value, already specified in the task definition, to be used for your service discovery service.

containerPort number

The port value, already specified in the task definition, to be used for your service discovery service.

port number

The port value used if your Service Discovery service specified an SRV record.

registryArn str

The 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

containerPort float

The port value, already specified in the task definition, to be used for your service discovery service.

container_name str

The container name value, already specified in the task definition, to be used for your service discovery service.

port float

The port value used if your Service Discovery service specified an SRV record.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.