-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dashboard properties missing in Pulumi state #3015
Comments
Thanks for reporting this @mikocot. Given that there's richer information returned in the CLI, we might be able to improve the state import for this resource. |
Thanks, we've now created also this issue that is likely related: #3023 The problem being that the types on pulumi side don't seem to reflect parameters in Azure's API. For us, fixing any of those two should be sufficient. But its not unlikely that fixing one will fix the other as well. |
based on further investigation on #3023, it looks like we're missing some types in the upstream azure spec. |
Hm, AFAIR e.g. the inputs property seems to exist on Pulumi side and mastching the Azure one, but it's still not mapped. Why? Also I do not know if Now, the third aspect of it is - why do we even get this exception if we set to ignore ghe whole |
The parts field can contain several different types of tiles, so there's several types to map here. I filed a ticket upstream (Azure/azure-rest-api-specs#27465); we'd definitely prefer to get this fixed in the schema rather than try to reverse engineer it.
Based on the error, it looks like the |
Thanks,
We specify lenses as in the code provided above. We don't add any other content to Not sure if I understand what else can we do then? Not specify lenses property at all in the initial definition? I believe this is the least we had to put there to have it deployed, but we can retry, As for the Similarly to what happens in Logic App workflow, where you end up with:
Surely, it's nicer to declare a type having complete strongly typed structure and intellisense, but on the other hand everytime there is an unmapped changed you're blocked. So in the long term it might not be worth it. And the underlying structure can get pretty complex. |
Ah, yes, the refresh would pull in the incomplete state regardless of the Any chance the azure classic resource an option for you in this scenario? It looks like that resource is defined with a |
What happened?
We've deployed an empty dashboard object with azure native provider. That dash has empty lens collection.
We've then added numerous dashboard lenses separately and set
ignoreChanges
property for Pulumi to not clear those parts during the nestpulumi up
.In fact this last part wasn't even needed until we started using drift detection
pulumi refresh
in our CI/CD. However, once the refresh ran on the stack, pulumi became aware of the new dashboards content and tried to clean it. It's all as expected until now.Unfortunately, the data pulled into the state is not complete and now seems to cause validation issue of the dashboard object, even though it's perfectly functional in Azure. When we pull dashboard structure from the portal or CLI, the missing properties are there.
Example
Code for the empty dashboard:
error from pulumi up
Dashboard lenses in pulumi state (as presented by app.pulumi.com)
What CLI (
az portal dashboard show
) return reports for that same dashboards - similar result if browsing the template in the portal, or exporting dashboard:Output of
pulumi about
we use the latest pulumi GH actions for deployment, so printing my personal pulumi about isn't relevant
Additional context
I believe there are more layers of this issue - another one, a reason why we were forced to use a deployment object to deploy dashboard parts is explained by this issue. But let's focus on this issue for now. Especially since I believe with dashboards it's a common scenario that they are designed in the portal, manually and not fully managed within pulumi. Yet, there needs to be a way that pulumi does not destroy it or break deployments altogether.
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: