mantle/kola: optionally attach GCP service account/AWS instance profile to instances #2851
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to test authenticated GCS fetches from instances, we need to attach some service account with GCS read access to each instance. Use the project's default service account unless the command line specifies otherwise.
Also allow tests to disable service account attachment in GCE and instance profile attachment in EC2, so that we can verify that anonymous fetches S3 -> EC2 and GCS -> GCE work without credentials. (This has been a problem in the past.)
This change requires kola's GCP service account to have Service Account User permission for the instance service account. Otherwise, the GCP SDK will fail with a helpful error message.