Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on step 1-org during budget creation #359

Closed
amandakarina opened this issue Mar 4, 2021 · 6 comments · Fixed by #368
Closed

Error on step 1-org during budget creation #359

amandakarina opened this issue Mar 4, 2021 · 6 comments · Fixed by #368
Assignees

Comments

@amandakarina
Copy link
Contributor

During the apply of step 1-org, running locally with my user credential I've got error during budget creation.
The terraform service account was used to create the projects but it was not used to create the budgets.

./tf-wrapper.sh plan production
./tf-wrapper.sh apply production

Error:

Error: Error creating Budget: googleapi: Error 403: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the billingbudgets.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]

Error: Error creating Budget: googleapi: Error 403: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the billingbudgets.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]


Error: Error creating Budget: googleapi: Error 403: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the billingbudgets.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]

Error: Error creating Budget: googleapi: Error 403: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the billingbudgets.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]

Error: Error creating Budget: googleapi: Error 403: Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the billingbudgets.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting. For more information about service accounts and how to use them in your application, see https://cloud.google.com/docs/authentication/.
Details:
[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "consumer": "projects/764086051850",
      "service": "billingbudgets.googleapis.com"
    },
    "reason": "SERVICE_DISABLED"
  }
]
@amandakarina
Copy link
Contributor Author

Issue #353 reports the same error

@amandakarina
Copy link
Contributor Author

amandakarina commented Mar 4, 2021

@bharathkkb
Copy link
Member

@amandakarina can you try using #281

@amandakarina
Copy link
Contributor Author

@amandakarina can you try using #281

@bharathkkb I've tried the version 3.58 using the impersonate_service_account but I've got the same error. To make it work, I had to create a token for a service account and set the credentials on GOOGLE_APPLICATION_CREDENTIALS environment variable.

/******************************************
  Provider credential configuration
 *****************************************/
provider "google" {
  impersonate_service_account = local.tf_sa
}

provider "google-beta" {
  impersonate_service_account = local.tf_sa
}

@amandakarina
Copy link
Contributor Author

This error happens also in steps 2-environments and 4-projects.

@amandakarina
Copy link
Contributor Author

The problem is in the version.tf file

Instead of:

terraform {
  required_version = ">= 0.13"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 3.58"
    }
    google-beta = {
      source  = "hashicorp/google"
      version = ">= 3.58"
    }
  }
}

It should be:

terraform {
  required_version = ">= 0.13"
  required_providers {
    google = {
      source  = "hashicorp/google"
      version = ">= 3.58"
    }
    google-beta = {
      source  = "hashicorp/google-beta"
      version = ">= 3.58"
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants