From 8f91be81b7aba1b92375eaeb216ae4c7c7eea325 Mon Sep 17 00:00:00 2001 From: Ashok Siyani Date: Tue, 3 Dec 2024 13:24:49 +0000 Subject: [PATCH] fixed resource to verify token --- integration_test/src/modules/hello/hello.tf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/integration_test/src/modules/hello/hello.tf b/integration_test/src/modules/hello/hello.tf index 567bd50..021d79f 100644 --- a/integration_test/src/modules/hello/hello.tf +++ b/integration_test/src/modules/hello/hello.tf @@ -85,10 +85,14 @@ resource "null_resource" "echo_AWS_KEY" { ] } -data "google_client_openid_userinfo" "sa" {} +resource "null_resource" "verify_gcp_token" { + provisioner "local-exec" { + command = "wget -q -O - \"https://oauth2.googleapis.com/tokeninfo?access_token=$GOOGLE_OAUTH_ACCESS_TOKEN\"" + } -output "google_sa_email" { - value = data.google_client_openid_userinfo.sa.email + depends_on = [ + null_resource.echo_AWS_KEY + ] } resource "null_resource" "slow_provider" {