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

Deprecated google.account_file still necessary for google_compute_project_metadata? #4033

Closed
beldur opened this issue Nov 24, 2015 · 8 comments · Fixed by #4193
Closed

Deprecated google.account_file still necessary for google_compute_project_metadata? #4033

beldur opened this issue Nov 24, 2015 · 8 comments · Fixed by #4193

Comments

@beldur
Copy link

beldur commented Nov 24, 2015

After updating to the new Terraform Version 0.6.7 and replacing the account_file property with credentials, I get the following warning:

provider.google.account_file
Enter a value: 

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

I tracked it down to the google_compute_project_metadata resource. The following code is my tf file. And as soon as the google_compute_project_metadata is commented out, the warning disappears.

provider "google" {
    credentials = "${file("path/to/file.json")}"
    project = "myproject"
    region = "europe-west1"
}

resource "google_compute_project_metadata" "default" {
    metadata { foo = "bar" }
}
@ajcrowe
Copy link

ajcrowe commented Nov 25, 2015

This is also affecting me, I've not got the metadata resource like @beldur, I see it a module with just google_compute_firewall resources. This appears to be mentioned in #3901 as a potential problem, which appears it is.

@acondrat
Copy link

I'm having the same problem but I'm using it with google_dns_managed_zone and google_dns_record_set resources.

@lwander
Copy link
Contributor

lwander commented Dec 1, 2015

Very odd, I'll look into this soon.

@coreone
Copy link
Contributor

coreone commented Dec 7, 2015

I have seen this bug as well. To get around it, I just keep account_file in there set to nothing:

provider "google" {
    account_file = ""
    credentials = "${file("path/to/file.json")}"
    project = "myproject"
    region = "europe-west1"
}

Still throws a warning, but it prevents the Enter a value: prompt, and allows Atlas to keep working.

@lwander
Copy link
Contributor

lwander commented Dec 7, 2015

Both credentials and account file are marked as optional here. @phinze, @jen20, any idea why Terraform would prompt you to enter an optional value?

@phinze
Copy link
Contributor

phinze commented Dec 7, 2015

@coreone Atlas should be setting -input=false, were you still seeing prompts there?

@lwander hm, I'm not sure offhand. Will have to dig in and get back to you.

@phinze
Copy link
Contributor

phinze commented Dec 7, 2015

Yep looks like providers are dumber about Input() than I thought.

Enhancements to input are being discussed over in https://github.com/hashicorp/terraform/issues/1255, but for this I'll just PR to always skip input on Deprecated fields.

@ghost
Copy link

ghost commented Apr 29, 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 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants