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

terraform remote: fix for state files containing an upper case remote type #1356

Merged
merged 1 commit into from
Apr 14, 2015
Merged

terraform remote: fix for state files containing an upper case remote type #1356

merged 1 commit into from
Apr 14, 2015

Conversation

koendc
Copy link

@koendc koendc commented Apr 1, 2015

Terraform 0.3.7 saved the remote type in the state as it was passed on the command line. The current code expects lower case remote types. This error appears after a terraform upgrade to master:

$ terraform remote pull
Failed to read state: Error initializing remote driver 'Consul': unknown remote client type: Consul

This change makes state files created by older versions of terraform usable again.

If the cached state file contains a remote type field with upper case
characters, eg 'Consul', it was no longer possible to find the 'consul'
remote plugin.
@koendc koendc changed the title Handles upper case characters in the cached state file's remote type terraform remote: fix for state files containing an upper case remote type Apr 1, 2015
@phinze
Copy link
Contributor

phinze commented Apr 1, 2015

Thanks for this!

The downcase seems okay to me, but going to let @mitchellh chime in here in case he has a better solution in mind. 👍

@mitchellh
Copy link
Contributor

Ah, yeah. I added the downcase to the CLI but not here. I think this can be unit tested as well. I'll add the test and CC you.

mitchellh added a commit that referenced this pull request Apr 14, 2015
command/state: fix for state files containing an upper case remote type
@mitchellh mitchellh merged commit e91b513 into hashicorp:master Apr 14, 2015
@ghost
Copy link

ghost commented May 3, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants