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

Improve documentation around using remote backends such as Consul #891

Closed
devcamcar opened this Issue Jan 29, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@devcamcar

devcamcar commented Jan 29, 2015

I am currently trying to figure out how to get Terraform's Consul remote to function, but I've found it confusing to get working. For instance, I try:

terraform remote -backend=consul -address=consul.mydomain.com:8500 -path=terraform
terraform plan

Refreshing Terraform state prior to plan...

Error refreshing state: Get /: unsupported protocol scheme ""

So then I try:

terraform remote -backend=consul -address=http://consul.mydomain.com:8500 -path=terraform
terraform plan
Failed to refresh state: Failed to read remote state: Get http://https://consul.nebula.com:8500/v1/kv/terraform/devcamcar: dial tcp: too many colons in address https://consul.mydomain.com:8500

Okay... so then I try:

terraform remote -backend=consul -address=http://consul.mydomain.com -path=terraform
terraform plan
Failed to refresh state: Failed to read remote state: Get http://consul.mydomain.com/v1/kv/terraform: dial tcp 10.[redacted]:80: connection refused

So basically the parser won't let me add the port number because it thinks there are too many colons. Also worth noting if you don't specify -address at all, then you get this, which shows the url (with localhost replaced obviously) as having http:// and :8500.

terraform remote -backend=consul -path=terraform
terraform apply
Failed to refresh state: Failed to read remote state: Get http://127.0.0.1:8500/v1/kv/terraform: dial tcp 127.0.0.1:8500: connection refused
@devcamcar

This comment has been minimized.

Show comment
Hide comment
@devcamcar

devcamcar Jan 29, 2015

Figured out that the error "Error refreshing state: Get /: unsupported protocol scheme" was really coming from an experimental OpenStack provider. Closing this ticket.

devcamcar commented Jan 29, 2015

Figured out that the error "Error refreshing state: Get /: unsupported protocol scheme" was really coming from an experimental OpenStack provider. Closing this ticket.

@devcamcar devcamcar closed this Jan 29, 2015

@strarsis

This comment has been minimized.

Show comment
Hide comment
@strarsis

strarsis Jan 23, 2016

Thanks, this was very helpful for me as I left the token just empty (for dev)
and got the same error message with consul-template.

strarsis commented Jan 23, 2016

Thanks, this was very helpful for me as I left the token just empty (for dev)
and got the same error message with consul-template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment