Skip to content

Commit

Permalink
Update classic-azure-ts-vm-scaleset to latest major version 5 and rem…
Browse files Browse the repository at this point in the history
…ove retired email notifications (#1655)

This example was persistently failing tests with
```
    azure:monitoring:AutoscaleSetting (vmss-autoscale):
      error: 1 error occurred:
      	* creating Monitor Autoscale Setting: (Name "vmss-autoscalebe79b75d" / Resource Group "vmss-rg58c1593d"): insights.AutoscaleSettingsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="SendEmailsToAdminCoAdminsNotSupported" Message="Sending email notifications to subscription administrator and coadministrators is not supported after April 3, 2024 due to Azure classic administrator retirement."
```

It was also a major version behind.
  • Loading branch information
thomas11 authored Jul 2, 2024
1 parent 45eeabe commit d13d0f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions classic-azure-ts-vm-scaleset/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,16 @@ const loadBalancer = new azure.lb.LoadBalancer("lb", {
});

const bpepool = new azure.lb.BackendAddressPool("bpepool", {
resourceGroupName: resourceGroup.name,
loadbalancerId: loadBalancer.id,
});

const sshProbe = new azure.lb.Probe("ssh-probe", {
resourceGroupName: resourceGroup.name,
loadbalancerId: loadBalancer.id,
port: applicationPort,
});

const natRule = new azure.lb.Rule("lbnatrule-http", {
resourceGroupName: resourceGroup.name,
backendAddressPoolId: bpepool.id,
backendAddressPoolIds: [bpepool.id],
backendPort: applicationPort,
frontendIpConfigurationName: "PublicIPAddress",
frontendPort: applicationPort,
Expand All @@ -64,7 +61,7 @@ const vnet = new azure.network.VirtualNetwork("vnet", {
const subnet = new azure.network.Subnet("subnet", {
enforcePrivateLinkEndpointNetworkPolicies: false,
resourceGroupName: resourceGroup.name,
addressPrefix: "10.0.2.0/24",
addressPrefixes: ["10.0.2.0/24"],
virtualNetworkName: vnet.name,
});

Expand Down Expand Up @@ -120,13 +117,6 @@ packages:

const autoscale = new azure.monitoring.AutoscaleSetting("vmss-autoscale", {
resourceGroupName: resourceGroup.name,
notification: {
email: {
customEmails: ["[email protected]"],
sendToSubscriptionAdministrator: true,
sendToSubscriptionCoAdministrator: true,
},
},
profiles: [{
capacity: {
default: 1,
Expand Down
2 changes: 1 addition & 1 deletion classic-azure-ts-vm-scaleset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-ts-vm-scaleset",
"version": "0.1.0",
"dependencies": {
"@pulumi/azure": "^4.0.0",
"@pulumi/azure": "^5.0.0",
"@pulumi/pulumi": "^3.0.0",
"@pulumi/random": "^4.0.0"
}
Expand Down

0 comments on commit d13d0f7

Please sign in to comment.