Closed aaron-tillekeratne closed 10 months ago
It looks like the URL is indeed incorrect: /v1/projects/projects/{project-name}/billingInfo/?alt=json
has two projects
in it. I suppose that it's because you should pass proj.project_id
(project name) instead of proj.id
(resource ID):
gcp.billing.ProjectInfo(
resource_name="billing-account-association",
billing_account=BILLING_ACCOUNT_ID,
project=proj.project_id, # here
opts=pulumi.ResourceOptions(depends_on=[billing_api]),
)
Could you please give it a try?
Hi @mikhailshilkov , yep you're correct. it should be proj.project_id
. It worked fine after that. Closing this one.
What happened?
Trying to enable billing on a newly created GCP project using gcp.billing.ProjectIinfo() returns `gcp:billing:ProjectInfo (billing-account-association): error: 1 error occurred:
404. That’s an error.
The requested URL
/v1/projects/projects/{project-name}/billingInfo/?alt=json
was not found on this server. That’s all we know.`Example
Output of
pulumi about
CLI
Version 3.84.0 Go Version go1.21.1 Go Compiler gc
Plugins NAME VERSION gcp 6.66.0 python unknown
Host
OS debian Version 11.7 Arch x86_64
This project is written in python: executable='/usr/local/bin/python3' version='3.11.5
Additional context
The pulumi AI is also not producing runnable python code in regards to this matter.
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).