Closed saulortega closed 1 year ago
@saulortega as you discovered, the API has to been enabled before it can be used for your account. This is the behavior across the board. Did you a case where enabling api is not required?
And, yes, I don't have that API enabled, but is it necessary? Why is Terraform trying to access that API?
Here: https://github.com/hashicorp/terraform-provider-google/issues/13120
Same project, same user account. That import didn't requiere enabling billing API.
Why Is it required in Hosting Site?
@saulortega sorry I don't follow your comment below. What resource did you refer to? What import command did you use?
That import didn't requiere enabling billing API.
Before you run import, assume the resources were already created. How these resources were created when the related service (api) were not enabled? Can you explain?
In most cases, the import
shares the logic of read
. Without the api enabled, I am not sure how the api can serve the calls. Do you have answers?
I am not sure what you mean about the Hosting Site
below. Explain?
Why Is it required in Hosting Site?
I'm trying to import a Firebase Hosting Site.
Why need I Billing API enabled for importing Firebase Hosting Site?
@saulortega needing the Billing API enabled is required by API. Looking at the log, you may see that. The provider has no control over it.
Why need I Billing API enabled for importing Firebase Hosting Site?
Are you able to create a Firebase Hosting Site without Billing API enabled? Create and Read (Import) should be the same for APIs, the difference between them is the permission difference for the Terraform runner. Does that make sense?
@saulortega not sure how this code can be related to your question below.
Why need I Billing API enabled for importing Firebase Hosting Site?
I don't think you can import a resource if the resource does not existing. Back to my original question, are you able to create google_firebase_hosting_site
without the Billing API enabled?
Keep in mind, for some resources, they may need more than one API enabled. Does this make sense?
No, that doesn't make sense. Billing API is not required.
I just realized this resource works only with google-beta
provider.
Import works with google-beta
provider, without Billing API enabled.
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.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Description
I'm trying to import a Firebase site, but I'm getting the error
Error: unknown resource type: google_firebase_hosting_site
. In the debug is shown that Terraform is trying to doGET /v1/projects/PPPPPPPPPPPPP/billingInfo
. And, yes, I don't have that API enabled, but is it necessary? Why is Terraform trying to access that API?Terraform Version
Terraform v1.3.6 on linux_amd64 + provider registry.terraform.io/hashicorp/google v4.44.1
Affected Resource(s)
google_firebase_hosting_site
Terraform Configuration Files
Debug Output