Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of renaming an DB Instance #8904

Closed
stack72 opened this issue Jun 7, 2019 · 2 comments
Closed

Possibility of renaming an DB Instance #8904

stack72 opened this issue Jun 7, 2019 · 2 comments
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com.

Comments

@stack72
Copy link
Contributor

stack72 commented Jun 7, 2019

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...

@stack72 stack72 added the question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. label Jun 7, 2019
@bflad
Copy link
Contributor

bflad commented Jun 10, 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. 👍

@bflad bflad closed this as completed Jun 10, 2019
@ghost
Copy link

ghost commented Nov 3, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com.
Projects
None yet
Development

No branches or pull requests

2 participants