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

Authorization failure when provider configured in root module #418

Closed
ndarilek opened this issue Oct 16, 2014 · 2 comments
Closed

Authorization failure when provider configured in root module #418

ndarilek opened this issue Oct 16, 2014 · 2 comments

Comments

@ndarilek
Copy link
Contributor

I had a Terraform configuration I found myself using regularly, so I tried to extract it to https://thewordnerd.info/scm/terraform/coreos_droplet.

If I do something like:

variable "do_token" { }

variable "key_file" {
  default = "~/.ssh/id_rsa"
}

variable "ssh_key_id" { }

provider "digitalocean" {
  token = "${var.do_token}"
}

module "coreos_droplet" {
  source = "git::https://thewordnerd.info/scm/terraform/coreos_droplet"
  name = "perceptronapp.com"
  size = "1gb"
  key_file = "${var.key_file}"
  ssh_key_id = "${var.ssh_key_id}"
}

I get a 401 authorization failure. It looks like I'm configuring the provider so I'm unsure as to what is happening here.

I've double checked that the token works as well.

Thanks.

@mitchellh
Copy link
Contributor

Thanks, I'll take a look and try this.

@mitchellh
Copy link
Contributor

Fixed. Good catch. It was an edge case around inherited providers who use variables as input.

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

No branches or pull requests

2 participants