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

Can't manage firebase resources due to missing userProjectOverride flag #903

Open
geekflyer opened this issue Jun 22, 2023 · 2 comments
Open
Labels
area/providers kind/enhancement Improvements or new features size/S Estimated effort to complete (1-2 days).

Comments

@geekflyer
Copy link

What happened?

Creating or using any firebase resources fails with:

Diagnostics:
  pulumi:pulumi:Stack (aptos-api-gateway-testnet-staging):
    error: Running program 'main.pulumi.ts' failed with an unhandled exception:
    <ref *1> Error: invocation of google-native:firebasehosting/v1beta1:getDomain returned an error: error sending request: googleapi: Error 403: Your application is authenticating by using local Application Default Credentials. The firebasehosting.googleapis.com API requires a quota project, which is not set by default. To learn how to set your quota project, see https://cloud.google.com/docs/authentication/adc-troubleshooting/user-creds.
    Details:
    [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "domain": "googleapis.com",
        "metadata": {
          "consumer": "projects/62555940559",
          "service": "firebasehosting.googleapis.com"
        },
        "reason": "SERVICE_DISABLED"
      }
    ]

Note I'm getting the same error with the gcp classic provider unless gcp:userProjectOverride: true is set in the pulumi config (see https://www.pulumi.com/registry/packages/gcp/api-docs/provider/#userprojectoverride_nodejs and https://firebase.google.com/docs/projects/terraform/get-started#general-workflow-set-up-provider on why this is necessary).
Unfortunately the google native provider doesn't have an equivalent flag and I couldn't figure out how to make this work otherwise.

Expected Behavior

should work

Steps to reproduce

  1. create a firebase gcp project (manually is fine) and enable firebase hosting.
  2. gcloud auth login --update-adc
  3. Create some pulumi code like:
gcpv2.firebasehosting.v1beta1.getDomainOutput({
  domainId: "foo.bar.com",
  project: 'my-gcp-project',
  siteId: 'my-gcp-project',
}

Output of pulumi about

CLI
Version 3.69.0
Go Version go1.20.4
Go Compiler gc

Plugins
NAME VERSION
nodejs unknown

Host
OS darwin
Version 13.4
Arch arm64

This project is written in nodejs: executable='/Users/christian/Library/Caches/fnm_multishells/3608_1687219398510/bin/node' version='v18.16.0'

Found no pending operations associated with testnet-staging

Backend
Name pulumi.com

Additional context

No response

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).

@geekflyer geekflyer added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 22, 2023
@ericrudder ericrudder added the p1 A bug severe enough to be the next item assigned to an engineer label Jun 23, 2023
@pulumi pulumi deleted a comment from ericrudder Jun 23, 2023
@rquitales
Copy link
Member

Hi @geekflyer, thank you for reporting this issue, and we apologize for the inconvenience it has caused. Unfortunately, at the moment, there is no available workaround within the Google Native provider for this particular issue.

The underlying issue lies in the fact that our HTTP client does not support injecting the necessary request headers to enable the desired feature. Specifically, we need to add support for specifying the X-Goog-User-Project header, which allows you to specify a custom billing project. Rest assured, we will prioritize adding this functionality to address the issue.

@lukehoban lukehoban removed the p1 A bug severe enough to be the next item assigned to an engineer label Jun 23, 2023
@mikhailshilkov mikhailshilkov added kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 24, 2023
@kpitzen kpitzen added size/S Estimated effort to complete (1-2 days). area/providers labels Jun 27, 2023
@rvadim
Copy link

rvadim commented Feb 12, 2024

The same issue with v1/v1beta1 billing budgets

[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/providers kind/enhancement Improvements or new features size/S Estimated effort to complete (1-2 days).
Projects
None yet
Development

No branches or pull requests

7 participants