-
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
azurerm_app_service integration with VNet and Subnet #4372
Comments
The ip restrictions for a VNet are not the same as a VNet integration. The ip restriction are saying "only allow traffic from the VNet", while the VNet integration allows the app service to access resoruces inside the VNet.. Note: You cannot add an app service to a VNet unless you are using an App Service Environment. |
Thanks for the clarification @edboykin-insight although ASEs seem to be blocked to be added to Terraform and have to be done through ARM templates Thanks @hbuckle - I look forward to V1.35.0! |
@edboykin-insight You can add an app service to a VNet without using an App Service Environment. Even though the feature is in preview and have some restrictrions to it: https://docs.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet I'm running into similar problem with the association of the virtual network, more based on that the https://www.terraform.io/docs/providers/azurerm/r/app_service.html#virtual_network_name. When setting the name for the virtual_network_name in our code it doesn't connect to the actual network name. No error messages are given, Terraform behaves as it's applied as it should. If I manually add the VNET to the app service and run terraform plan again. It shows a GUID name that are not equal to the virtual_network_name. Seems like its a GUID_<subnet_name>. If I use that GUID_<subnet_name> as var.virtual_network_name it works. Terraform (and AzureRM Provider) Version Affected Resource(s)
Terraform Configuration Files
Expected Behavior Actual Behavior
Steps to Reproduce
Reference |
@SebRosander attaching App Services which aren't in an App Service Environment to a Virtual Network's gone through a few iterations on the Azure end unfortunately. After chatting with the service team a while back it appears that the Thanks! |
Thanks for clarifying @tombuildsstuff |
This has been released in version 1.40.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.40.0"
}
# ... other configuration ... |
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
Using Terraform v0.12.8
Affected Resource(s)
azurerm_app_service
Terraform Configuration Files
Expected Behavior
I would expect that this configuration would add the azure app service resource to the VNet specified in "site_config.virtual_network_name" and the subnet specified in "site_config.ip_restriction.virtual_network_subnet_id".
Then all app restrictions from external IPs and internal subnets can be managed by the network security group attached to the specified subnet.
Actual Behavior
No errors are generated, although in Azure under the "Settings/Networking/VNet Integration" section of the app service there is no configured VNet.
Steps to Reproduce
terraform apply
References
The text was updated successfully, but these errors were encountered: