Hey everyone. I'm having trouble creating an API k...
# google-cloud
f
Hey everyone. I'm having trouble creating an API key in my GCP project using
gcp.projects.ApiKey
. Here's the code I'm using to create the key:
Copy code
const web = new gcp.projects.ApiKey(
  "defaultApiKey",
  {
    project: project,
    name: "test-key-please-delete",
    displayName: "Example API Key",
  },
  { dependsOn: [api.apikeysApi] }
);
And here's the error I get after executing
pulumi up -y
Copy code
* Error creating Key: failed to create a diff: failed to retrieve Key resource: googleapi: Error 403: Your application is authenticating by using local Application Default Credentials. The <http://apikeys.googleapis.com|apikeys.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": "<http://type.googleapis.com/google.rpc.ErrorInfo|type.googleapis.com/google.rpc.ErrorInfo>",
        "domain": "<http://googleapis.com|googleapis.com>",
        "metadata": {
          "consumer": "projects/[redacted]",
          "service": "<http://apikeys.googleapis.com|apikeys.googleapis.com>"
        },
        "reason": "SERVICE_DISABLED"
      }
    ]
At the same time, my quota project is set, and I can create a key with no issues using the following
gcloud
command:
gcloud beta services api-keys create --display-name="test key"
Is there any additional configuration needed for my Pulumi project?