-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing azurerm_cognitive_deployment resources produces an unexpected status before attempting to import #35237
Comments
Transferring this to |
Hi @MohnJadden! Sorry for this strange behavior, and thanks for reporting it. Unfortunately since this issue relates to an object in your Azure account I think we will need more information from you to diagnose it. It would be helpful if you would repeat the reproduction steps you described but set the environment variable Unfortunately I don't yet have a theory about why Terraform would be printing part of your import ID followed by a semicolon, because that doesn't match any intentional Terraform output I know of, but I'm hoping that the trace log will give some clues as to what part of Terraform is generating that message and then we'll have a better chance of figuring out what's going wrong here. Thanks! |
@apparentlymart Gist is at https://gist.github.com/MohnJadden/c58cce94528bdade43277ef3aba5dd85 - LMK if I can provide anything further. |
Thanks for sharing that trace log, @MohnJadden! Based on that I see that the Terraform interpreted the command line like this (using Go's conventions for printing a slice of strings): []string{
"C:\\ProgramData\\chocolatey\\lib\\terraform\\tools\\terraform.exe",
"import",
"-no-color",
"module.projectname-openai-test.azurerm_cognitive_deployment.projectname-test-gpt4o-gs-project2[\"test\"]",
"/subscriptions/subscriptionguid/resourceGroups/projectnametest-test-RG/providers/Microsoft.CognitiveServices/accounts/projectnametest-test-cog/deployments/gpt-4o-gs-project2",
} ...which matches what I would've expected for this command line. (Sometimes PowerShell corrupts the command line before running an external command, but it doesn't seem to have done so in this case.) Unfortunately I wasn't able to find the string Just to make sure I'm not making an incorrect assumption: can you verify that the errant extra text you mentioned in your original issue doesn't appear anywhere in the unredacted version of the trace log? I notice you deleted some parts before you shared it, which is fine, but I just want to make sure we didn't lose the part that's relevant to this issue as part of that redacting. 馃榾 |
@apparentlymart I can confirm that the log has zero mention of the string This is a screenshot of what the actual output at issue looks like with details redacted: |
Thanks @MohnJadden! Unfortunately this leaves me quite stumped about what to try next. The fact that this message appears very early after you start running the command makes me wonder if this is being printed by something else in your environment before Terraform even begins running, but I don't know what to ask to try to prove or disprove that hypothesis. 馃 There are lots of messages produced by parts of Terraform's code that involve a quoted string followed by a semicolon, and so I can't feasibly visit them all, but after searching for code that might produce a message like that most of what I found were error messages and unit test assertions. Of those two only error messages would be possible to see in a released version of Terraform, but the behavior you reported doesn't involve any errors. The fact that we only see what appears to be a fragment of the message is also baffling. Terraform CLI and Terraform Core don't know anything about the Azure provider's import ID syntax, and so would have no reason to split the string just before the I'm afraid I've run out of ideas for this one. 馃槚 |
Is there an existing issue for this?
Community Note
Terraform Version
1.8.4
AzureRM Provider Version
3.104.2
Affected Resource(s)/Data Source(s)
azurerm_cognitive_deployment
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
There should be some kind of status that indicates Terraform is parsing the command and/or checking the state
Actual Behaviour
The newline with the semicolon displays, with nothing changing for a few seconds, then the import command runs
Steps to Reproduce
Important Factoids
This is in a Windows system, hence the escape characters
References
No response
The text was updated successfully, but these errors were encountered: