https://pulumi.com logo
#golang
Title
# golang
h

helpful-processor-86468

04/23/2020, 8:47 AM
Hi, I'm getting a diff on metadata during every run when creating cloudrun service. Any idea why?
b

broad-dog-22463

04/23/2020, 10:00 AM
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

helpful-processor-86468

04/23/2020, 10:00 AM
this is what I see.
is there a way to show more information about changes?
b

broad-dog-22463

04/23/2020, 10:03 AM
Pulumi up —diff should show you more information
h

helpful-processor-86468

04/23/2020, 10:11 AM
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

broad-dog-22463

04/23/2020, 10:14 AM
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

helpful-processor-86468

04/23/2020, 10:18 AM
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

broad-dog-22463

04/23/2020, 10:37 AM
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

helpful-processor-86468

04/23/2020, 10:37 AM
yeah, sure
b

broad-dog-22463

04/23/2020, 10:38 AM
Thank you :)
3 Views