-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permadiff in pulumiLabels and effectiveLabels with empty labels for gcp:container:Cluster
#2395
Comments
Hmmm. @zbuchheit please let us know as soon as you have a repro. |
The resource has an overloaded
I suspect that #2386 does not handle that case. |
It does not. I'm guessing we will need to special case this resource. |
Couldn't repro so far: import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.serviceaccount.Account("default", {
accountId: "service-account-id-2",
displayName: "Service Account",
});
const primary = new gcp.container.Cluster("primary", {
name: "marcellus-wallace",
location: "us-central1-a",
initialNodeCount: 3,
deletionProtection: false,
nodeConfig: {
serviceAccount: _default.email,
oauthScopes: ["https://www.googleapis.com/auth/cloud-platform"],
resourceLabels: {
foo: "bar",
empty: "",
},
},
}); produces no diff, unlike with #2372 |
Ok, the repro is with import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.serviceaccount.Account("default", {
accountId: "service-account-id-2",
displayName: "Service Account",
});
const primary = new gcp.container.Cluster("primary", {
name: "marcellus-wallace",
location: "us-central1-a",
initialNodeCount: 3,
deletionProtection: false,
nodeConfig: {
serviceAccount: _default.email,
oauthScopes: ["https://www.googleapis.com/auth/cloud-platform"],
labels: {
foo: "bar",
empty: "",
},
},
}); |
@VenelinMartinov I am unable to reproduce the problem on v8.2.0 with the above program.1 Footnotes
|
Yeah, it looks like i was using |
Happening via Go MLC will attempt a repro shortly |
the following repros for me on 8.2.0, it appears the field causing it is Code Reproimport * as gcp from "@pulumi/gcp";
const serviceAccount = new gcp.serviceaccount.Account(
"zbuchheit-service-account",
{
accountId: "zbuchheit-service-account",
displayName: "zbuchheit-service-account",
}
);
const cluster = new gcp.container.Cluster("zbuchheit-cluster", {
name: "zbuchheit-cluster",
initialNodeCount: 1,
location: "us-west2",
nodeConfig: {
machineType: "e2-medium",
oauthScopes: ["https://www.googleapis.com/auth/cloud-platform"],
serviceAccount: serviceAccount.email,
},
resourceLabels: {
environment: "dev",
test: "",
},
deletionProtection: false,
}); |
I've confirmed @zbuchheit 's repro also works for me with 8.2.0 - will investigate. My previous attempts at reproing this were with resourceLabels on the nodeConfig property - that seems to be the reason we couldn't repro before. |
This fixes the empty label handling in the GCP Cluster resource. In the fix for #2372 (#2386 and pulumi/pulumi-terraform-bridge#2417) we did not know that the labels property in GCP is sometimes overloaded, ex GCP Custer. For the Cluster resource, the GCP labels are under `resource_labels`, not `labels` This PR adds the logic to the empty labels fix and adds a regression test. fixes #2395
This issue has been addressed in PR #2441 and shipped in release v8.3.1. |
Describe what happened
Similar behavior to #2372
A user reported seeing a diff in effectiveLabels/pulumiLabels under 8.2.0
Sample program
TODO
Log output
No response
Affected Resource(s)
No response
Output of
pulumi about
gcp:container:Cluster
Additional context
The previous issue for the other resources like bucket and kms key are fine now, seems only gcp:container:Cluster remains problematic
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).
The text was updated successfully, but these errors were encountered: