_This issue was originally opened by @kevinsorenson as hashicorp/terraform#16385. It was migrated here as a result of the provider split. The original body of the issue is below._
Hi there,
It doesn't appear possible to create an Azure API App Service with Terraform. I've searched the documentation for a place to specify the kind of app service, but it looks like it's only an option to create web apps. API Apps are useful for creating things like chatbots (and I expect others might like the option to create mobile apps too). In ARM, you specify "app" or "api" in the "kind" field.
I think this also has to be defined at creation time, so I don't think I can change that setting with PowerShell in a Provisioner or anything.
Any ideas?
Thanks,
Hello,
It appears that Azure documentation on App Service Plans does not seem to provide information on what are the supported  strings for the "kind" field. The default appears to be "app", though. 
Also I observed that the AzureRM provider seems to get the "kind" field wrong. The code seems to validate the "kind" field against strings "Linux" and "Windows".
I've never seen the list of supported strings in documentation either.
You can manually create an API app, web app, or mobile app in the portal, and view the "Automation Options" before deployment, or the "Automation Script" after deployment. Doing so, you'll find that the values for "kind" are respectively, "api", "app", and "mobileapp".
If the terraform app service modules had those 3 options, that would allow users to create things like chatbots using api apps, or mobile applications.
@tombuildsstuff can you confirm regarding the "kind" field in the source code? Is the field being validated for improper string values?
@kevinsorenson I built the AzureRM provider to send kind parameter as strings from "app", "api" or "mobileapp" instead of "Windows" or "Linux".
I then created App Service resources from the the examples/ directory in the source code:
resource "azurerm_app_service_plan" "default" {
  name                = "${var.app_service_name}-plan"
  location            = "${azurerm_resource_group.default.location}"
  resource_group_name = "${azurerm_resource_group.default.name}"
  kind                = "api"           #added kind parameter with value as "api"                                                                                                                                            
  sku {
    tier = "${var.app_service_plan_sku_tier}"
    size = "${var.app_service_plan_sku_size}"
  }
}
In the Automation Script section, I see two resources with "kind" values as "api" and "app".
Is this what you expect? 
Currently, the value of "kind" is being set as "Windows" or "Linux"
That sounds correct.
I don't think I've ever seen the "kind" set to Windows, but I believe the 4th app service, "Web App for Containers" uses the "Linux" value. Unfortunately I can't verify that right now, but will comment once I get a chance to confirm that.
However, I have several API apps, and Web apps, and they all show the kind as "api" or "app" respectively, whether viewed in the automation script, or in resource explorer.
I look forward to testing out creation of an API app via Terraform!
@horsey I regret that it's taken me so long to get back to this, but I think I miscommunicated...
I didn't notice before, but am now trying to use this, and the "kind" field was added to the azurerm_app_service_plan, but not to the azurerm_app_service (not the plan).
The difference between an API Service, an App Service, and a MobileApp Service are all at the service level, not at the plan level. I think that's why there was confusion around the Windows/Linux piece (the Windows/Linux designation _does_ get applied at the plan level).
Sorry I didn't catch this earlier. Is this something that can be added to an app service?
Thanks,
Kevin
@bcornils - This is the API app request we discussed. Thanks!
This has been open for some time. Will this come anytime soon? Is Microsoft invested in the kind API app ?
@MarkDordoy Unfortunately, I was told a while back that it's not high on their priority list... not enough people interested in it I guess, so I've had to find other ways to do what I need. :-(
Just found this, I can't believe a whole App Service type is unsupported.
Is there any plans to fix this?
I am blocked with just this issue in my terraform script which is all loaded with appropriate variables, interpolation and what not, is there no workaround to include API Apps(Azure App Service) resource with azurerm provider ?
TLDR;
Azure App Services of type Web App and Api App are exactly the same and have the same functionality.  Whilst it might be nice to have your api app service listed as an api app, that's all the difference between a web app and an api app, the name and the icon.
https://www.serverless360.com/blog/azure-api-app-vs-web-app
To all of you that have posted here, I have been as frustrated as you have with the difficulties automating the creation of an azure app service with the type/kind of Api App via terraform. It can be done with azure resource templates or via the azure cli.
az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites \
    --is-full-object --properties "{ \"kind\": \"api\", \"location\": \
        \"West US\", \"properties\": { \"serverFarmId\": \
            \"/subscriptions/{SubID}/resourcegroups/{ResourceGroup} \
                /providers/Microsoft.Web/serverfarms/{ServicePlan}\" } }"              
The az cli would be my choice over the arm templates, but I don't see how the resource could then be managed by terraform. Yes you could run terraform import, but I'm pretty sure when you run terraform plan, the change in type/kind would probably force a delete and create. I haven't tested it, please give it a go and post back here.
I realised, given that everything has to be automated in terraform at my firm, my dev team would have to live with the type/kind set to web app.
I did some research on the differences between a Web App and an Api App. It turns out there are none, other than the name and icon. Problem solved.
https://www.serverless360.com/blog/azure-api-app-vs-web-app
Hope that helps.
Jason

@JasonDonnelly I was able to provision the azure app service web app(kind: api) by passing ARM IaC code in template body section of my tf file. will test to state-management to verify how terraform handles the resource which was created using the ARM template. 
Do we know when we are getting this feature out ? Even though there is no difference however, its give a visual to distinguish between API and Web app.
Hi Team, As per the discussion its clear that there are not much requirement for this feature but since Azure supports this feature from the portal its good to have this enabled in terraform.
Can we have this in next release. Recently we have adopted Terraform in our organization. We have many apis created using ARM template. However this is blocking us to us Terraform for Apis.
Most helpful comment
I am blocked with just this issue in my terraform script which is all loaded with appropriate variables, interpolation and what not, is there no workaround to include API Apps(Azure App Service) resource with azurerm provider ?