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

Asking for both provider.google.account_file and provider.google.credentials #4537

Closed
dvusboy opened this issue Jan 7, 2016 · 3 comments
Closed

Comments

@dvusboy
Copy link

dvusboy commented Jan 7, 2016

I'm testing a downloaded terraform 0.6.8 and unlike what is stated in the documentation, when I test with this configuration file, using GCP:

# Configure the Google Cloud provider
variable "cred_path" {
  default = "/run/terraform/.account.json"
}

provider "google" {
  credentials = "${file(var.cred_path)}"
  project     = "verseon-csg"
  region      = "us-central1"
}

# Create a new instance
resource "google_compute_instance" "default" {
  name = "test"
  machine_type = "n1-standard-1"
  zone = "us-central1-a"

  disk {
      image = "centos-7-v20151104"
  }

  // Local SSD disk
  disk {
      type = "local-ssd"
      scratch = true
  }

  network_interface {
      network = "default"
      access_config {
          // Ephemeral IP
      }
  }
}

I will get a prompt to provide a value for provider.google.account_file like this:

[root@53ef07420f43 terraform]# terraform plan
provider.google.account_file
  Enter a value:

Instead, both credentials and account_file need to be there in the configuration file. And then I get this output from terraform plan:

[root@53ef07420f43 terraform]# terraform plan
There are warnings and/or errors related to your configuration. Please
fix these before continuing.

Warnings:

  * provider.google: "account_file": [DEPRECATED] Use the credentials field instead

No errors found. Continuing with 1 warning(s).

Refreshing Terraform state prior to plan...


The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.

Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.

+ google_compute_instance.default
    can_ip_forward:                             "" => "0"
    disk.#:                                     "" => "2"
    disk.0.auto_delete:                         "" => "1"
    disk.0.image:                               "" => "centos-7-v20151104"
    disk.1.auto_delete:                         "" => "1"
    disk.1.scratch:                             "" => "1"
    disk.1.type:                                "" => "local-ssd"
    machine_type:                               "" => "n1-standard-1"
    metadata_fingerprint:                       "" => "<computed>"
    name:                                       "" => "test"
    network_interface.#:                        "" => "1"
    network_interface.0.access_config.#:        "" => "1"
    network_interface.0.access_config.0.nat_ip: "" => "<computed>"
    network_interface.0.address:                "" => "<computed>"
    network_interface.0.name:                   "" => "<computed>"
    network_interface.0.network:                "" => "default"
    self_link:                                  "" => "<computed>"
    tags_fingerprint:                           "" => "<computed>"
    zone:                                       "" => "us-central1-a"

Note the warning message.

@phinze
Copy link
Contributor

phinze commented Jan 7, 2016

Hi there - thanks for the report, this was also reported as #4033 and was fixed in #4193. Terraform 0.6.9 will have the fix!

In the meantime, you can work around the extra input request without a deprecation warning by using -input=false or TF_INPUT=0.

@phinze phinze closed this as completed Jan 7, 2016
@ghost
Copy link

ghost commented Jul 24, 2016

It's 7+ months later and this is still not fixed.

@ghost
Copy link

ghost commented Apr 24, 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 Apr 24, 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

No branches or pull requests

2 participants