terraform-provider-shell icon indicating copy to clipboard operation
terraform-provider-shell copied to clipboard

Update semantics - is there a way to to replay replacement details?

Open cveld opened this issue 2 years ago • 0 comments

Is there a way to relay to the terraform cli that a particular change on an input is triggering a replacement?

E.g. current state:

{
   "id": 3,
   "somereference": 4
}

The user changes somereference from 4 to 5 and runs a plan:

Message:

{
   "id": 3,
   "somereference": 4 -> 5 # causes replacement
}

In the current version I am using, I only see two ways:

  1. the read operation could return an error, faking that the resource does not exist and must be created freshly. Downside is that the original resource is not removed
  2. the update operation could replace the resource transparently. downside would be that the user is not expecting this based on the generated plan

Provider version: 1.7.10 terraform cli version: 1.4.6

cveld avatar May 08 '23 09:05 cveld