-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Bad Request with remote state in azure blob storage #843
Comments
so, as a last ditch effort, i completely (manually) deleted the azure resources, and deleted the state file in blob storage. Now I no longer get the error. |
Did you rename your |
thanks for the tip. luckily we are just using terraform for automating QA environment creation. I'm going to close this issue since it hasn't happened again. |
hey @scotm-gxg Thanks for opening this issue - apologies for the delayed response here! So the issue you're seeing here is because when the App Service is being "Created" it's actually finding an existing App Service with the same name in the Resource Group / Subscription and trying to update it. Whilst Terraform itself doesn't know that the App Service exists yet, the Azure's API's are generally Upserts such that when we "create" the App Service this actually updates the configuration in Azure if an App Service already exists with the same name (and resource group). Whilst that's not ideal - it's a design decision in the way the API's work - but in either case the update error you're seeing is a known issue where the App Service API is broken in Azure. There's a Github issue tracking this here: Azure/azure-rest-api-specs#1697 In the interim, you should be able to Import the existing App Service into the Terraform State, then Terraform will know not to try and update it (providing the configs match). Due to the bug in the API mentioned above, at this time Terraform is only able to delete + recreate the App Service in order to make any changes (it's unfortunate, but there's not a lot else we can do at this time). Thanks! |
good to know. thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
I receive an error (link to Gist below) after switching to using terraform_remote_state and storing the state in an azure blob storage,
Terraform Version
Terraform v0.11.3
Affected Resource(s)
Terraform Configuration Files
main.tf
azure-infrastructure/main.tf
Debug Output
https://gist.github.com/scotm-gxg/166573305a93a0e4aa50d3fd248c3b0b
Panic Output
no crash log
Expected Behavior
terraform apply
should succeedActual Behavior
An error occurred when creating the Azure app service referenced in the debug output. Note that this error DOES NOT occur when using the default local state file. This occurred after attempting to switch to a state file stored in an Azure blob account.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init
(success)terraform plan
(success)terraform apply
(fail)The text was updated successfully, but these errors were encountered: