Hi all, hope you are all good i am facing a proble...
# google-cloud
w
Hi all, hope you are all good i am facing a problem with deploying a docker image giving me this error every time and won't deploy Updating (dev-new): Type Name Status Info pulumipulumiStack ehs-infra-dev-new failed 1 error + ├─ dockerindexImage ehs-backend-image creating failed 1 error + └─ gcpcomputeGlobalForwardingRule http-forwarding-rule created (22s) Diagnostics: dockerindexImage (ehs-backend-image): error: error reading build output: failed to read downloaded context: failed to load cache key: invalid response status 403 pulumipulumiStack (ehs-infra-dev-new): error: update failed can anyone help me with this knowing that i built the image on the local and tried to push the image and all was done can anyone help please ?
Copy code
import * as gcp from '@pulumi/gcp';
import * as pulumi from '@pulumi/pulumi';
import * as docker from '@pulumi/docker';
import { dbInstance, dbUser, dbPassword, db } from './database';
import { backendenvs } from './backend-envs';
import { appName, region } from './constants';
import { bucket, cdnURL } from './storage';

// Backend API (NestJS) Cloud Run Service
const imageName = `${appName}-backend-app`;

const image = new docker.Image(`${appName}-backend-image`, {
  imageName: pulumi.interpolate`gcr.io/${gcp.config.project}/${imageName}:${new Date().getTime()}`,
  build: {
    context: '..',
    platform: 'linux/amd64',
  },
});

export const backendService = new gcp.cloudrun.Service('backend-service', {
  location: region,
  template: {
    spec: {
      containers: [
        {
          image: image.imageName,
          ports: [{ containerPort: 3000 }],
          envs: [
            ...backendenvs,
            {
              name: 'DB_HOST',
              value: dbInstance.publicIpAddress,
            },
            { name: 'DB_PORT', value: '5432' },
            { name: 'DB_USERNAME', value: dbUser.name },
            { name: 'DB_PASSWORD', value: dbPassword.result },
            { name: 'DB_NAME', value: db.name },
            { name: 'GCP_PROJECT_ID', value: gcp.config.project },
            { name: 'GCP_STORAGE_BUCKET', value: bucket.name },
            {
              name: 'GCP_KEY_FILENAME',
              value: './assets/certs/ehs-serv-acc.json',
            },
            {
              name: 'GCP_CDN_HOSTNAME',
              value: cdnURL,
            },
            {
              name: 'VIDEO_PROCESSING_API_URL',
              value:
                '<https://video-processing-service-b6823df-oflw6k6npa-uc.a.run.app>',
            },
            {
              name: 'FIREBASE_ANALYTICS_SERVICE_ACCOUNT',
              value: './assets/certs/ehs-serv-acc.json',
            },
            {
              name: 'FIREBASE_ANALYTICS_PROPERTY_ID',
              value: '449999167',
            },
          ],
          resources: {
            limits: {
              cpu: '1',
              memory: '4Gi',
            },
          },
        },
      ],
      containerConcurrency: 80,
    },
  },
  traffics: [{ percent: 100, latestRevision: true }],
});

new gcp.cloudrun.IamMember('backend-service-iam', {
  service: backendService.name,
  location: region,
  role: 'roles/run.invoker',
  member: 'allUsers',
});
this is the code responsible for the docker image