-
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
terraform import on azurerm_app_service_plan missing many settings #2991
Comments
Thanks for opening this issue :) Taking a look into this it appears the casing on the ID at Import time is incorrect: $ terraform import azurerm_app_service_plan.test /subscriptions/<GUID>/resourceGroups/RG-DevSupport/providers/Microsoft.Web/serverFarms/HostingPlan-Andrew From the Import section in the documentation this needs to be: $ terraform import azurerm_app_service_plan.instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/serverfarms/instance1 (note the difference in Would you be able to take a look and see if Importing this using Since this is a question about Terraform Configuration rather than a bug in Terraform, I'm going to close this issue for the moment - but please let us know if that doesn't work for you and we'll take another look :) Thanks! |
Yes, the lowercase serverfarms worked thanks. I had copied the resource id directly from Azure Portal like every other resource I have imported so I believe there is still a bug here. Do you think this issue should be reopened and either:
|
@andrew-sumner glad to hear this is now working for you
Unfortunately the Azure Portal differs from the API here (which is the source of truth and documents that the casing should be Whilst we plan to add additional validation to the import of (all) resources during 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 👉 [email protected]. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.11
Description
When running
I expect to import all the settings however many are missing.
Affected Resource(s)
azurerm_app_service_plan
Terraform Configuration Files
Debug Output
After running
terraform plan
on a newly imported app service plan I get this output:Note that it even wants to rename it.
Panic Output
Expected Behavior
After running terraform import on an app service plan the state file should contain:
Note: This state is from a newly created app service plan, created using terraform.
Actual Behavior
After running terraform import on an app service plan the state file actually contains:
Note that it's even missing the resource name
Steps to Reproduce
terraform import ADDR ID
terraform plan
, should see no changes, will see that resource will be dropped and recreated because of the changes terraform thinks it needs to makeImportant Factoids
References
The text was updated successfully, but these errors were encountered: