Open feberl opened 1 year ago
@feberl With azurerm version 3.47.0 the created APIM instances are of platform version stv2
.
@feberl With azurerm version 3.47.0 the created APIM instances are of platform version
stv2
.
Cannot find this in the release notes. So with any version <3.47.0 it is stv1?
So with any version <3.47.0 it is stv1?
I don't know in which version this changed. Or maybe it is not even the version but the configuration which makes the difference.
I just reproduced a another problem yesterday (#20958) and the instance that got created was of platform version stv2
.
@dvob @feberl taking a look into this it appears that there hasn't been an API version update for API Management for a while now - and even then there's nothing particularly standing out to me within the diff
for this year that would have caused this change: https://github.com/hashicorp/terraform-provider-azurerm/commits/main/internal/services/apimanagement
As such I'd wager this is probably a change within the API - if you're still seeing stv1
and stv2
being provisioned based on the version of the provider being used, which regions are you deploying into?
Thanks!
I think I know what the problem is. There is an implict case distinction in the API. Unfortenately this is not well documented in your docs as the public_ip_address_id is Optional without further explaination.
I'd recommend to update the docs and maybe make this setting required when API Managment gets deployed to a VNET
I am deploying the APIM to region eastus with azurerm provider version 3.57.0 and I systematically get the stv1 platform. However, if I install the APIM through the portal to region eastus, then I systematically get platform stv2.
@feberl With azurerm version 3.47.0 the created APIM instances are of platform version
stv2
.
This is not true
The issue is you must supply a public IP for the external vnet to work. The provider, at least in the documetation does not mention it at all.
To me this is solved. As @feberl explained in the diagram, as soon as you create an APIM with a public IP (Static with domain name label) AND that you join it to a subnet that is linked to a network security group, the APIM will be created in stv2
For me, it's solved too, by first the addition of a public IP:
resource "azurerm_public_ip" "apim" {
name = "apim-ip"
location = var.location
resource_group_name = var.resource_group_name
domain_name_label = local.apim_name
allocation_method = "Static"
sku = "Standard"
ddos_protection_mode = "Enabled"
tags = var.tags
}
and then linking that public ip with my APIM
resource "azurerm_api_management" "apim" {
name = local.apim_name
location = var.location
resource_group_name = var.resource_group_name
virtual_network_type = "External"
[...]
public_ip_address_id = azurerm_public_ip.apim.id
virtual_network_configuration {
subnet_id = var.subnet_id
}
}
@feberl With azurerm version 3.47.0 the created APIM instances are of platform version
stv2
.This is not true
Confirmed - I deployed my first and so far only APIM instance with 3.77, internal only, no public IP, on a subnet and NSG also created and managed by TF on 3.77. It created an stv2 platform version type.
If an APIM instance is internal and there is no public IP, then TF should allow an option to specify the platform version similar to what was in #23443 .
Is there an existing issue for this?
Community Note
Terraform Version
1.2.9
AzureRM Provider Version
3.33.0
Affected Resource(s)/Data Source(s)
azurem_api_management
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Creates a APIM with PlatformVersion stv2
Actual Behaviour
Creates a APIM with PlatformVersion stv1
Steps to Reproduce
Important Factoids
Microsoft will retire stv1 in August 2024: https://learn.microsoft.com/en-us/azure/api-management/breaking-changes/stv1-platform-retirement-august-2024
References
No response