Skip to content

[Bug]: When expanding the plan for aws_ecs_service.qa-ecs-service [...] provider aws produced an invalid new value for .triggers["redeployment"]: was cty.StringVal("2022-11-28T16:50:44Z"), but now │ cty.StringVal("2022-11-28T18:08:03Z"). #28070

@domvo

Description

@domvo

Terraform Core Version

v1.3.5

AWS Provider Version

v4.41.0

Affected Resource(s)

  • aws_ecs_service

Expected Behavior

Running apply multiple times with an aws_ecs_service that has force_new_deployment set to true should run a new deployment of the given ecs Service.

Actual Behavior

It shows an error and doesn't run apply (or when it applies, it doesn't do anything, because it says "No Changes").

Relevant Error/Panic Output Snippet

| Error: Provider produced inconsistent final plan
│
│ When expanding the plan for aws_ecs_service.qa-ecs-service to include new values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/aws" produced an invalid new value for .triggers["redeployment"]: was cty.StringVal("2022-11-28T16:50:44Z"), but now
│ cty.StringVal("2022-11-28T18:08:03Z").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.

Terraform Configuration Files

resource "aws_ecs_service" "qa-ecs-service" {
  name            = "qa-${var.pr_id}-ecs-service"
  cluster         = var.cluster_arn
  task_definition = aws_ecs_task_definition.qa-task-definition.arn
  desired_count   = 1
  launch_type     = "FARGATE"
  network_configuration {
    subnets       = var.subnets
    security_groups = var.security_groups
    assign_public_ip = true 
  }
  load_balancer {
    target_group_arn  = aws_lb_target_group.qa-target-group.arn
    container_name    = "qa-${var.pr_id}-container"
    container_port    = "8080"
  }
  force_new_deployment = true

  triggers = {
    redeployment = timestamp()
  }
}

Steps to Reproduce

  • terraform apply
  • terraform apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/ecsIssues and PRs that pertain to the ecs service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions