diff --git a/builder/azure/arm/builder.go b/builder/azure/arm/builder.go index 84c99108..13cce3b3 100644 --- a/builder/azure/arm/builder.go +++ b/builder/azure/arm/builder.go @@ -134,10 +134,10 @@ func (b *Builder) Run(ctx context.Context, ui packersdk.Ui, hook packersdk.Hook) if b.config.ClientConfig.ObjectID == "" && b.config.OSType != constants.Target_Linux { return nil, fmt.Errorf("could not determine the ObjectID for the user, which is required for Windows builds") } - publicIPWarning := "On March 31, 2025, Azure will no longer allow the creation of public IP addresses with a Basic SKU, which is the default SKU type for this builder. You are seeing this warning because this build will create a new temporary public IP address using the `Basic` sku. You can remove this warning by setting the standard public IP SKU (`public_ip_sku`) field to `Standard`. This builder will update its default value from `Basic` to `Standard` in a future release closer to Azure’s removal date. You can learn more about this change in the official Azure announcement https://azure.microsoft.com/en-us/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/." + publicIPWarning := "On March 31, 2025, Azure will no longer allow the creation of public IP addresses with a Basic SKU, this builder has been updated to use Standard IP SKUs by default. You are seeing this warning because this build will create a new temporary public IP address using the `Basic` sku. You can remove this warning by setting the standard public IP SKU (`public_ip_sku`) field to `Standard`,or simply don't set public_ip_sku, as its default is standard. You can learn more about this change in the official Azure announcement https://azure.microsoft.com/en-us/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/." // If the user is bringing their own vnet, don't warn, if its an invalid SKU it will get disabled at a different date and Microsoft will send out warings if b.config.VirtualNetworkName == "" { - if b.config.PublicIpSKU == "" || b.config.PublicIpSKU == string(publicipaddresses.PublicIPAddressSkuNameBasic) { + if b.config.PublicIpSKU == string(publicipaddresses.PublicIPAddressSkuNameBasic) { ui.Message(publicIPWarning) } } diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index bdbb27b3..5eaba270 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -637,8 +637,8 @@ type Config struct { EncryptionAtHost *bool `mapstructure:"encryption_at_host" required:"false"` // Specify the Public IP Address SKU for the public IP used to connect to the build Virtual machine. - // Valid values are `Basic` and `Standard`. The default value is `Basic`. - // On 31 March 2025 Azure will remove the ability to create `Basic` SKU public IPs, before then the plugin will be updated to create a Standard public IP by default + // Valid values are `Basic` and `Standard`. The default value is `Standard`. + // On 31 March 2025 Azure will remove the ability to create `Basic` SKU public IPs, we reccomend upgrading as soon as possible // You can learn more about public IP SKUs [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-addresses#sku) PublicIpSKU string `mapstructure:"public_ip_sku" required:"false"` diff --git a/builder/azure/arm/template_factory.go b/builder/azure/arm/template_factory.go index c06cc37f..0df9a27b 100644 --- a/builder/azure/arm/template_factory.go +++ b/builder/azure/arm/template_factory.go @@ -331,7 +331,8 @@ func GetVirtualMachineTemplateBuilder(config *Config) (*template.TemplateBuilder } } - if config.PublicIpSKU == "Standard" { + // Standard is the default, basic will no longer be supported in the future + if config.PublicIpSKU != "Basic" { err = builder.SetPublicIPSKU("Standard", "Regional") if err != nil { return nil, err