Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Help - How to pass serviceAccountKeyFile to invocationConfig. #55

Open
pprathameshmore opened this issue Jan 19, 2021 · 3 comments
Open
Labels
question Further information is requested

Comments

@pprathameshmore
Copy link

pprathameshmore commented Jan 19, 2021

I have service_account.json file.

{
  "type": "service_account",
  "project_id": "301105",
  "private_key_id": "5b42259b6759ecf0fdfdfdf4102bba08af4b484d89",
  "private_key": "-----BEGIN PRIVATE KEY-----\n-----END PRIVATE KEY-----\n",
  "client_email": "",
  "client_id": "",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/tegotest%40intense-talent-301105.iam.gserviceaccount.com"
}
 instanceConfigFields: {
    serviceAccountKeyFile: {
      type: 'string',
      mask: true,
    },
  },

Now, How to pass this file to instanceConfigFields object. @aiwilliams

@pprathameshmore pprathameshmore changed the title Help - How to pass invocationConfig. Help - How to pass serviceAccountKeyFile to invocationConfig. Jan 19, 2021
@austinkelleher
Copy link
Contributor

Hey @pprathameshmore apologies for the late response. Did you ever figure this out?

@austinkelleher austinkelleher added the question Further information is requested label Jun 28, 2021
@pprathameshmore
Copy link
Author

No, could you please guide me?

@austinkelleher
Copy link
Contributor

@pprathameshmore Sure! 👍 You'll need to create a .env file at the root of the project. The contents will look like this:

SERVICE_ACCOUNT_KEY_FILE={ ... }
PROJECT_ID="my-project-id"

NOTE that the SERVICE_ACCOUNT_KEY_FILE JSON is flattened onto one line.

After that, you should be able to just run yarn start to begin collecting data!

I'm interested in your use cases! How did you find this project? What are you using it for?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants