You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been looking at how Terraform could allow the functionality (that the AWS console allows) of renaming DB Instances.
Basically, the problem is that the ID of the resource is set as the DB Instance Identifier, therefore if that identifier changes then Terraform will ForceNew. Which is as expected. All read operations use d.Id() as the DB Identifier to pass to the API.
Do you think it's even possible to implement functionality because of how d.Id() is used for reads or should we just not even explore the possibility? I remember when I was working at HashiCorp, I looked into this but I can't remember why I abandoned the attempt...
The text was updated successfully, but these errors were encountered:
stack72
added
the
question
A question about existing functionality; most questions are re-routed to discuss.hashicorp.com.
label
Jun 7, 2019
Off the top of my head, I know there are a few resources that implement d.SetId(/* new ID */) when an update requires a change to the resource identifier, but I'm not sure of the caveats. 😄 I do not remember seeing adverse affects and the Go documentation for the function does not call out anything, but that certainly does not mean its 100% supported.
We actually do have an (old!) existing feature request for this, #507, so my suggestion is if we are wanting to go down this route, to further track this there. I'm going to proactively close this issue in preference of that one. 👍
I have been looking at how Terraform could allow the functionality (that the AWS console allows) of renaming DB Instances.
Basically, the problem is that the ID of the resource is set as the DB Instance Identifier, therefore if that identifier changes then Terraform will ForceNew. Which is as expected. All read operations use
d.Id()
as the DB Identifier to pass to the API.Do you think it's even possible to implement functionality because of how
d.Id()
is used for reads or should we just not even explore the possibility? I remember when I was working at HashiCorp, I looked into this but I can't remember why I abandoned the attempt...The text was updated successfully, but these errors were encountered: