I am trying to create push subscription with push end point, service account and audience using below.
resource “google_pubsub_subscription” “sub”
{
name = “test-sub”
topic = google_pubsub_topic.sample-topic.name
push_config
{
push_endpoint = "https://region-${var.project_id}.cloudfunctions.net/xyz/"
oidc_token
{
service_account_email = "sample-sa@${var.project_number}.iam.gserviceaccount.com"
audience = "https://region-${var.project_id}.cloudfunctions.net/xyz"
}
}
}
When I am trying to apply, I am getting below error. Any help to resolve it?
“google api : error 400 : Invalid argument to the service push config::oidc_token::service_account_email”
Thanks