Skip to content

Commit c149136

Browse files
committed
add support for configuring the ECS service discovery TTL via config discoveryTTL
1 parent bf845a1 commit c149136

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

common/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ type Service struct {
122122
Database Database `yaml:"database,omitempty"`
123123
Schedule []Schedule `yaml:"schedules,omitempty"`
124124
TargetCPUUtilization int `yaml:"targetCPUUtilization,omitempty"`
125+
DiscoveryTTL string `yaml:"discoveryTTL,omitempty"`
125126
Roles struct {
126127
Ec2Instance string `yaml:"ec2Instance,omitempty"`
127128
CodeDeploy string `yaml:"codeDeploy,omitempty"`

workflows/service_deploy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ func (workflow *serviceWorkflow) serviceApplyEcsParams(service *common.Service,
119119
params["ElbSecurityGroup"] = fmt.Sprintf("%s-InstanceSecurityGroup", workflow.lbStack.Name)
120120
params["ServiceDiscoveryId"] = fmt.Sprintf("%s-ServiceDiscoveryId", workflow.lbStack.Name)
121121
params["ServiceDiscoveryName"] = fmt.Sprintf("%s-ServiceDiscoveryName", workflow.lbStack.Name)
122+
if service.DiscoveryTTL != "" {
123+
params["ServiceDiscoveryTTL"] = service.DiscoveryTTL
124+
}
122125
params["ImageUrl"] = workflow.serviceImage
123126

124127
cpu := common.CPUMemorySupport[0]

0 commit comments

Comments
 (0)