Open creeder-uturn opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Additional finding around this feature: if you flip force_new_deployment
to false in the above test, apply, then flip it back to true, you get:
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for aws_ecs_service.main 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("2023-02-03T17:53:36Z"), but now cty.StringVal("2023-02-03T18:08:09Z").
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
I'm facing the same issue. A change in triggers is not detected during plan or apply. Also when trying apply multiple times, I ended up in this error
When expanding the plan for aws_ecs_service.main 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("2023-02-03T17:53:36Z"), but now cty.StringVal("2023-02-03T18:08:09Z").
This looks like a duplicate of https://github.com/hashicorp/terraform-provider-aws/issues/28070
I found a workaround for this.
variable "timestamp_id" {
type = string
default = ""
}
-var="timestamp_id=$(date)
force_new_deployment = true
triggers = {
redeployment = var.timestamp_id
}
I am encountering this same problem.
Error: Provider produced inconsistent final plan │ │ When expanding the plan for │ module.ecs.aws_ecs_service.instance["main"] 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("2023-05-02T16:13:05Z"), but now │ cty.StringVal("2023-05-02T17:01:34Z"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
My Terraform Apply's are all pipelined, so adding a workaround is not ideal.
I am encountering this same problem.
Error: Provider produced inconsistent final plan │ │ When expanding the plan for │ module.ecs.aws_ecs_service.instance["main"] 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("2023-05-02T16:13:05Z"), but now │ cty.StringVal("2023-05-02T17:01:34Z"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
My Terraform Apply's are all pipelined, so adding a workaround is not ideal.
Same issue here
It's works fine for me.
triggers = {
redeployment = plantimestamp()
}
Right, it works for plantimestamp()
, but I wanted to make it redeploy on config change.
Something along the lines of:
triggers = {
redeployment = filesha256("${path.module}/files/service-config.yml")
}
Does not seem to work
Terraform Core Version
1.2.9, 1.3.7
AWS Provider Version
4.40.0, 4.53.0
Affected Resource(s)
aws_ecs_service
Expected Behavior
When using the
triggers = {}
parameter (introduced here: https://github.com/hashicorp/terraform-provider-aws/pull/25840), changes to the triggers should result in a change in the terraform resource.Actual Behavior
Changing the
triggers = {}
, including complete removal, results in no difference in planRelevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Apply the above terraform. Apply again. timestamp() should result in triggers changing. It does not.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
This seems to be when this feature was introduced, and as far as I can tell it has never worked: https://github.com/hashicorp/terraform-provider-aws/pull/25840
Would you like to implement a fix?
No