https://pulumi.com logo
#general
Title
# general
i

incalculable-crayon-23090

01/23/2023, 12:57 PM
Hi! I'm trying to set up an orgpolicy in GCP using Pulumi. Since the pulumi-gcp plugin has a bug preventing me to add a gcp.projects.OrganizationPolicy policy (see: https://github.com/pulumi/pulumi-gcp/issues/291), I am trying to use the v2 orgpolicy to do the same thing. Problem is when I'm trying to add a new orgpolicy on my project I get this error:
Copy code
gcp:orgpolicy:Policy (primary):
    error: 1 error occurred:
        * Error creating Policy: failed to create a diff: failed to retrieve Policy resource: 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 <http://orgpolicy.googleapis.com|orgpolicy.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/>. If you are getting this error with curl or similar tools, you may need to specify 'X-Goog-User-Project' HTTP header for quota and billing purposes. For more information regarding 'X-Goog-User-Project' header, please check <https://cloud.google.com/apis/docs/system-parameters>.
    Details:
    [
      {
        "@type": "<http://type.googleapis.com/google.rpc.ErrorInfo|type.googleapis.com/google.rpc.ErrorInfo>",
        "domain": "<http://googleapis.com|googleapis.com>",
        "metadata": {
          "consumer": "projects/764086051850",
          "service": "<http://orgpolicy.googleapis.com|orgpolicy.googleapis.com>"
        },
        "reason": "SERVICE_DISABLED"
      }
    ]
But I don't fully understand why ADC is not working
5 Views