Hi all! I really hope everyone in a good mood. I ...
# google-cloud
f
Hi all! I really hope everyone in a good mood. I had working pulumi cloud run configuration couple month ago. When I run it again today I'm encountering an issue when trying to deploy a Google Cloud Run service using the
gcp
provider. I'm getting the following error:
Copy code
gcp:cloudrunv2:Service (backend-cloud-run-service):
    error:    sdk-v2/provider2.go:385: sdk.helper_schema: missing expected [: provider=google-beta@7.38.0

gcp:cloudrunv2:Service (backend-cloud-run-service):
    error: diffing urn:pulumi:prod::clarity-auto-digital::gcp:cloudrunv2/service:Service::backend-cloud-run-service: 1 error occurred:
        * [template[0].containers[0].ports] missing expected [
The error is the same even with minimal cloud run definition
Copy code
backend_cloud_run_service = gcp.cloudrunv2.Service(
    "backend-cloud-run-service",  # Unique internal name
    name="backend",  # Service name in cloud run
    location=gcp.config.region,
    ingress="INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER",
    template={}
)
I've cleared plugin cache and re-install pulumi. I'm happy to share more context if required. I guess it may be an version issue, but i struggle to debug futher.
Copy code
# pulumi plugin ls 
NAME  KIND      VERSION  SIZE    INSTALLED       LAST USED
gcp   resource  8.21.0   186 MB  17 minutes ago  17 minutes ago
gcp   resource  7.38.0   208 MB  17 minutes ago  17 minutes ago

TOTAL plugin cache size: 393 MB

# pulumi config 
KEY          VALUE
gcp:project  clarity-auto-digital
gcp:region   us-central1
pulumi:tags  {"pulumi:template":"gcp-python"}
I have figured out what was the issue. I have two resources with the same ID. Apparently there is no safegard from that.
h
Interesting I though Pulumi would delete the old resource before creating new one! So did you manually delete the service in your console and then use
pulumi state delete urn:....
to delete it from your Pulumi state?