Closed phillipedwards closed 1 month ago
Only dots (.
) seem to provoke the behavior detailed here. Dashes and underscores behave as expected.
Hi @phillipedwards, this looks definitely like a bug. Where exactly do you see the wrong output below? On pulumi preview?
nodeLabels: {
~ my: {
~ label: {
+ name: <null>
}
}
}
What happens when you deploy anyway?
As an aside: periods are allowed in labels.
Running pulumi preview --diff
on your example code, I get
nodeLabels: {
env : "production"
my.label.name: "foo"
role : "frontend"
}
I was now able to reproduce it by first deploying the cluster (which went fine), then changing the NodeLabel key. The next preview shows the wrong diff.
The good news is that the label is actually correct in Azure, both after creation and update. It's only the Pulumi diff that is wrong.
This issue has been addressed in PR #3439 and shipped in release v2.50.1.
What happened?
Adding labels w/ names containing periods (
my.label.name
) to both AKS Clusters (ManagedCluster) and Additional Node Pools (AgentPool) results in the label name being exploded into an object. In addition to exploding the string name into an object, the value of the label is also represented asnull
.More concretely, a label such as:
is represented by Pulumi as:
whereas the label should be represented as:
Example
Output of
pulumi about
github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2 v2.49.1 github.com/pulumi/pulumi-azure-native-sdk/resources/v2 v2.42.1 github.com/pulumi/pulumi-azure-native-sdk/storage/v2 v2.42.1 github.com/pulumi/pulumi/sdk/v3 v3.122.0
CLI - 3.122.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).