Pulumi - Load Balancer error: googleapi: Error 412: Invalid fingerprint., conditionNotMet

97 views Asked by At

I was trying to apply some changes to my code to disable logging on the load balancers, the pulumi up was successful to all resources but one and it's showing this error.

Type                                 Name                              Status                  Info
     pulumi:pulumi:Stack                  upcoupons-live                    **failed**              1 error
     └─ gcp:utils:Site                    live-mcfr-component                                       
        └─ gcp:utils:ClassName            live-loadbalancer-mcfr-component                          
 ~         └─ gcp:compute:BackendService  live-bs-mcfr                      **updating failed**     [diff: +logConfig]; 1 error

Diagnostics:
  pulumi:pulumi:Stack (upcoupons-live):
    error: update failed

  gcp:compute:BackendService (live-bs-mcfr):
    error: 1 error occurred:
        * updating urn:pulumi:live::upcoupons::gcp:utils:Site$gcp:utils:ClassName$gcp:compute/backendService:BackendService::live-bs-mcfr: 1 error occurred:
        * Error updating BackendService "projects/xxx/global/backendServices/live-bs-mcfr": googleapi: Error 412: Invalid fingerprint., conditionNotMet

Here are some more details about the change:

pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:live::upcoupons::pulumi:pulumi:Stack::upcoupons-live]
            ~ gcp:compute/backendService:BackendService: (update)
                [id=projects/upcoupons-production/global/backendServices/live-bs-mcfr]
                [urn=urn:pulumi:live::upcoupons::gcp:utils:Site$gcp:utils:ClassName$gcp:compute/backendService:BackendService::live-bs-mcfr]
                [provider=urn:pulumi:live::upcoupons::pulumi:providers:gcp::default_6_50_0::0ea1aec0-6fb3-4ba4-8af0-a131562cf697]
              + logConfig                   : {
                  + enable    : false
                }

What I can do to make pulumi update that configuration? I couldn't find anything related to pulumi about this weird error. Not sure what this fingerprint is and why just failed for one resource.

Any help will be much appreciated.

1

There are 1 answers

0
Kaleby Cadorin On BEST ANSWER

The error has been fixed by running pulumi refresh, then the fingerprint got updated allowing to apply the changes.

pulumi refresh -t <Resource_URN>

Type                           Name            Plan       Info
     pulumi:pulumi:Stack            upcoupons-live             
 ~   └─ gcp:compute:BackendService  live-bs-mcfr    update     [diff: ~fingerprint,localityLbPolicy]