Skip to content
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

Upgrade to v6 major #2367

Merged
merged 77 commits into from
Sep 23, 2024
Merged

Upgrade to v6 major #2367

merged 77 commits into from
Sep 23, 2024

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Aug 28, 2024

Fixes #2348
Fixes #2336

  1. Update CI workflows
  2. Update upstream (rebase patches)
  3. Update provider & examples module versions
  4. Generate schema & SDKs
    • Remove resources as needed.
    • Add patch to remove resources that were documented as removed but left in the code.
    • Fix nodejs CosmosDb overlay connection string.
  5. Update readme
  6. Move to new upgrade testing framework
  7. Add tests & state migrations for enums becoming case sensitive which could lead to replacements.

Migration Guide

Version 6 of the Azure Classic provider is the first major release since April 2022. There are some breaking changes which are detailed in this document. Version 6 of the pulumi-azure provider is based on version 4 of the terraform provider. The original release notes can be found in the 4.0 upgrade guide.

Upgrade to version 5.89.0 of the provider and resolve any deprecation warnings before moving to version 6.

Subscription ID is now mandatory

The subscription id configuration is now always required. This can be set via the environment variable ARM_SUBSCRIPTION_ID or the provider configuration property subscriptionId. This was already required when using any authentication method except for the CLI.

Provider Registration Options

The previous version of the provider would automatically register a predefined list of resource providers in Azure, unless disabled with the skipProviderRegistration configuration option.

In version 6, the default set of resource providers is reduced to a smaller default set with the option to specify an alternative pre-defined set and specify a custom list of resource providers.

  • resourceProviderRegistrations is the name of the set of resource providers to automatically register.
    • core - A minimal set of RPs that are deemed necessary for a subscription, the list of RPs in this set can be found upstream here
    • extended - An expanded set of RPs as suggested by the community, the list of RPs in this set can be found upstream here
    • all - A complete set of RPs that might be needed to utilize any functionality in the provider, the list of RPs in this set can be found upstream here
    • none - No resource providers should be automatically registered
    • legacy - A set of automatically registered RPs from earlier versions of the provider, this is only provided for forwards compatibility and will be removed in a future major version release
  • resourceProvidersToRegisters is a list of resource provider names to register in addition to the set specified with resourceProviderRegistrations

Case Sensitive Enums

In the previous upstream version enum strings were made case sensitive for better strictness and to resolve some persistent diff issues. We delayed passing on this change until this next major version to ensure we had a good migration experience which could avoid fixing the case causing replacements.

Once you have upgraded to v6, performing a preview will report any properties with incorrect casing and will indicate the allowed values. The casing will need to be fixed in your program before being able to continue with your deployment.

List of resource properties affected

Resource Properties
appservice.AppService dotnetFrameworkVersion
javaContainer
managedPipelineMode
remoteDebuggingVersion
appservice.CertificateOrder productType
appservice.FunctionApp dotnetFrameworkVersion
analysisservices.Server querypoolConnectionMode
automation.RunBook runbookType
automation.Schedule frequency
weekDays
monthlyOccurrence
cdn.Endpoint geoFilters.action
optimizationType
cdn.Profile sku
compute.Image osDisk.osType
osDisk.osState
osDisk.caching
dataDisk.caching
compute.Snapshot createOption
compute.VirtualMachineDataDiskAttachment caching
createOption
containers.ContainerGroup ipAddressType
osType
restartPolicy
containers.KubernetesCluster loadBalancerSku
cosmos.Account offerType
kind
consistencyPolicy.consistencyLevel
capabilities.name
cosmos.GremlinGraph indexingMode
dns.CaaRecord record.tag
eventhub.Namespace sku
eventhub.EventHub encoding
network.FirewallPolicy intrusionDetection.trafficBypasses.protocol
hdinsight.HBaseCluster tier
roles.*.vmSize
hdinsight.HadoopCluster tier
roles.*.vmSize
hdinsight.InteractiveQueryCluster tier
roles.*.vmSize
hdinsight.KafkaCluster tier
roles.*.vmSize
hdinsight.SparkCluster tier
roles.*.vmSize
iotcentral.Application sku
iot.IoTHub endpoint.encoding
keyvault.Certificate certificatePolicy.keyProperties.keyType
compute.VirtualMachine licenseType
storageOsDisk.osType
storageOsDisk.managedDiskType
storageDataDisk.managedDiskType
osProfileWindowsConfig.winrm.protocol
compute.ScaleSet licenseType
upgradePolicyMode
priority
storageProfileOsDisk.managedDiskType
storageProfileDataDisk.managedDiskType
lb.LoadBalancer sku
lb.NatPool protocol
lb.NatRule protocol
lb.Probe protocol
lb.Rule protocol
loganalytics.DataSourceWindowsEvent eventTypes
logic.IntegrationAccountBatchConfiguration recurrence.frequency
recurrence.schedule.monthly.weekday
recurrence.schedule.weekDays
logic.Standard connectionString.type
dotnetFrameworkVersion
logz.Monitor plan.billingCycle
plan.planId
plan.usageType
media.ServicesAccount storageAuthenticationType
keyDeliveryAccessControl.defaultAction
monitor.MonitorAutoscaleSetting profile.recurrence.days
mssql.Database threatDetectionPolicy.disabledAlerts
threatDetectionPolicy.emailAccountAdmins
threatDetectionPolicy.state
mssql.Elasticpool sku.name
sku.tier
sku.family
mssql.ServerSecurityAlertPolicy state
mysql.Server version
network.ApplicationGateway backendHttpSettings.protocol
backendHttpSettings.cookieBasedAffinity
frontendIpConfiguration.privateIpAddressAllocation
httpListener.protocol
privateLinkConfiguration.ipConfiguration.privateIpAddressAllocation
sku.name
sku.tier
probe.protocol
wafConfiguration.firewallMode
network.ExpressRouteCircuit sku.tier
sku.family
network.NetworkSecurityGroup securityRule.protocol
securityRule.access
securityRule.direction
network.NetworkSecurityRule protocol
access
direction
network.PublicIpPrefix ipVersion
network.PublicIp ipVersion
sku
network.Route nextHopType
network.RouteTable nextHopType
network.VirtualNetworkGatewayConnection type
ipsecPolicy.dhGroup
ipsecPolicy.ikeEncryption
ipsecPolicy.ikeIntegrity
network.VirtualNetworkGateway type
vpnType
vpnClientConfiguration.vpnClientProtocols
notificationhub.NotificationHubNamespace namespaceType
policy.PolicyDefinition policyType
postgresql.Server version
recoveryservices.Vault sku
recoveryservices.ReplicatedVM targetDiskType
targetReplicaDiskType
redis.Cache skuName
redis.LinkedServer serverRole
securitycenter.Automation action.type
ruleSet.rule.operator
ruleSet.rule.propertyType
servicebus.Namespace sku
servicebus.SubscriptionRule filterType
servicebus.Topic status
sql.Database createMode
import.storageKeyType
import.authenticationType
import.operationMode
edition
threatDetectionPolicy.disabledAlerts
threatDetectionPolicy.emailAccountAdmins
threatDetectionPolicy.state
sql.ManagedInstance licenseType
sql.SqlServer threatDetectionPolicy.disabledAlerts
threatDetectionPolicy.state
storage.Account accountKind
accountTier
accountReplicationType
accessTier
networkRules.bypass
synapse.SqlPoolSecurityAlertPolicy policyState
synapse.WorkspaceSecurityAlertPolicy policyState
trafficmanager.Profile monitorConfig.protocol
profileStatus

Removed Resources

Resources which were previously deprecated have now been removed. Some removed resources have direct replacements which can be directly migrated to by updating your code. Other services have been retired by Azure and therefore have no direct migration to an alternative.

Replaced Resources

These resources were previously deprecated and have now been removed in favor of a new resource. To migrate to the replacement resource, update your Pulumi program to use the new type, leaving the logical name the same, and fix any properties which don’t align, then your existing resource will automatically be migrated.

Removed Resource Replacement Resource
core.TemplateDeployment core.ResourceGroupTemplateDeployment
portal.Dashboard portal.PortalDashboard
databricks.WorkspaceCustomerManagedKey databricks.WorkspaceRootDbfsCustomerManagedKey
datafactory.IntegrationRuntimeManaged datafactory.IntegrationRuntimeSsis
graph.Account graph.ServicesAccount
monitoring.ActionRuleActionGroup monitoring.AlertProcessingRuleActionGroup
monitoring.ActionRuleSuppression monitoring.AlertProcessingRuleSuppression
sql.Database mssql.Database
sql.ElasticPool mssql.ElasticPool
sql.FailoverGroup mssql.FailoverGroup
sql.FirewallRule mssql.FirewallRule
sql.ManagedDatabase mssql.ManagedDatabase
sql.ManagedInstanceActiveDirectoryAdministrator mssql.ManagedInstanceActiveDirectoryAdministrator
sql.ManagedInstanceFailoverGroup mssql.ManagedInstanceFailoverGroup
sql.ManagedInstance mssql.ManagedInstance
sql.SqlServer mssql.Server
sql.VirtualNetworkRule mssql.VirtualNetworkRule

Replaced Data Sources

Removed Data Source Replacement Data Source
hybrid.getComputeMachine arcmachine.get

Retired Resources

These resource do not have a direct replacement and the old resource will need to be deleted or removed from state then recreated using alternative resources.

Retired Resource Notes
appservice.Environment This resource covered App Service Environment v1 and v2 which were retired on 2024-08-31. ASE v3 is current, and covered by appservice.EnvironmentV3.
cdn.FrontdoorRouteDisableLinkToDefaultDomain This resource is superseded by the linkToDefaultDomain property in the cdn.FrontdoorRoute resource.
cosmosdb.NotebookWorkspace CosmosDb Notebook Workspace is deprecated by Azure and only offers short-lived notebooks at this point.
databoxedge.Order The creation of DataBox Edge Orders is not supported by the Azure API.
servicebus.NamespaceNetworkRuleSet This resource is superseded by the networkRuleSet property in the servicebus.Namespace resource.
sql.ActiveDirectoryAdministrator This resource is superseded by the azureadAdministrator property in the mssql.Server resource.

Retired Services

Service Resources Notes
iot TimeSeriesInsightsAccessPolicy
TimeSeriesInsightsEventSourceEventhub
TimeSeriesInsightsEventSourceIothub
TimeSeriesInsightsGen2Environment
TimeSeriesInsightsReferenceDataSet
TimeSeriesInsightsStandardEnvironment
This Azure Service will be retired on 2025-03-31.
lab Lab
Schedule
ServicePlan
User
This Azure service is deprecated and on the road to retirement.
monitoring LogzMonitor
LogzSubAccount
LogzSubAccountTagRule
LogzTagRule
This Azure service is being retired.
mariadb Configuration
Database
FirewallRule
Server
VirtualNetworkRule
getMariaDbServer
This service is replaced by MySQL Flexible Server.
media AccountFilter
AssetFilter
Asset
ContentKeyPolicy
Job
LiveEvent
LiveEventOutput
ServiceAccount
StreamingEndpoint
StreamingLocator
StreamingPolicy
Transform
Azure Media Services was retired June 30th, 2024.
mediaservices Account Azure Media Services was retired June 30th, 2024.
mysql ActiveDirectoryAdministrator
Configuration
Database
FirewallRule
Server
ServerKey
VirtualNetworkRule
getServer
Azure Database for MySQL Single Server was retired on 2024-09-16 and users should migrate to Azure Database for MySQL Flexible Server.
videoanalyzer Analyzer
EdgeModule
This service was retired in June 2024.

Resource Property Breaking Changes

About 150 resources saw changes to properties that might require a manual update. For the full list please see the upstream upgrade guide.

  • 16 properties are no longer “Computed”. If you experience a diff as a result of this change you may need to use ignoreChanges.
  • 31 properties had their default value updated.
  • 4 resources have new properties that are required, so you’ll need to add them if you use these resources.
  • 32 deprecated properties were removed (10 from KubernetesCluster).
  • The other changes are properties that were renamed or replaced by a related property.

Other

Instances of the apimanagement.ApiTag resource will need to be recreated upon upgrading so that the tag revision can be included in the resource ID.

- Remove resources as needed.
- Add patch to remove resources that were documented as removed but left in the code.
- Fix nodejs CosmosDb overlay connection string.
@danielrbradley danielrbradley requested review from thomas11 and a team August 28, 2024 16:54
@danielrbradley danielrbradley self-assigned this Aug 28, 2024
Copy link

github-actions bot commented Aug 28, 2024

Does the PR have any schema changes?

Found 793 breaking changes:

Resources

  • "azure:analysisservices/server:Server":
    • 🟡 inputs: "enablePowerBiService" missing
    • 🟡 properties: "enablePowerBiService" missing output "enablePowerBiService"
    • required:
      • 🟢 "powerBiServiceEnabled" property is no longer Required
      • 🟢 "querypoolConnectionMode" property is no longer Required
  • "azure:apimanagement/api:Api":
    • 🟡 inputs: "soapPassThrough" missing
    • 🟡 properties: "soapPassThrough" missing output "soapPassThrough"
  • "azure:apimanagement/service:Service":
    • 🟡 inputs: "policy" missing
    • 🟡 properties: "policy" missing output "policy"
  • "azure:appinsights/insights:Insights": required:
    • 🟢 "dailyDataCapInGb" property is no longer Required
    • 🟢 "dailyDataCapNotificationsDisabled" property is no longer Required
  • 🟢 "azure:appplatform/springCloudGatewayRouteConfig:SpringCloudGatewayRouteConfig": required inputs: "protocol" input has changed to Required
  • 🔴 "azure:appservice/environment:Environment" missing
  • "azure:attestation/provider:Provider":
    • 🟡 inputs: "policies" missing
    • 🟡 properties: "policies" missing output "policies"
  • 🟢 "azure:automation/certificate:Certificate": required: "exportable" property is no longer Required
  • "azure:automation/schedule:Schedule":
    • 🟡 inputs: "monthlyOccurrences" missing
    • 🟡 properties: "monthlyOccurrences" missing output "monthlyOccurrences"
  • "azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration":
    • inputs:
      • 🟡 "linuxes" missing
      • 🟡 "operatingSystem" missing
      • 🟡 "postTasks" missing
      • 🟡 "preTasks" missing
      • 🟡 "schedules" missing
    • properties:
      • 🟡 "errorMeesage" missing output "errorMeesage"
      • 🟡 "linuxes" missing output "linuxes"
      • 🟡 "operatingSystem" missing output "operatingSystem"
      • 🟡 "postTasks" missing output "postTasks"
      • 🟡 "preTasks" missing output "preTasks"
      • 🟡 "schedules" missing output "schedules"
    • 🟢 required inputs: "schedule" input has changed to Required
  • "azure:bot/channelWebChat:ChannelWebChat":
    • 🟡 inputs: "siteNames" missing
    • 🟡 properties: "siteNames" missing output "siteNames"
    • 🟢 required: "sites" property is no longer Required
  • "azure:bot/channelsRegistration:ChannelsRegistration":
    • 🟡 inputs: "isolatedNetworkEnabled" missing
    • 🟡 properties: "isolatedNetworkEnabled" missing output "isolatedNetworkEnabled"
    • required:
      • 🟢 "iconUrl" property is no longer Required
      • 🟢 "publicNetworkAccessEnabled" property is no longer Required
  • "azure:bot/connection:Connection":
    • 🟡 inputs: "tags" missing
    • 🟡 properties: "tags" missing output "tags"
  • "azure:cdn/endpoint:Endpoint": required:
    • 🟢 "contentTypesToCompresses" property is no longer Required
    • 🟢 "originPath" property is no longer Required
    • 🟢 "probePath" property is no longer Required
  • "azure:cdn/frontdoorOrigin:FrontdoorOrigin":
    • 🟡 inputs: "healthProbesEnabled" missing
    • 🟡 properties: "healthProbesEnabled" missing output "healthProbesEnabled"
    • 🟢 required: "enabled" property is no longer Required
  • 🔴 "azure:cdn/frontdoorRouteDisableLinkToDefaultDomain:FrontdoorRouteDisableLinkToDefaultDomain" missing
  • "azure:cognitive/deployment:Deployment":
    • 🟡 inputs: "scale" missing
    • 🟡 properties: "scale" missing output "scale"
    • 🟢 required inputs: "sku" input has changed to Required
  • 🔴 "azure:compute/diskPool:DiskPool" missing
  • 🔴 "azure:compute/diskPoolIscsiTarget:DiskPoolIscsiTarget" missing
  • 🔴 "azure:compute/diskPoolIscsiTargetLun:DiskPoolIscsiTargetLun" missing
  • 🔴 "azure:compute/diskPoolManagedDiskAttachment:DiskPoolManagedDiskAttachment" missing
  • "azure:compute/linuxVirtualMachineScaleSet:LinuxVirtualMachineScaleSet":
    • inputs:
      • 🟡 "galleryApplication" missing
      • 🟡 "scaleInPolicy" missing
      • 🟡 "terminateNotification" missing
    • properties:
      • 🟡 "galleryApplication" missing output "galleryApplication"
      • 🟡 "scaleInPolicy" missing output "scaleInPolicy"
      • 🟡 "terminateNotification" missing output "terminateNotification"
    • required:
      • 🟢 "extensionOperationsEnabled" property is no longer Required
      • 🟢 "galleryApplications" property is no longer Required
      • 🟢 "scaleIn" property is no longer Required
  • 🟢 "azure:compute/orchestratedVirtualMachineScaleSet:OrchestratedVirtualMachineScaleSet": required: "extensionOperationsEnabled" property is no longer Required
  • 🔴 "azure:compute/virtualMachineRestorePointCollection:VirtualMachineRestorePointCollection" missing
  • "azure:compute/windowsVirtualMachineScaleSet:WindowsVirtualMachineScaleSet":
    • inputs:
      • 🟡 "galleryApplication" missing
      • 🟡 "scaleInPolicy" missing
      • 🟡 "terminateNotification" missing
    • properties:
      • 🟡 "galleryApplication" missing output "galleryApplication"
      • 🟡 "scaleInPolicy" missing output "scaleInPolicy"
      • 🟡 "terminateNotification" missing output "terminateNotification"
    • required:
      • 🟢 "extensionOperationsEnabled" property is no longer Required
      • 🟢 "galleryApplications" property is no longer Required
      • 🟢 "scaleIn" property is no longer Required
  • 🟢 "azure:connections/apiConnection:ApiConnection": required: "displayName" property is no longer Required
  • "azure:containerapp/job:Job":
    • inputs:
      • 🟡 "registry" missing
      • 🟡 "secret" missing
    • properties:
      • 🟡 "registry" missing output "registry"
      • 🟡 "secret" missing output "secret"
    • required:
      • 🟢 "registries" property is no longer Required
      • 🟢 "secrets" property is no longer Required
  • "azure:containerservice/kubernetesCluster:KubernetesCluster":
    • inputs:
      • 🟡 "apiServerAuthorizedIpRanges" missing
      • 🟡 "automaticChannelUpgrade" missing
      • 🟡 "customCaTrustCertificatesBase64s" missing
      • 🟡 "enablePodSecurityPolicy" missing
      • 🟡 "nodeOsChannelUpgrade" missing
      • 🟡 "publicNetworkAccessEnabled" missing
    • properties:
      • 🟡 "apiServerAuthorizedIpRanges" missing output "apiServerAuthorizedIpRanges"
      • 🟡 "automaticChannelUpgrade" missing output "automaticChannelUpgrade"
      • 🟡 "customCaTrustCertificatesBase64s" missing output "customCaTrustCertificatesBase64s"
      • 🟡 "enablePodSecurityPolicy" missing output "enablePodSecurityPolicy"
      • 🟡 "nodeOsChannelUpgrade" missing output "nodeOsChannelUpgrade"
      • 🟡 "publicNetworkAccessEnabled" missing output "publicNetworkAccessEnabled"
    • 🟢 required: "apiServerAccessProfile" property is no longer Required
  • "azure:containerservice/kubernetesClusterNodePool:KubernetesClusterNodePool":
    • inputs:
      • 🟡 "customCaTrustEnabled" missing
      • 🟡 "enableAutoScaling" missing
      • 🟡 "enableHostEncryption" missing
      • 🟡 "enableNodePublicIp" missing
      • 🟡 "messageOfTheDay" missing
    • properties:
      • 🟡 "customCaTrustEnabled" missing output "customCaTrustEnabled"
      • 🟡 "enableAutoScaling" missing output "enableAutoScaling"
      • 🟡 "enableHostEncryption" missing output "enableHostEncryption"
      • 🟡 "enableNodePublicIp" missing output "enableNodePublicIp"
      • 🟡 "messageOfTheDay" missing output "messageOfTheDay"
  • "azure:containerservice/registry:Registry":
    • inputs:
      • 🟡 "retentionPolicy" missing
      • 🟡 "trustPolicy" missing
    • properties:
      • 🟡 "retentionPolicy" missing output "retentionPolicy"
      • 🟡 "trustPolicy" missing output "trustPolicy"
  • "azure:core/resourceGroupPolicyRemediation:ResourceGroupPolicyRemediation":
    • 🟡 inputs: "policyDefinitionId" missing
    • 🟡 properties: "policyDefinitionId" missing output "policyDefinitionId"
  • "azure:core/resourcePolicyRemediation:ResourcePolicyRemediation":
    • 🟡 inputs: "policyDefinitionId" missing
    • 🟡 properties: "policyDefinitionId" missing output "policyDefinitionId"
  • "azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation":
    • 🟡 inputs: "policyDefinitionId" missing
    • 🟡 properties: "policyDefinitionId" missing output "policyDefinitionId"
  • 🔴 "azure:core/templateDeployment:TemplateDeployment" missing
  • "azure:cosmosdb/account:Account":
    • inputs:
      • 🟡 "enableAutomaticFailover" missing
      • 🟡 "enableFreeTier" missing
      • 🟡 "enableMultipleWriteLocations" missing
      • 🟡 "ipRangeFilter" missing
    • properties:
      • 🟡 "connectionStrings" missing output "connectionStrings"
      • 🟡 "enableAutomaticFailover" missing output "enableAutomaticFailover"
      • 🟡 "enableFreeTier" missing output "enableFreeTier"
      • 🟡 "enableMultipleWriteLocations" missing output "enableMultipleWriteLocations"
      • 🟡 "ipRangeFilter" missing output "ipRangeFilter"
    • required:
      • 🟢 "automaticFailoverEnabled" property is no longer Required
      • 🟢 "freeTierEnabled" property is no longer Required
      • 🟢 "minimalTlsVersion" property is no longer Required
      • 🟢 "multipleWriteLocationsEnabled" property is no longer Required
  • 🟢 "azure:cosmosdb/cassandraDatacenter:CassandraDatacenter": required: "skuName" property is no longer Required
  • 🔴 "azure:cosmosdb/notebookWorkspace:NotebookWorkspace" missing
  • "azure:cosmosdb/sqlContainer:SqlContainer":
    • 🟡 inputs: "partitionKeyPath" missing
    • 🟡 properties: "partitionKeyPath" missing output "partitionKeyPath"
    • 🟢 required inputs: "partitionKeyPaths" input has changed to Required
  • 🔴 "azure:dashboard/dashboard:Dashboard" missing
  • 🟢 "azure:dashboard/grafana:Grafana": required inputs: "grafanaMajorVersion" input has changed to Required
  • 🔴 "azure:databoxedge/order:Order" missing
  • 🟢 "azure:databricks/workspace:Workspace": required: "networkSecurityGroupRulesRequired" property is no longer Required
  • 🔴 "azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey" missing
  • 🔴 "azure:datafactory/integrationRuntimeManaged:IntegrationRuntimeManaged" missing
  • 🟢 "azure:datafactory/integrationRuntimeRule:IntegrationRuntimeRule": required: "cleanupEnabled" property is no longer Required
  • "azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage":
    • 🟡 inputs: "retentionDuration" missing
    • 🟡 properties: "retentionDuration" missing output "retentionDuration"
    • 🟢 required: "operationalDefaultRetentionDuration" property is no longer Required
  • "azure:devtest/lab:Lab":
    • 🟡 inputs: "storageType" missing
    • 🟡 properties: "storageType" missing output "storageType"
  • 🟢 "azure:digitaltwins/timeSeriesDatabaseConnection:TimeSeriesDatabaseConnection": required: "kustoTableName" property is no longer Required
  • 🟢 "azure:elasticcloud/elasticsearch:Elasticsearch": required: "logs" property is no longer Required
  • "azure:eventhub/eventHubNamespace:EventHubNamespace":
    • 🟡 inputs: "zoneRedundant" missing
    • 🟡 properties: "zoneRedundant" missing output "zoneRedundant"
    • 🟢 required: "minimumTlsVersion" property is no longer Required
  • "azure:eventhub/namespace:Namespace":
    • 🟡 inputs: "zoneRedundant" missing
    • 🟡 properties: "zoneRedundant" missing output "zoneRedundant"
    • 🟢 required: "minimumTlsVersion" property is no longer Required
  • "azure:eventhub/queue:Queue":
    • inputs:
      • 🟡 "enableBatchedOperations" missing
      • 🟡 "enableExpress" missing
      • 🟡 "enablePartitioning" missing
    • properties:
      • 🟡 "enableBatchedOperations" missing output "enableBatchedOperations"
      • 🟡 "enableExpress" missing output "enableExpress"
      • 🟡 "enablePartitioning" missing output "enablePartitioning"
    • required:
      • 🟢 "autoDeleteOnIdle" property is no longer Required
      • 🟢 "batchedOperationsEnabled" property is no longer Required
      • 🟢 "defaultMessageTtl" property is no longer Required
      • 🟢 "duplicateDetectionHistoryTimeWindow" property is no longer Required
      • 🟢 "expressEnabled" property is no longer Required
      • 🟢 "lockDuration" property is no longer Required
      • 🟢 "partitioningEnabled" property is no longer Required
  • "azure:eventhub/subscription:Subscription":
    • 🟡 inputs: "enableBatchedOperations" missing
    • 🟡 properties: "enableBatchedOperations" missing output "enableBatchedOperations"
    • required:
      • 🟢 "autoDeleteOnIdle" property is no longer Required
      • 🟢 "batchedOperationsEnabled" property is no longer Required
      • 🟢 "defaultMessageTtl" property is no longer Required
      • 🟢 "lockDuration" property is no longer Required
  • "azure:eventhub/topic:Topic":
    • inputs:
      • 🟡 "enableBatchedOperations" missing
      • 🟡 "enableExpress" missing
      • 🟡 "enablePartitioning" missing
    • properties:
      • 🟡 "enableBatchedOperations" missing output "enableBatchedOperations"
      • 🟡 "enableExpress" missing output "enableExpress"
      • 🟡 "enablePartitioning" missing output "enablePartitioning"
    • required:
      • 🟢 "autoDeleteOnIdle" property is no longer Required
      • 🟢 "batchedOperationsEnabled" property is no longer Required
      • 🟢 "defaultMessageTtl" property is no longer Required
      • 🟢 "duplicateDetectionHistoryTimeWindow" property is no longer Required
      • 🟢 "expressEnabled" property is no longer Required
      • 🟢 "partitioningEnabled" property is no longer Required
  • 🔴 "azure:graph/account:Account" missing
  • "azure:iot/ioTHub:IoTHub": required:
    • 🟢 "eventHubPartitionCount" property is no longer Required
    • 🟢 "eventHubRetentionInDays" property is no longer Required
  • 🔴 "azure:iot/timeSeriesInsightsAccessPolicy:TimeSeriesInsightsAccessPolicy" missing
  • 🔴 "azure:iot/timeSeriesInsightsEventSourceEventhub:TimeSeriesInsightsEventSourceEventhub" missing
  • 🔴 "azure:iot/timeSeriesInsightsEventSourceIothub:TimeSeriesInsightsEventSourceIothub" missing
  • 🔴 "azure:iot/timeSeriesInsightsGen2Environment:TimeSeriesInsightsGen2Environment" missing
  • 🔴 "azure:iot/timeSeriesInsightsReferenceDataSet:TimeSeriesInsightsReferenceDataSet" missing
  • 🔴 "azure:iot/timeSeriesInsightsStandardEnvironment:TimeSeriesInsightsStandardEnvironment" missing
  • 🟢 "azure:iotcentral/application:Application": required: "template" property is no longer Required
  • 🟢 "azure:keyvault/certificateContacts:CertificateContacts": required: "contacts" property is no longer Required
  • "azure:keyvault/managedHardwareSecurityModuleRoleAssignment:ManagedHardwareSecurityModuleRoleAssignment":
    • 🟡 inputs: "vaultBaseUrl" missing
    • 🟡 properties: "vaultBaseUrl" missing output "vaultBaseUrl"
    • 🟢 required inputs: "managedHsmId" input has changed to Required
  • "azure:keyvault/managedHardwareSecurityModuleRoleDefinition:ManagedHardwareSecurityModuleRoleDefinition":
    • 🟡 inputs: "vaultBaseUrl" missing
    • 🟡 properties: "vaultBaseUrl" missing output "vaultBaseUrl"
    • 🟢 required inputs: "managedHsmId" input has changed to Required
  • "azure:kusto/cluster:Cluster":
    • inputs:
      • 🟡 "engine" missing
      • 🟡 "languageExtensions": items type changed from "string" to "#/types/azure:kusto/ClusterLanguageExtension:ClusterLanguageExtension"
    • properties:
      • 🟡 "engine" missing output "engine"
      • 🟡 "languageExtensions": items type changed from "string" to "#/types/azure:kusto/ClusterLanguageExtension:ClusterLanguageExtension"
  • 🔴 "azure:lab/lab:Lab" missing
  • 🔴 "azure:lab/schedule:Schedule" missing
  • 🔴 "azure:lab/servicePlan:ServicePlan" missing
  • 🔴 "azure:lab/user:User" missing
  • 🟢 "azure:lb/natRule:NatRule": required: "idleTimeoutInMinutes" property is no longer Required
  • "azure:lb/rule:Rule": required:
    • 🟢 "idleTimeoutInMinutes" property is no longer Required
    • 🟢 "loadDistribution" property is no longer Required
  • 🔴 "azure:logicapps/interationServiceEnvironment:InterationServiceEnvironment" missing
  • 🟢 "azure:machinelearning/computeCluster:ComputeCluster": required: "sshPublicAccessEnabled" property is no longer Required
  • "azure:machinelearning/computeInstance:ComputeInstance":
    • 🟡 inputs: "location" missing
    • 🟡 properties: "location" missing output "location"
  • "azure:machinelearning/workspace:Workspace":
    • 🟡 inputs: "publicAccessBehindVirtualNetworkEnabled" missing
    • 🟡 properties: "publicAccessBehindVirtualNetworkEnabled" missing output "publicAccessBehindVirtualNetworkEnabled"
    • 🟢 required: "publicNetworkAccessEnabled" property is no longer Required
  • "azure:managedapplication/application:Application":
    • 🟡 inputs: "parameters" missing
    • 🟡 properties: "parameters" missing output "parameters"
  • "azure:management/groupPolicyRemediation:GroupPolicyRemediation":
    • inputs:
      • 🟡 "policyDefinitionId" missing
      • 🟡 "resourceDiscoveryMode" missing
    • properties:
      • 🟡 "policyDefinitionId" missing output "policyDefinitionId"
      • 🟡 "resourceDiscoveryMode" missing output "resourceDiscoveryMode"
  • 🔴 "azure:mariadb/configuration:Configuration" missing
  • 🔴 "azure:mariadb/database:Database" missing
  • 🔴 "azure:mariadb/firewallRule:FirewallRule" missing
  • 🔴 "azure:mariadb/server:Server" missing
  • 🔴 "azure:mariadb/virtualNetworkRule:VirtualNetworkRule" missing
  • 🔴 "azure:media/asset:Asset" missing
  • 🔴 "azure:media/assetFilter:AssetFilter" missing
  • 🔴 "azure:media/contentKeyPolicy:ContentKeyPolicy" missing
  • 🔴 "azure:media/job:Job" missing
  • 🔴 "azure:media/liveEvent:LiveEvent" missing
  • 🔴 "azure:media/liveEventOutput:LiveEventOutput" missing
  • 🔴 "azure:media/serviceAccount:ServiceAccount" missing
  • 🔴 "azure:media/streamingEndpoint:StreamingEndpoint" missing
  • 🔴 "azure:media/streamingLocator:StreamingLocator" missing
  • 🔴 "azure:media/streamingPolicy:StreamingPolicy" missing
  • 🔴 "azure:media/transform:Transform" missing
  • 🔴 "azure:mediaservices/account:Account" missing
  • "azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting":
    • 🟡 inputs: "logs" missing
    • 🟡 properties: "logs" missing output "logs"
    • 🟢 required: "enabledLogs" property is no longer Required
  • 🔴 "azure:monitoring/actionRuleActionGroup:ActionRuleActionGroup" missing
  • 🔴 "azure:monitoring/actionRuleSuppression:ActionRuleSuppression" missing
  • "azure:monitoring/diagnosticSetting:DiagnosticSetting":
    • 🟡 inputs: "logs" missing
    • 🟡 properties: "logs" missing output "logs"
    • 🟢 required: "enabledLogs" property is no longer Required
  • 🔴 "azure:monitoring/logProfile:LogProfile" missing
  • 🔴 "azure:monitoring/logzMonitor:LogzMonitor" missing
  • 🔴 "azure:monitoring/logzSubAccount:LogzSubAccount" missing
  • 🔴 "azure:monitoring/logzSubAccountTagRule:LogzSubAccountTagRule" missing
  • 🔴 "azure:monitoring/logzTagRule:LogzTagRule" missing
  • 🟢 "azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2": required inputs: "evaluationFrequency" input has changed to Required
  • 🔴 "azure:mysql/activeDirectoryAdministrator:ActiveDirectoryAdministrator" missing
  • 🔴 "azure:mysql/configuration:Configuration" missing
  • 🔴 "azure:mysql/database:Database" missing
  • 🔴 "azure:mysql/firewallRule:FirewallRule" missing
  • 🔴 "azure:mysql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator" missing
  • 🔴 "azure:mysql/server:Server" missing
  • 🔴 "azure:mysql/serverKey:ServerKey" missing
  • 🔴 "azure:mysql/virtualNetworkRule:VirtualNetworkRule" missing
  • 🟢 "azure:netapp/pool:Pool": required: "qosType" property is no longer Required
  • "azure:netapp/snapshotPolicy:SnapshotPolicy": required:
    • 🟢 "dailySchedule" property is no longer Required
    • 🟢 "hourlySchedule" property is no longer Required
    • 🟢 "monthlySchedule" property is no longer Required
    • 🟢 "weeklySchedule" property is no longer Required
  • 🟢 "azure:netapp/volume:Volume": required: "networkFeatures" property is no longer Required
  • 🟢 "azure:network/expressRoutePort:ExpressRoutePort": required: "billingType" property is no longer Required
  • 🟢 "azure:network/firewallPolicy:FirewallPolicy": required: "sku" property is no longer Required
  • 🟢 "azure:network/networkConnectionMonitor:NetworkConnectionMonitor": required: "outputWorkspaceResourceIds" property is no longer Required
  • "azure:network/networkInterface:NetworkInterface":
    • inputs:
      • 🟡 "enableAcceleratedNetworking" missing
      • 🟡 "enableIpForwarding" missing
    • properties:
      • 🟡 "enableAcceleratedNetworking" missing output "enableAcceleratedNetworking"
      • 🟡 "enableIpForwarding" missing output "enableIpForwarding"
    • required:
      • 🟢 "acceleratedNetworkingEnabled" property is no longer Required
      • 🟢 "dnsServers" property is no longer Required
      • 🟢 "ipForwardingEnabled" property is no longer Required
  • 🔴 "azure:network/networkPacketCapture:NetworkPacketCapture" missing
  • 🟢 "azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog": required: "version" property is no longer Required
  • "azure:network/pointToPointVpnGateway:PointToPointVpnGateway":
    • 🟡 inputs: "connectionConfiguration" missing
    • 🟡 properties: "connectionConfiguration" missing output "connectionConfiguration"
    • 🟢 required inputs: "connectionConfigurations" input has changed to Required
  • "azure:network/routeTable:RouteTable":
    • 🟡 inputs: "disableBgpRoutePropagation" missing
    • 🟡 properties: "disableBgpRoutePropagation" missing output "disableBgpRoutePropagation"
    • 🟢 required: "bgpRoutePropagationEnabled" property is no longer Required
  • "azure:network/subnet:Subnet":
    • inputs:
      • 🟡 "enforcePrivateLinkEndpointNetworkPolicies" missing
      • 🟡 "enforcePrivateLinkServiceNetworkPolicies" missing
      • 🟡 "privateEndpointNetworkPoliciesEnabled" missing
    • properties:
      • 🟡 "enforcePrivateLinkEndpointNetworkPolicies" missing output "enforcePrivateLinkEndpointNetworkPolicies"
      • 🟡 "enforcePrivateLinkServiceNetworkPolicies" missing output "enforcePrivateLinkServiceNetworkPolicies"
      • 🟡 "privateEndpointNetworkPoliciesEnabled" missing output "privateEndpointNetworkPoliciesEnabled"
    • required

New functions:

  • portal/azurerm_portal_dashboard.azurerm_portal_dashboard

Maintainer note: consult the runbook for dealing with any breaking changes.

- Fix config warnings, as backported into ci-mgmt: pulumi/ci-mgmt#1064
  - The configuration option run.skip-files is deprecated, please use issues.exclude-files.
  - The linter named "megacheck" is deprecated. It has been split into: gosimple, staticcheck, unused.
- Remove go:linkname which was added when we weren't maintaining patches and so had to use a compiler hack to set a value. This variable no longer exists so has no effect. Reported error:

    SA9009: ineffectual compiler directive due to extraneous space: "// go:linkname is not widely used outside the standard library, but allows us to" (staticcheck)
- Fix code in tests to match SDK changes.
- Disable "RunUpdateTest" in nodejs as this can't be used with the LocalProviders configuration as it will always use the local provider binary even when using the old SDK. This option is essentially broken and needs replacing with proper upgrade tests.
- It appears we might not have been using the in-memory provider server as YAML programs require a real schema to be served and it was failing with $PATH errors.
- Rename state files to stack files to avoid re-recording.
- Update snapshots to use more generic stack names.
This is now required **as config** not just an environment variable.
Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably update the p-azure dependency in all the examples. ProgramTest substitutes the local build anyways, but using them stand-alone will break.

Manages a Microsoft Graph Services Account.

-!> **NOTE:** This resource has been deprecated in version 3.0 of the AzureRM provider and will be removed in version 4.0. Please use [`azurerm_graph_services_account`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/graph_services_account) resource instead.
+!> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use [`azurerm_graph_services_account`](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/graph_services_account) resource instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those three "NOTES" are still true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might likely have been removed - other docs were, but I think they missed a few.

examples/examples_go_test.go Show resolved Hide resolved
@danielrbradley danielrbradley requested a review from a team September 20, 2024 14:45
Dir: filepath.Join(getCwd(t), "servicebus-migration-test"),
RunUpdateTest: true,
Dir: filepath.Join(getCwd(t), "servicebus-migration-test"),
// RunUpdateTest: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to uncomment this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this was where I found out that our previous "UpdateTest" was installing the older SDK, but then due to the provider binary configuration, was still using the local dev version of the provider ... which broke things while upgrading and was also an ineffective test. We then doubled down on improving our snapshot testing instead.

  • Disable "RunUpdateTest" in nodejs as this can't be used with the LocalProviders configuration as it will always use the local provider binary even when using the old SDK. This option is essentially broken and needs replacing with proper upgrade tests.


func Test_loadbalancer(t *testing.T) {
test(t, filepath.Join("test-programs", "loadbalancer"),
optproviderupgrade.NewSourcePath(filepath.Join("test-programs", "loadbalancer", "v6")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for upgrade tests with known source edits?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup exactly that. The original YAML program has the resource properties for the v5 shape of the properties (or with old case-inacurate values), then the source edit will be applied before running the preview of the captured state with the current (v6+) version of the provider.

}

func Test_cosmosdb(t *testing.T) {
t.Skip("Can't record as all tested regions are returning 'ServiceUnavailable' error")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be linked to an issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably. It might just have been a bad day for Azure as it was specifically saying it was unable to allocate resources.

Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the state transformation tests!

Can you say a few words on the upgrade tests with source edits? We recently ran into this with GCP and copied over some code from AWS but it looks like pulumiTest supports this now - are there limitations there?

cacheDir := providertest.GetUpgradeCacheDir(filepath.Base(dir), "5.89.0")
pt := pulumitest.NewPulumiTest(t, dir,
opttest.AttachProvider("azure",
rpFactory.ReplayInvokes(filepath.Join(cacheDir, "grpc.json"), false /* allowLiveFallback */)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool


func Test_loadbalancer(t *testing.T) {
test(t, filepath.Join("test-programs", "loadbalancer"),
optproviderupgrade.NewSourcePath(filepath.Join("test-programs", "loadbalancer", "v6")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice

Tok: azureResource(azureSiteRecovery, "ReplicatedVM"),
TransformFromState: func(_ context.Context, pm resource.PropertyMap) (resource.PropertyMap, error) {
fixEnumCase(pm, "targetDiskType", "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS")
fixEnumCase(pm, "targetReplicaDiskType", "Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these TransformFromState for enums necessary for all enums?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where I was able to add tests, I confirmed that the test failed without the TransformFromState, however not all resources were possible to get snapshot tests for, so we just added the migration to be safe. There doesn't seem to be much downside as the fixing function is very quick.

Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the state transformation tests!

Can you say a few words on the upgrade tests with source edits? We recently ran into this with GCP and copied over some code from AWS but it looks like pulumiTest supports this now - are there limitations there?

Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the state transformation tests!

Can you say a few words on the upgrade tests with source edits? We recently ran into this with GCP and copied over some code from AWS but it looks like pulumiTest supports this now - are there limitations there?

Copy link
Contributor

@VenelinMartinov VenelinMartinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the state transformation tests!

Can you say a few words on the upgrade tests with source edits? We recently ran into this with GCP and copied over some code from AWS but it looks like pulumiTest supports this now - are there limitations there?

@danielrbradley danielrbradley merged commit 1892762 into master Sep 23, 2024
48 checks passed
@danielrbradley danielrbradley deleted the upgrade-to-v6-major branch September 23, 2024 06:52
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v6.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure 6.0 Upgrade terraform-provider-azurerm to v4.0.0
4 participants