Skip to content

Commit

Permalink
[ECS] Enabled to configure/update PropagateTags and `EnableECSManag…
Browse files Browse the repository at this point in the history
…edTags` (#5425)

* Enable updating PropagateTags and specifying other than SERVICE

Signed-off-by: t-kikuc <[email protected]>

* Enable updating EnableECSManagedTags

Signed-off-by: t-kikuc <[email protected]>

* Remove default PropagateTags: unnecessary

Signed-off-by: t-kikuc <[email protected]>

* support propagateTags other than SERVICE

Signed-off-by: t-kikuc <[email protected]>

---------

Signed-off-by: t-kikuc <[email protected]>
  • Loading branch information
t-kikuc authored Dec 17, 2024
1 parent 149078a commit d38cc20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ There are some restrictions in configuring a service definition file.
- `deploymentController` is required and must be `EXTERNAL`.
- `loadBalancers` is not supported. Use `targetGroups` in [ECSDeploymentInput](#ecsdeploymentinput) instead.
- `platformFamily` is not supported.
- `propagateTags` is always set as `SERVICE`.
- `taskDefinition` is not supported. PipeCD uses the definition in `taskDefinitionFile` in [ECSDeploymentInput](#ecsdeploymentinput).

### Restrictions of Task Definition
Expand Down
4 changes: 3 additions & 1 deletion pkg/app/piped/platformprovider/ecs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (c *client) CreateService(ctx context.Context, service types.Service) (*typ
PlacementConstraints: service.PlacementConstraints,
PlacementStrategy: service.PlacementStrategy,
PlatformVersion: service.PlatformVersion,
PropagateTags: types.PropagateTagsService,
PropagateTags: service.PropagateTags,
Role: service.RoleArn,
SchedulingStrategy: service.SchedulingStrategy,
Tags: service.Tags,
Expand Down Expand Up @@ -143,6 +143,8 @@ func (c *client) UpdateService(ctx context.Context, service types.Service) (*typ
PlacementStrategy: service.PlacementStrategy,
// TODO: Support update other properties of service.
// PlacementConstraints: service.PlacementConstraints,
PropagateTags: service.PropagateTags,
EnableECSManagedTags: aws.Bool(service.EnableECSManagedTags),
}

// If desiredCount is 0 or not set, keep current desiredCount because a user might use AutoScaling.
Expand Down

0 comments on commit d38cc20

Please sign in to comment.