-
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
New Resource: azurerm_function_app_slot
#1307
Comments
azurerm_function_app_slot
azurerm_app_service_slot don't work, eh? |
Is this feature being already implemented? I would like to use it now :) |
I tried azurerm_app_service_slot but referencing the function app service for app_service_name (per a blog I found). I received an error on plan: web.AppsClient#CreateOrUpdateSlot: Failure sending request: StatusCode=400 -- Original Error: Code="BadRequest" Message="Function App app settings are not expected to be empty. Please try again with WEBSITE_CONTENTAZUREFILECONNECTIONSTRING as a storage account connection string." This same error string appears in an issue for az CLI. |
Hello Do we know if this will be turning up in a new version of the provider anytime soon. |
Azure CLI added support for this feature in June: |
Any news on this? |
I am also running into the same issue when trying to create a slot on a function app with terraform: This works without error, but isn't terraform code: |
We ended up moved to zip deploys via CI instead of slots. They seem to be working well 👍 https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push |
I got this info from https://resources.azure.com The direct URL looks like this: But here is the API response from manually creating a function app through the portal. {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.Web/sites/funcapp-sandbox/slots/funcapp-sandbox-stg",
"name": "funcapp-sandbox/funcapp-sandbox-stg",
"type": "Microsoft.Web/sites/slots",
"kind": "functionapp",
"location": "East US",
"properties": {
"name": "funcapp-sandbox(funcapp-sandbox-stg)",
"state": "Running",
"hostNames": [
"funcapp-sandbox-funcapp-sandbox-stg.azs.example.com"
],
"webSpace": "MyASE-MyASEappseEastUSwebspace",
"selfLink": "https://waws-prod-blu-a4acfff1.api.p.azurewebsites.windows.net:454/subscriptions/00000000-0000-0000-0000-000000000000/webspaces/MyASE-MyASEappseEastUSwebspace/sites/funcapp-sandbox",
"repositorySiteName": "funcapp-sandbox",
"owner": null,
"usageState": "Normal",
"enabled": true,
"adminEnabled": true,
"enabledHostNames": [
"funcapp-sandbox-funcapp-sandbox-stg.azs.example.com",
"funcapp-sandbox-funcapp-sandbox-stg.scm.azs.example.com"
],
"siteProperties": {
"metadata": null,
"properties": [
{
"name": "LinuxFxVersion",
"value": ""
},
{
"name": "WindowsFxVersion",
"value": null
}
],
"appSettings": null
},
"availabilityState": "Normal",
"sslCertificates": null,
"csrs": [],
"cers": null,
"siteMode": null,
"hostNameSslStates": [
{
"name": "funcapp-sandbox-funcapp-sandbox-stg.azs.example.com",
"sslState": "Disabled",
"ipBasedSslResult": null,
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"toUpdateIpBasedSsl": null,
"ipBasedSslState": "NotConfigured",
"hostType": "Standard"
},
{
"name": "funcapp-sandbox-funcapp-sandbox-stg.scm.azs.example.com",
"sslState": "Disabled",
"ipBasedSslResult": null,
"virtualIP": null,
"thumbprint": null,
"toUpdate": null,
"toUpdateIpBasedSsl": null,
"ipBasedSslState": "NotConfigured",
"hostType": "Repository"
}
],
"computeMode": null,
"serverFarm": null,
"serverFarmId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyASE/providers/Microsoft.Web/serverfarms/MyASP",
"reserved": false,
"isXenon": false,
"hyperV": false,
"lastModifiedTimeUtc": "2019-08-15T13:31:33.8433333",
"storageRecoveryDefaultState": "Running",
"contentAvailabilityState": "Normal",
"runtimeAvailabilityState": "Normal",
"siteConfig": null,
"deploymentId": "funcapp-sandbox__9822",
"trafficManagerHostNames": null,
"sku": "Isolated",
"scmSiteAlsoStopped": false,
"targetSwapSlot": null,
"hostingEnvironment": "MyASE",
"hostingEnvironmentProfile": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyASE/providers/Microsoft.Web/hostingEnvironments/MyASE",
"name": "MyASE",
"type": "Microsoft.Web/hostingEnvironments"
},
"clientAffinityEnabled": true,
"clientCertEnabled": false,
"clientCertExclusionPaths": null,
"hostNamesDisabled": false,
"domainVerificationIdentifiers": null,
"kind": "functionapp",
"inboundIpAddress": "xxx.xxx.xxx.xxx",
"possibleInboundIpAddresses": "xxx.xxx.xxx.xxx",
"outboundIpAddresses": "xxx.xxx.xxx.xxx",
"possibleOutboundIpAddresses": "xxx.xxx.xxx.xxx",
"containerSize": 1536,
"dailyMemoryTimeQuota": 0,
"suspendedTill": null,
"siteDisabledReason": 0,
"functionExecutionUnitsCache": null,
"maxNumberOfWorkers": null,
"homeStamp": "waws-prod-red-xxxxxxxx",
"cloningInfo": null,
"hostingEnvironmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyASE/providers/Microsoft.Web/hostingEnvironments/MyASE",
"tags": null,
"resourceGroup": "MyRG",
"defaultHostName": "funcapp-sandbox-funcapp-sandbox-stg.azs.example.com",
"slotSwapStatus": null,
"httpsOnly": false,
"redundancyMode": "None",
"inProgressOperationId": null,
"geoDistributions": null,
"privateEndpointConnections": []
}
} |
@Workshop2 Thanks for the link and idea. Where I work, things move slowly and there are several development teams that would have to change process. |
I want to create function app slot using terraform but there is no resource available as azurerm_function_app_slot. Is there any chances of being available anytime soon? We tried to create staging slot with azue cli but there is lot of hassel with slot settings. |
@tombuildsstuff on #4684 you mentioned sending certain app settings. The bug is that even if these are specified correctly in Terraform, you still get this error. |
Is there a list of resources that are not yet supported via terraform? Surprised to see that function app slots are not available via terraform resources. This issue has been open for almost 2 years. |
I am also looking to use terraform to create azure function app slots, and am curious if there is any update or planned timeframe to add this |
If you filter the issues on the label ‘new-resource’, you essentially get a list of resources not currently supported. https://github.com/terraform-providers/terraform-provider-azurerm/labels/new-resource |
It looks like Function App Deployment Slot support was added to the Azure CLI in Azure/azure-cli#9550. It seems like this is what was blocking this feature; is this an up for grabs issue? |
@collinstevens I want to give this one a try, is that okay with you? |
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! |
Community Note
Description
Azure Functions support deployment slots in preview, which among other things support 0-downtime deployments. It would be useful to be able to create those with terraform in similar way that slots for app services are defined.
https://blogs.msdn.microsoft.com/appserviceteam/2017/06/13/deployment-slots-preview-for-azure-functions/
New or Affected Resource(s)
The text was updated successfully, but these errors were encountered: