Terraform v0.12.0
+ provider.azurerm v1.29.0
azurerm_app_service_plan
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "westeurope"
}
resource "azurerm_app_service_plan" "example" {
name = "example-plan"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
sku {
tier = "Basic"
size = "B1"
}
}
https://gist.github.com/joakimhellum-in/7a5d2d065d178f85add5e2c037304f87
N/A
Terraform to plan resource changes.
Terraform exits with an error message:
Error: insufficient items for attribute "sku"; must have at least 1
terraform init
.terraform apply
.az appservice plan delete -n example-plan -g example-resources
.terraform plan
.terraform plan
on an App Service Plan that has been deleted outside of Terraform.master
), but not v0.11.sku
attribute.Same issues, the problem was solved by removing the tfstate file (it was a test environment)
Same issue with azurerm_sql_server. Removing tfstate worked.
I'm having the same issue with:
Terraform v0.12.4
I'm trying to recreate a lost tfstate file using import, so obviously deleting it tfstate file is not going to solve my problem
still having the problem in version 0.12.6
Workarounded by provider.azurerm version downgrade to 1.27.0, Terraform version is still 0.12.4
Hey all. Thanks for opening this issue @joakimhellum-in. It looks like the azure sdk for app service plans doesn't return an error on 404 which is how we normally handle a deletion outside of terraform. I've implemented a workaround with #3990 and opened an issue on the sdk repo to get this addressed. Thanks for your patience here!
The workaround has been merged and will it make it into the next release. Closing this down but feel free to reopen if you continue to have issues after the next release goes out.
Workarounded by provider.azurerm version downgrade to 1.27.0, Terraform version is still 0.12.4
it worked!! thaaanks!
I has been released:
provider "azurerm" {
version = "~> 1.33.0"
}
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!
Most helpful comment
The workaround has been merged and will it make it into the next release. Closing this down but feel free to reopen if you continue to have issues after the next release goes out.