Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS CodeDeploy DeploymentGroup TargetGroupInfo

The TargetGroupInfo property type specifies information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group. For more information, see TargetGroupInfo in the AWS CodeDeploy API Reference

If you specify the TargetGroupInfo property, the DeploymentStyle.DeploymentOption property must be set to WITH_TRAFFIC_CONTROL for AWS CodeDeploy to route your traffic using the specified target groups.

TargetGroupInfo is a property of the AWS CodeDeploy DeploymentGroup LoadBalancerInfo property type.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Name" : String }

YAML

Copy
Name: String

Properties

Name

For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes. No duplicates allowed.

Note

Currently, AWS CloudFormation only supports IN_PLACE deployment types.

This value can't exceed 32 characters, so you should use the Name property of the target group, or the TargetGroupName attribute with the Fn::GetAtt intrinsic function, as shown in the following example. Don't use the group's Amazon Resource Name (ARN) or TargetGroupFullName attribute.

Required: No

Type: String

Update requires: No interruption

Example

The following snippet gets the name of the target group, which AWS CodeDeploy uses to register and deregister instances from the target group during deployments.

JSON

Copy
"LoadBalancerInfo" : { "TargetGroupInfoList" : [ { "Name": { "Fn::GetAtt": ["MyTargetGroup", "TargetGroupName"] } } ] }

YAML

Copy
LoadBalancerInfo: TargetGroupInfoList: - Name: !GetAtt MyTargetGroup.TargetGroupName

On this page: