Skip to content

Commit

Permalink
chore: Remove hardcoded SA name
Browse files Browse the repository at this point in the history
  • Loading branch information
abdolence committed Nov 25, 2024
1 parent ba173be commit 0f11f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/iam-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
)
.await?;

// Option 1: using service account impersonation
let service_account = std::env::var("TEST_SERVICE_ACCOUNT")?;

let resp = client
.get()
.sign_blob(tonic::Request::new(
gcloud_sdk::google::iam::credentials::v1::SignBlobRequest {
name: "projects/-/serviceAccounts/[email protected]"
.to_string(),
name: format!("projects/-/serviceAccounts/{}", service_account),
delegates: vec![],
payload: "https://storage.googleapis.com/example-bucket/cat.jpeg"
.as_bytes()
Expand Down

0 comments on commit 0f11f14

Please sign in to comment.