-
Notifications
You must be signed in to change notification settings - Fork 37
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
Refresh command does not detect differences in letter casing for resource name #3629
Comments
@cermakp thanks for writing this up. Please could you provide a minimal example program of the "before" and "after" programs that we can run to reproduce the issue and use as a basis of the investigation. It's quite likely that this behaviour is coming from the upstream terraform provider though, so might be best to raise an issue on their side. There have been a number of new versions since v5.78.0 (including a major version) which might be worth testing first to see if this has already been addressed. |
Hi @danielrbradley , You will find an example of the application here. The program defines a single resource group with a log analytics workspace inside it. Here are the steps to reproduce the issue:
Expected behaviour Command |
Thanks for the extra detail. This is very helpful. Firstly, it looks like you're using the Natvie provider rather than the classic provider? If so, I'll transfer this issue. I think this might be related to refresh only affecting outputs and not the inputs, but will likely need further diagnosis to understand the scenario fully. How does this currently impact your use of the tool? It looks like doing another |
Yes, you are correct, we are using Azure native provider as it is recommended in Pulumi documentation for all new projects.
Currently, our import process generates the resources for the import procedure, which initializes the stack. After this step, we run |
Thanks for confirming. Going back to your original scenario:
Could you clarify these steps for my understanding :
I think this likely stems from the fact that Azure doesn't always pass back the exact values that we passed as inputs, so we have some mechanisms for accounting for this to avoid perminant diffs. The other workaround that should be fine here (apart from editing the state) would be re-importing with the correct case defined in the code. |
Pulumi refresh
does not detect resource name changes due to letter casing differences
This might be resolved via #3633 |
Yes, you are correct about the steps. Regarding the import, we are using a CLI tool for that. However, the provided example program is unrelated to the import process itself. It simply demonstrates that the However, as you can see, the |
It does not seem that it is related to the issue with |
I have just tried the latest version, including the fix to the issue you mentioned, but there is no difference. The issue with |
Hi @danielrbradley, any news? |
Hello, is there any progress? |
Thanks for confirming those details. I think we've now captured all the relevant details in which will let us investigate the root cause. The next step will likely be to reproduce the issue under a debugger to then write up a design for a fix. I can't currently give an ETA on that as this will need to be prioritised for work alongside other customer requests and ongoing maintenance work. |
What happened?
When there is a difference in letter casing in a resource's name, the
pulumi refresh
command does not detect it. Thepulumi refresh
command should recognize such changes and synchronize the stack with the resource name in Azure.Example
"workspaceName": "lawtestservice"
.pulumi refresh
in the command line – no changes are detected.Expected behavior
The workspace name in the stack should be overwritten to "lawTestService" and synchronized with the name defined in the Azure provider.
Output of
pulumi about
Additional context
Although pulumi refresh does not detect changes in letter casing, pulumi up does and attempts to replace the resource.
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: