connState := ctx.Value(schema.ProvRawStateKey).(*terraform.InstanceState) instance := connState.ID o.Output(fmt.Sprintf("Connstate: %+v\n", connState)) o.Output(fmt.Sprintf("Connstate: %v\n", connState.ID)) o.Output(fmt.Sprintf("d: %+v\n", d))
We have had this code when it was terraform 11.x I have searched everywhere for any migration documentation for provisioners and haven’t found anything. After updating this provisioners dependencies to 12. This part fails due to connState.ID not being defined. In fact, the value of connState is “not created” which can’t be possible if this provisioner is triggered when we successfully create the resource it’s operating on, right?
Any idea how to debug this? AFAIK, the type of “instanceState” still contains an ID field.