You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Terraform Version
v1.9.8
AzureRM Provider Version
4.8.0
Affected Resource(s)/Data Source(s)
azurerm_api_management
Terraform Configuration Files
terraform {
required_providers {
azurerm={
source ="hashicorp/azurerm"
version ="=4.8.0"# Use the latest compatible version for your environment
}
}
}
# Provider blockprovider"azurerm" {
features {}
subscription_id="xxxxxx-xxxx-46bd-af5c-32b51467b9ae"
}
# Resource Groupresource"azurerm_resource_group""apim_rg" {
name="example-apim-rg-02"location="East US"
}
resource"azurerm_network_security_group""apimnsg" {
name="apimnsg"location=azurerm_resource_group.apim_rg.locationresource_group_name=azurerm_resource_group.apim_rg.namesecurity_rule {
name="ClientCommunicationtoAPIM"description="Client communication to API Management"access="Allow"protocol="Tcp"direction="Inbound"priority=200source_address_prefix="Internet"source_port_range="*"destination_address_prefix="VirtualNetwork"destination_port_ranges=["80", "443"]
}
security_rule {
name="ManagementEndpointForAzurePortalAndPowerShell"description="Management endpoint for Azure portal and PowerShell"access="Allow"protocol="Tcp"direction="Inbound"priority=210source_address_prefix="ApiManagement"source_port_range="*"destination_address_prefix="VirtualNetwork"destination_port_range="3443"
}
security_rule {
name="AzureInfrastructureLoadBalancer"description="Azure Infrastructure Load Balancer"access="Allow"protocol="Tcp"direction="Inbound"priority=220source_address_prefix="AzureLoadBalancer"source_port_range="*"destination_address_prefix="VirtualNetwork"destination_port_range="6390"
}
security_rule {
name="AzureTrafficManageRoutingForMultiRegionDeployment"description="Azure Traffic Manager routing for multi-region deployment"access="Allow"protocol="Tcp"direction="Inbound"priority=230source_address_prefix="AzureTrafficManager"source_port_range="*"destination_address_prefix="VirtualNetwork"destination_port_range="443"
}
security_rule {
name="DependencyOnAzureStorage"description="Dependency on Azure Storage for core service functionality"access="Allow"protocol="Tcp"direction="Outbound"priority=240source_address_prefix="VirtualNetwork"source_port_range="*"destination_address_prefix="Storage"destination_port_range="443"
}
security_rule {
name="AccessToAzureSQLEndpoints"description="Access to Azure SQL endpoints for core service functionality"access="Allow"protocol="Tcp"direction="Outbound"priority=250source_address_prefix="VirtualNetwork"source_port_range="*"destination_address_prefix="SQL"destination_port_range="1443"
}
security_rule {
name="AccessToAzureKeyVault"description="Access to Azure Key Vault for core service functionality"access="Allow"protocol="Tcp"direction="Outbound"priority=260source_address_prefix="VirtualNetwork"source_port_range="*"destination_address_prefix="AzureKeyVault"destination_port_range="443"
}
security_rule {
name="PublishDiagnosticsLogsMetricsEtc"description="Publish Diagnostics Logs and Metrics, Resource Health, and Application Insights"access="Allow"protocol="Tcp"direction="Outbound"priority=270source_address_prefix="VirtualNetwork"source_port_range="*"destination_address_prefix="AzureMonitor"destination_port_ranges=["1886", "443"]
}
}
# Virtual Networkresource"azurerm_virtual_network""apim_vnet" {
name="example-vnet-02"location=azurerm_resource_group.apim_rg.locationresource_group_name=azurerm_resource_group.apim_rg.nameaddress_space=["10.0.0.0/16"]
}
# Subnet for APIMresource"azurerm_subnet""apim_subnet" {
name="apim-subnet"resource_group_name=azurerm_resource_group.apim_rg.namevirtual_network_name=azurerm_virtual_network.apim_vnet.nameaddress_prefixes=["10.0.1.0/24"]
}
# Associate the NSG with the Subnetresource"azurerm_subnet_network_security_group_association""example_association" {
subnet_id=azurerm_subnet.apim_subnet.idnetwork_security_group_id=azurerm_network_security_group.apimnsg.id
}
# APIM Service in Internal Moderesource"azurerm_api_management""apim" {
name="example-apim-rkhan-02"location=azurerm_resource_group.apim_rg.locationresource_group_name=azurerm_resource_group.apim_rg.namepublisher_name="example@example.com"publisher_email="example@example.com"sku_name="Premium_1"# Change to "Premium" for production usevirtual_network_type="Internal"zones=["1", "2"]
virtual_network_configuration {
subnet_id=azurerm_subnet.apim_subnet.id
}
identity {
type="SystemAssigned"
}
}
Should be able to deploy an APIM Internal Mode with Zones without Public IP Address, Azure REST API does not require public IP address. Here is the link to the documentation and note
Starting May 2024, a public IP address resource is no longer needed when deploying (injecting) an API Management instance in a VNet in internal mode or migrating the internal VNet configuration to a new subnet.
Actual Behaviour
Terraform deployment failed with following error
"public_ip_addressmust be specified whenzones` are provided"
Steps to Reproduce
terraform init
terraform plan -out my.plan
terraform apply my.plan
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Is there an existing issue for this?
Community Note
Terraform Version
v1.9.8
AzureRM Provider Version
4.8.0
Affected Resource(s)/Data Source(s)
azurerm_api_management
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Should be able to deploy an APIM Internal Mode with Zones without Public IP Address, Azure REST API does not require public IP address. Here is the link to the documentation and note
https://learn.microsoft.com/en-us/azure/api-management/api-management-using-with-internal-vnet?tabs=stv2#prerequisites
Starting May 2024, a public IP address resource is no longer needed when deploying (injecting) an API Management instance in a VNet in internal mode or migrating the internal VNet configuration to a new subnet.
Actual Behaviour
Terraform deployment failed with following error
"public_ip_address
must be specified when
zones` are provided"Steps to Reproduce
terraform init
terraform plan -out my.plan
terraform apply my.plan
Important Factoids
No response
References
This line seems to be the issue.
terraform-provider-azurerm/internal/services/apimanagement/api_management_resource.go
Line 846 in b837a43
The text was updated successfully, but these errors were encountered: