Hi, I'm getting a diff on metadata during every ru...
# golang
h
Hi, I'm getting a diff on metadata during every run when creating cloudrun service. Any idea why?
b
Hi @helpful-processor-86468 What is the diff you are seeing? When you run “Pulumi up” it should offer you a chance to see in the details Paul
h
this is what I see.
is there a way to show more information about changes?
b
Pulumi up —diff should show you more information
h
hmm, it seems that my labels resourceVersion is changing everytime I run pulumi:
Copy code
microserviceLabels := make(pulumi.StringMap)
	for key, value := range labels {
		microserviceLabels[key] = pulumi.String(value)
	}
	serviceMetadata := &cloudrun.ServiceMetadataArgs{
		Labels: microserviceLabels,
	}
~ resourceVersion: "AAWj8UaUhpA" => "AAWj8l7zpEA"
I saw in the documentation that there is some mechanism for resources to be created only once. Is this something I have to do or am I doing something wrong?
b
You can use ignoreChanges to stop this from being updated
It would be more interesting to see why the labels are changing though - that’s not Pulumi, that’s the loop in Go doing that
Maybe the ordering of the list is random here and it’s non deterministic about which it’s bringing back at a time
h
yeah, ill look into that. That seems like a better option than marking labels as ignored. They can change during development.
Copy code
metadata: {
          ~ labels: {
              - <http://cloud.googleapis.com/location|cloud.googleapis.com/location>: "europe-west1"
            }
        }
this is a troublemaker that is causing a diff
and it's something that is added by pulumi itself that is required by gcp (invisible region label). I'm not including this label
why is pulumi removing this label? This seems like a bug to me @broad-dog-22463
b
Interesting - that does indeed seem like a big between Pulumi and GCP Can you open an issue on Pulumi-gcp repo and describe the setup and we can look into it?
h
yeah, sure
b
Thank you :)