breezy-agency-13977
12/10/2023, 2:26 AMLabel key 'pulumiLabels.%' violates format constraints. The key must start with a lowercase character, can only contain lowercase letters, numeric characters, underscores and dashes. The key can be at most 63 characters long. International characters are allowed.
When I check out my google cloud run logs I see this error and the labels I am passing are
labels: {
pulumiLabels.%: "0"
cloud.googleapis.com/location: "us-central1"
}
I am not setting any pulumi labels anywhere in my setup. How can I get this to not be 0
?careful-salesclerk-28135
12/10/2023, 11:24 AMgcp:cloudrun:Service
would get a label with the name pulumiLabels.%
when I had not expressed it anywhere in my code. I have not been able to reproduce this consistently, but it has happened a few times.
For the cases I encountered the value of the label was an empty string.
I found despite numerous refresh attempts, the label would not be removed from the resource. I had to manually remove it from the state file, after which things worked as expected.
Without removing the label from the state file, pulumi would always try to update the resource, and the update would always fail with the error:
Details:
[
{
"@type": "<http://type.googleapis.com/google.rpc.BadRequest|type.googleapis.com/google.rpc.BadRequest>",
"fieldViolations": [
{
"description": "At least one label does not conform to GCP naming style. Label key 'pulumiLabels.%' violates format constraints. The key must start with a lowercase character, can only contain lowercase letters, numeric characters, underscores and dashes. The key can be at most 63 characters long. International characters are allowed.",
"field": "metadata.labels"
}
]
}
]
breezy-agency-13977
12/11/2023, 3:35 PMsalmon-account-74572
12/11/2023, 5:07 PMbreezy-agency-13977
12/11/2023, 5:20 PM"<http://github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrun|github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudrun>"
The last comment on there is my main.go that I am using.careful-salesclerk-28135
12/11/2023, 5:23 PM