Skip to content

Commit

Permalink
Merge pull request #709 from figma/jlee/backport
Browse files Browse the repository at this point in the history
BACKPORT hashicorp#27390 fix resource/aws_ecs_service: make task_definition truly optional
  • Loading branch information
jusunglee authored Oct 24, 2022
2 parents d7b68e0 + 01df56c commit 8e133b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/service/ecs/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ func resourceServiceCreate(d *schema.ResourceData, meta interface{}) error {
EnableExecuteCommand: aws.Bool(d.Get("enable_execute_command").(bool)),
}

if v, ok := d.GetOk("task_definition"); ok {
input.TaskDefinition = aws.String(v.(string))
}

if schedulingStrategy == ecs.SchedulingStrategyDaemon && deploymentMinimumHealthyPercent != 100 {
input.DeploymentConfiguration = &ecs.DeploymentConfiguration{
MinimumHealthyPercent: aws.Int64(int64(deploymentMinimumHealthyPercent)),
Expand Down

0 comments on commit 8e133b6

Please sign in to comment.