GoogleCloudPlatform / samples-experiment

🧪 Experiment time! Let's see if a monorepo for Cloud samples is a good idea.
Apache License 2.0
3 stars 2 forks source link

feat: add metadata for legacy and complicated resource examples #17

Closed Sita04 closed 9 months ago

Sita04 commented 9 months ago

Adding Metadata for:

  1. Os Login
  2. Create disk snapshot
  3. List log entries
Sita04 commented 9 months ago

General idea I want to brainstorm:

I'm think we should remove PROJECT_ID from the variables configuration. Project config is special and deserves some different treatment, because:

  • It is required for every sample, no matter the product
  • Different users might want to use different projects
  • Users who want to run tests manually will want to just use their "default" projects easily, without updating dozens of TOML files.

That's why I want to suggest the $PROJECT_ID value should be always initialized using google.auth.default() or grabbed from an env value like $GOOGLE_CLOUD_PROJECT. Everyone will be able to switch between projects easily then, without modifying config files.

Good points. We definitely don't want to manually update those variables for every run. But we still have to grab the value from the environment variable to be passed to the [[tests]].

I'll add a TODO for this when we decide on the approach and get back.