pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
183 stars 53 forks source link

gcp:pubsub/schema:Schema gets replaced on schema changes with a PROTOCOL_BUFFER schema #1369

Closed ramilmsh closed 11 months ago

ramilmsh commented 11 months ago

What happened?

I created a gcp:pubsub/schema:Schema resource. Then, I tried changing the schema (i added an extra field, which should be a legal proto revision change). According to documentation a new revision should have been created, but instead the schema is being replaced:

$ pulumi up
Previewing update (stack):
     Type                  Name                                 Plan        Info
     pulumi:pulumi:Stack   stack                                2 messages
 +-  └─ gcp:pubsub:Schema  schema                               replace     [diff: ~definition]

Is this expected behavior?

I would like to be able to create a new revision, instead of re-initializing to prevent having to delete the the topic and all subscriptions to update a schema

Example

import * as gcp from "@pulumi/gcp";

const definition: string = ...

export const schema = new gcp.pubsub.Schema(
  "schema",
  {
    name: "schema",
    project: gcp.config.project,
    type: "PROTOCOL_BUFFER",
    definition: definition,
  }
);

Output of pulumi about

CLI          
Version      3.92.0
Go Version   go1.21.3
Go Compiler  gc

Plugins
NAME        VERSION
gcp         6.39.0
kubernetes  4.4.0
nodejs      unknown

Host     
OS       darwin
Version  14.0
Arch     arm64

This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v21.1.0'

...

Dependencies:
NAME                VERSION
@pulumi/pulumi      3.89.0
@types/node         16.18.59
typescript          4.9.5
@pulumi/gcp         6.39.0
@pulumi/kubernetes  4.4.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

ramilmsh commented 11 months ago

nvm, updating to 7.2.0 fixed it