From 029c0632af074db7f05209307a608e32058bf002 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Fri, 29 Mar 2024 03:22:23 -0700 Subject: [PATCH] Upgrade terraform-provider-spotinst to v1.166.0 (#626) This PR was generated via `$ upgrade-provider pulumi/pulumi-spotinst --kind=all --target-bridge-version=latest`. --- - Upgrading terraform-provider-spotinst from 1.165.1 to 1.166.0. Fixes #625 --- .../bridge-metadata.json | 3 + .../cmd/pulumi-resource-spotinst/schema.json | 32 +- provider/go.mod | 2 +- provider/go.sum | 4 +- .../Inputs/StatefulNodeAzureOsDiskArgs.cs | 3 + .../Inputs/StatefulNodeAzureOsDiskGetArgs.cs | 3 + .../Inputs/StatefulNodeAzureStrategyArgs.cs | 11 + .../StatefulNodeAzureStrategyGetArgs.cs | 11 + sdk/dotnet/Outputs/StatefulNodeAzureOsDisk.cs | 4 + .../Outputs/StatefulNodeAzureStrategy.cs | 8 + sdk/dotnet/StatefulNodeAzure.cs | 609 +--------- sdk/go/spotinst/pulumiTypes.go | 53 +- sdk/go/spotinst/statefulNodeAzure.go | 553 +-------- .../pulumi/spotinst/StatefulNodeAzure.java | 518 +-------- .../spotinst/StatefulNodeAzureArgs.java | 34 + .../inputs/StatefulNodeAzureOsDiskArgs.java | 17 + .../inputs/StatefulNodeAzureState.java | 34 + .../inputs/StatefulNodeAzureStrategyArgs.java | 38 + .../outputs/StatefulNodeAzureOsDisk.java | 13 + .../outputs/StatefulNodeAzureStrategy.java | 29 + sdk/nodejs/statefulNodeAzure.ts | 487 +------- sdk/nodejs/types/input.ts | 3 + sdk/nodejs/types/output.ts | 3 + sdk/python/pulumi_spotinst/_inputs.py | 36 + sdk/python/pulumi_spotinst/outputs.py | 28 + .../pulumi_spotinst/stateful_node_azure.py | 1020 ++--------------- upstream | 2 +- 27 files changed, 488 insertions(+), 3070 deletions(-) diff --git a/provider/cmd/pulumi-resource-spotinst/bridge-metadata.json b/provider/cmd/pulumi-resource-spotinst/bridge-metadata.json index 7e8305fa..3e7a1305 100644 --- a/provider/cmd/pulumi-resource-spotinst/bridge-metadata.json +++ b/provider/cmd/pulumi-resource-spotinst/bridge-metadata.json @@ -2282,6 +2282,9 @@ } } }, + "od_windows": { + "maxItemsOne": false + }, "optimization_windows": { "maxItemsOne": false }, diff --git a/provider/cmd/pulumi-resource-spotinst/schema.json b/provider/cmd/pulumi-resource-spotinst/schema.json index e0d89b1f..35c5f029 100644 --- a/provider/cmd/pulumi-resource-spotinst/schema.json +++ b/provider/cmd/pulumi-resource-spotinst/schema.json @@ -8668,6 +8668,9 @@ }, "spotinst:index/StatefulNodeAzureOsDisk:StatefulNodeAzureOsDisk": { "properties": { + "caching": { + "type": "string" + }, "sizeGb": { "type": "integer" }, @@ -8792,6 +8795,9 @@ }, "spotinst:index/StatefulNodeAzureStrategy:StatefulNodeAzureStrategy": { "properties": { + "availabilityVsCost": { + "type": "integer" + }, "capacityReservations": { "type": "array", "items": { @@ -8804,6 +8810,12 @@ "fallbackToOnDemand": { "type": "boolean" }, + "odWindows": { + "type": "array", + "items": { + "type": "string" + } + }, "optimizationWindows": { "type": "array", "items": { @@ -17808,7 +17820,7 @@ } }, "spotinst:index/statefulNodeAzure:StatefulNodeAzure": { - "description": "Provides a Spotinst stateful node Azure resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as spotinst from \"@pulumi/spotinst\";\n\nconst testStatefulNodeAzure = new spotinst.StatefulNodeAzure(\"testStatefulNodeAzure\", {\n region: \"eastus\",\n resourceGroupName: \"spotinst-azure\",\n description: \"example_stateful_node_azure_description\",\n strategy: {\n drainingTimeout: 30,\n fallbackToOnDemand: true,\n optimizationWindows: [\"Tue:19:46-Tue:20:46\"],\n revertToSpot: {\n performAt: \"timeWindow\",\n },\n preferredLifeCycle: \"od\",\n capacityReservations: [{\n shouldUtilize: true,\n utilizationStrategy: \"utilizeOverOD\",\n capacityReservationGroups: [{\n crgName: \"crg name\",\n crgResourceGroupName: \"resourceGroupName\",\n crgShouldPrioritize: true,\n }],\n }],\n },\n os: \"Linux\",\n odSizes: [\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n ],\n spotSizes: [\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n ],\n preferredSpotSizes: [\"standard_ds1_v2\"],\n zones: [\n \"1\",\n \"3\",\n ],\n preferredZone: \"1\",\n customData: \"\",\n shutdownScript: \"\",\n userData: \"\",\n vmName: \"VMName\",\n bootDiagnostics: [{\n isEnabled: true,\n storageUrl: \"https://.blob.core.windows.net/test\",\n type: \"unmanaged\",\n }],\n dataDisks: [\n {\n sizeGb: 1,\n lun: 1,\n type: \"Standard_LRS\",\n },\n {\n sizeGb: 10,\n lun: 2,\n type: \"Standard_LRS\",\n },\n ],\n extensions: [{\n name: \"extensionName\",\n type: \"customScript\",\n publisher: \"Microsoft.Azure.Extensions\",\n apiVersion: \"2.0\",\n minorVersionAutoUpgrade: true,\n protectedSettings: {\n script: \"IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\",\n },\n }],\n image: {\n marketplaceImages: [{\n publisher: \"Canonical\",\n offer: \"UbuntuServer\",\n sku: \"16.04-LTS\",\n version: \"latest\",\n }],\n },\n loadBalancers: [{\n type: \"loadBalancer\",\n resourceGroupName: \"testResourceGroup\",\n name: \"testLoadBalancer\",\n sku: \"Standard\",\n backendPoolNames: [\n \"testBackendPool1\",\n \"testBackendPool2\",\n ],\n }],\n login: {\n userName: \"admin\",\n sshPublicKey: \"33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\",\n },\n managedServiceIdentities: [{\n name: \"mySI2\",\n resourceGroupName: \"myResourceGroup\",\n }],\n network: {\n networkResourceGroupName: \"subnetResourceGroup\",\n virtualNetworkName: \"vname\",\n networkInterfaces: [{\n isPrimary: true,\n subnetName: \"testSubnet\",\n assignPublicIp: true,\n publicIpSku: \"Standard\",\n networkSecurityGroups: [{\n networkResourceGroupName: \"test\",\n name: \"test\",\n }],\n enableIpForwarding: true,\n privateIpAddresses: [\"172.23.4.20\"],\n additionalIpConfigurations: [{\n name: \"test\",\n privateIpAddressVersion: \"IPv4\",\n }],\n publicIps: [{\n networkResourceGroupName: \"resourceGroup\",\n name: \"test\",\n }],\n applicationSecurityGroups: [{\n networkResourceGroupName: \"AsgResourceGroup\",\n name: \"AsgName\",\n }],\n }],\n },\n osDisk: {\n sizeGb: 30,\n type: \"Standard_LRS\",\n },\n secrets: [{\n sourceVaults: [{\n name: \"string\",\n resourceGroupName: \"string\",\n }],\n vaultCertificates: [{\n certificateUrl: \"string\",\n certificateStore: \"string\",\n }],\n }],\n security: {\n securityType: \"Standard\",\n secureBootEnabled: false,\n vtpmEnabled: false,\n },\n tags: [{\n tagKey: \"Creator\",\n tagValue: \"string\",\n }],\n health: {\n healthCheckTypes: [\"vmState\"],\n unhealthyDuration: 300,\n gracePeriod: 120,\n autoHealing: true,\n },\n shouldPersistOsDisk: false,\n osDiskPersistenceMode: \"reattach\",\n shouldPersistDataDisks: true,\n dataDisksPersistenceMode: \"reattach\",\n shouldPersistNetwork: true,\n schedulingTasks: [\n {\n isEnabled: true,\n type: \"pause\",\n cronExpression: \"44 10 * * *\",\n },\n {\n isEnabled: true,\n type: \"resume\",\n cronExpression: \"48 10 * * *\",\n },\n {\n isEnabled: true,\n type: \"recycle\",\n cronExpression: \"52 10 * * *\",\n },\n ],\n signals: [\n {\n type: \"vmReady\",\n timeout: 20,\n },\n {\n type: \"vmReady\",\n timeout: 40,\n },\n ],\n proximityPlacementGroups: [{\n name: \"TestPPG\",\n resourceGroupName: \"TestResourceGroup\",\n }],\n deletes: [{\n shouldTerminateVm: true,\n networkShouldDeallocate: true,\n networkTtlInHours: 0,\n diskShouldDeallocate: true,\n diskTtlInHours: 0,\n snapshotShouldDeallocate: true,\n snapshotTtlInHours: 0,\n publicIpShouldDeallocate: true,\n publicIpTtlInHours: 0,\n }],\n});\n// -------------------------------------------------------------------\n```\n```python\nimport pulumi\nimport pulumi_spotinst as spotinst\n\ntest_stateful_node_azure = spotinst.StatefulNodeAzure(\"testStatefulNodeAzure\",\n region=\"eastus\",\n resource_group_name=\"spotinst-azure\",\n description=\"example_stateful_node_azure_description\",\n strategy=spotinst.StatefulNodeAzureStrategyArgs(\n draining_timeout=30,\n fallback_to_on_demand=True,\n optimization_windows=[\"Tue:19:46-Tue:20:46\"],\n revert_to_spot=spotinst.StatefulNodeAzureStrategyRevertToSpotArgs(\n perform_at=\"timeWindow\",\n ),\n preferred_life_cycle=\"od\",\n capacity_reservations=[spotinst.StatefulNodeAzureStrategyCapacityReservationArgs(\n should_utilize=True,\n utilization_strategy=\"utilizeOverOD\",\n capacity_reservation_groups=[spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs(\n crg_name=\"crg name\",\n crg_resource_group_name=\"resourceGroupName\",\n crg_should_prioritize=True,\n )],\n )],\n ),\n os=\"Linux\",\n od_sizes=[\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n ],\n spot_sizes=[\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n ],\n preferred_spot_sizes=[\"standard_ds1_v2\"],\n zones=[\n \"1\",\n \"3\",\n ],\n preferred_zone=\"1\",\n custom_data=\"\",\n shutdown_script=\"\",\n user_data=\"\",\n vm_name=\"VMName\",\n boot_diagnostics=[spotinst.StatefulNodeAzureBootDiagnosticArgs(\n is_enabled=True,\n storage_url=\"https://.blob.core.windows.net/test\",\n type=\"unmanaged\",\n )],\n data_disks=[\n spotinst.StatefulNodeAzureDataDiskArgs(\n size_gb=1,\n lun=1,\n type=\"Standard_LRS\",\n ),\n spotinst.StatefulNodeAzureDataDiskArgs(\n size_gb=10,\n lun=2,\n type=\"Standard_LRS\",\n ),\n ],\n extensions=[spotinst.StatefulNodeAzureExtensionArgs(\n name=\"extensionName\",\n type=\"customScript\",\n publisher=\"Microsoft.Azure.Extensions\",\n api_version=\"2.0\",\n minor_version_auto_upgrade=True,\n protected_settings={\n \"script\": \"IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\",\n },\n )],\n image=spotinst.StatefulNodeAzureImageArgs(\n marketplace_images=[spotinst.StatefulNodeAzureImageMarketplaceImageArgs(\n publisher=\"Canonical\",\n offer=\"UbuntuServer\",\n sku=\"16.04-LTS\",\n version=\"latest\",\n )],\n ),\n load_balancers=[spotinst.StatefulNodeAzureLoadBalancerArgs(\n type=\"loadBalancer\",\n resource_group_name=\"testResourceGroup\",\n name=\"testLoadBalancer\",\n sku=\"Standard\",\n backend_pool_names=[\n \"testBackendPool1\",\n \"testBackendPool2\",\n ],\n )],\n login=spotinst.StatefulNodeAzureLoginArgs(\n user_name=\"admin\",\n ssh_public_key=\"33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\",\n ),\n managed_service_identities=[spotinst.StatefulNodeAzureManagedServiceIdentityArgs(\n name=\"mySI2\",\n resource_group_name=\"myResourceGroup\",\n )],\n network=spotinst.StatefulNodeAzureNetworkArgs(\n network_resource_group_name=\"subnetResourceGroup\",\n virtual_network_name=\"vname\",\n network_interfaces=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceArgs(\n is_primary=True,\n subnet_name=\"testSubnet\",\n assign_public_ip=True,\n public_ip_sku=\"Standard\",\n network_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs(\n network_resource_group_name=\"test\",\n name=\"test\",\n )],\n enable_ip_forwarding=True,\n private_ip_addresses=[\"172.23.4.20\"],\n additional_ip_configurations=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs(\n name=\"test\",\n private_ip_address_version=\"IPv4\",\n )],\n public_ips=[spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs(\n network_resource_group_name=\"resourceGroup\",\n name=\"test\",\n )],\n application_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs(\n network_resource_group_name=\"AsgResourceGroup\",\n name=\"AsgName\",\n )],\n )],\n ),\n os_disk=spotinst.StatefulNodeAzureOsDiskArgs(\n size_gb=30,\n type=\"Standard_LRS\",\n ),\n secrets=[spotinst.StatefulNodeAzureSecretArgs(\n source_vaults=[spotinst.StatefulNodeAzureSecretSourceVaultArgs(\n name=\"string\",\n resource_group_name=\"string\",\n )],\n vault_certificates=[spotinst.StatefulNodeAzureSecretVaultCertificateArgs(\n certificate_url=\"string\",\n certificate_store=\"string\",\n )],\n )],\n security=spotinst.StatefulNodeAzureSecurityArgs(\n security_type=\"Standard\",\n secure_boot_enabled=False,\n vtpm_enabled=False,\n ),\n tags=[spotinst.StatefulNodeAzureTagArgs(\n tag_key=\"Creator\",\n tag_value=\"string\",\n )],\n health=spotinst.StatefulNodeAzureHealthArgs(\n health_check_types=[\"vmState\"],\n unhealthy_duration=300,\n grace_period=120,\n auto_healing=True,\n ),\n should_persist_os_disk=False,\n os_disk_persistence_mode=\"reattach\",\n should_persist_data_disks=True,\n data_disks_persistence_mode=\"reattach\",\n should_persist_network=True,\n scheduling_tasks=[\n spotinst.StatefulNodeAzureSchedulingTaskArgs(\n is_enabled=True,\n type=\"pause\",\n cron_expression=\"44 10 * * *\",\n ),\n spotinst.StatefulNodeAzureSchedulingTaskArgs(\n is_enabled=True,\n type=\"resume\",\n cron_expression=\"48 10 * * *\",\n ),\n spotinst.StatefulNodeAzureSchedulingTaskArgs(\n is_enabled=True,\n type=\"recycle\",\n cron_expression=\"52 10 * * *\",\n ),\n ],\n signals=[\n spotinst.StatefulNodeAzureSignalArgs(\n type=\"vmReady\",\n timeout=20,\n ),\n spotinst.StatefulNodeAzureSignalArgs(\n type=\"vmReady\",\n timeout=40,\n ),\n ],\n proximity_placement_groups=[spotinst.StatefulNodeAzureProximityPlacementGroupArgs(\n name=\"TestPPG\",\n resource_group_name=\"TestResourceGroup\",\n )],\n deletes=[spotinst.StatefulNodeAzureDeleteArgs(\n should_terminate_vm=True,\n network_should_deallocate=True,\n network_ttl_in_hours=0,\n disk_should_deallocate=True,\n disk_ttl_in_hours=0,\n snapshot_should_deallocate=True,\n snapshot_ttl_in_hours=0,\n public_ip_should_deallocate=True,\n public_ip_ttl_in_hours=0,\n )])\n# -------------------------------------------------------------------\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing SpotInst = Pulumi.SpotInst;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testStatefulNodeAzure = new SpotInst.StatefulNodeAzure(\"testStatefulNodeAzure\", new()\n {\n Region = \"eastus\",\n ResourceGroupName = \"spotinst-azure\",\n Description = \"example_stateful_node_azure_description\",\n Strategy = new SpotInst.Inputs.StatefulNodeAzureStrategyArgs\n {\n DrainingTimeout = 30,\n FallbackToOnDemand = true,\n OptimizationWindows = new[]\n {\n \"Tue:19:46-Tue:20:46\",\n },\n RevertToSpot = new SpotInst.Inputs.StatefulNodeAzureStrategyRevertToSpotArgs\n {\n PerformAt = \"timeWindow\",\n },\n PreferredLifeCycle = \"od\",\n CapacityReservations = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureStrategyCapacityReservationArgs\n {\n ShouldUtilize = true,\n UtilizationStrategy = \"utilizeOverOD\",\n CapacityReservationGroups = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs\n {\n CrgName = \"crg name\",\n CrgResourceGroupName = \"resourceGroupName\",\n CrgShouldPrioritize = true,\n },\n },\n },\n },\n },\n Os = \"Linux\",\n OdSizes = new[]\n {\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n },\n SpotSizes = new[]\n {\n \"standard_ds1_v2\",\n \"standard_ds2_v2\",\n },\n PreferredSpotSizes = new[]\n {\n \"standard_ds1_v2\",\n },\n Zones = new[]\n {\n \"1\",\n \"3\",\n },\n PreferredZone = \"1\",\n CustomData = \"\",\n ShutdownScript = \"\",\n UserData = \"\",\n VmName = \"VMName\",\n BootDiagnostics = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureBootDiagnosticArgs\n {\n IsEnabled = true,\n StorageUrl = \"https://.blob.core.windows.net/test\",\n Type = \"unmanaged\",\n },\n },\n DataDisks = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureDataDiskArgs\n {\n SizeGb = 1,\n Lun = 1,\n Type = \"Standard_LRS\",\n },\n new SpotInst.Inputs.StatefulNodeAzureDataDiskArgs\n {\n SizeGb = 10,\n Lun = 2,\n Type = \"Standard_LRS\",\n },\n },\n Extensions = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureExtensionArgs\n {\n Name = \"extensionName\",\n Type = \"customScript\",\n Publisher = \"Microsoft.Azure.Extensions\",\n ApiVersion = \"2.0\",\n MinorVersionAutoUpgrade = true,\n ProtectedSettings = \n {\n { \"script\", \"IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\" },\n },\n },\n },\n Image = new SpotInst.Inputs.StatefulNodeAzureImageArgs\n {\n MarketplaceImages = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureImageMarketplaceImageArgs\n {\n Publisher = \"Canonical\",\n Offer = \"UbuntuServer\",\n Sku = \"16.04-LTS\",\n Version = \"latest\",\n },\n },\n },\n LoadBalancers = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureLoadBalancerArgs\n {\n Type = \"loadBalancer\",\n ResourceGroupName = \"testResourceGroup\",\n Name = \"testLoadBalancer\",\n Sku = \"Standard\",\n BackendPoolNames = new[]\n {\n \"testBackendPool1\",\n \"testBackendPool2\",\n },\n },\n },\n Login = new SpotInst.Inputs.StatefulNodeAzureLoginArgs\n {\n UserName = \"admin\",\n SshPublicKey = \"33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\",\n },\n ManagedServiceIdentities = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureManagedServiceIdentityArgs\n {\n Name = \"mySI2\",\n ResourceGroupName = \"myResourceGroup\",\n },\n },\n Network = new SpotInst.Inputs.StatefulNodeAzureNetworkArgs\n {\n NetworkResourceGroupName = \"subnetResourceGroup\",\n VirtualNetworkName = \"vname\",\n NetworkInterfaces = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceArgs\n {\n IsPrimary = true,\n SubnetName = \"testSubnet\",\n AssignPublicIp = true,\n PublicIpSku = \"Standard\",\n NetworkSecurityGroups = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs\n {\n NetworkResourceGroupName = \"test\",\n Name = \"test\",\n },\n },\n EnableIpForwarding = true,\n PrivateIpAddresses = new[]\n {\n \"172.23.4.20\",\n },\n AdditionalIpConfigurations = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs\n {\n Name = \"test\",\n PrivateIpAddressVersion = \"IPv4\",\n },\n },\n PublicIps = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs\n {\n NetworkResourceGroupName = \"resourceGroup\",\n Name = \"test\",\n },\n },\n ApplicationSecurityGroups = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs\n {\n NetworkResourceGroupName = \"AsgResourceGroup\",\n Name = \"AsgName\",\n },\n },\n },\n },\n },\n OsDisk = new SpotInst.Inputs.StatefulNodeAzureOsDiskArgs\n {\n SizeGb = 30,\n Type = \"Standard_LRS\",\n },\n Secrets = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureSecretArgs\n {\n SourceVaults = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureSecretSourceVaultArgs\n {\n Name = \"string\",\n ResourceGroupName = \"string\",\n },\n },\n VaultCertificates = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureSecretVaultCertificateArgs\n {\n CertificateUrl = \"string\",\n CertificateStore = \"string\",\n },\n },\n },\n },\n Security = new SpotInst.Inputs.StatefulNodeAzureSecurityArgs\n {\n SecurityType = \"Standard\",\n SecureBootEnabled = false,\n VtpmEnabled = false,\n },\n Tags = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureTagArgs\n {\n TagKey = \"Creator\",\n TagValue = \"string\",\n },\n },\n Health = new SpotInst.Inputs.StatefulNodeAzureHealthArgs\n {\n HealthCheckTypes = new[]\n {\n \"vmState\",\n },\n UnhealthyDuration = 300,\n GracePeriod = 120,\n AutoHealing = true,\n },\n ShouldPersistOsDisk = false,\n OsDiskPersistenceMode = \"reattach\",\n ShouldPersistDataDisks = true,\n DataDisksPersistenceMode = \"reattach\",\n ShouldPersistNetwork = true,\n SchedulingTasks = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs\n {\n IsEnabled = true,\n Type = \"pause\",\n CronExpression = \"44 10 * * *\",\n },\n new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs\n {\n IsEnabled = true,\n Type = \"resume\",\n CronExpression = \"48 10 * * *\",\n },\n new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs\n {\n IsEnabled = true,\n Type = \"recycle\",\n CronExpression = \"52 10 * * *\",\n },\n },\n Signals = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureSignalArgs\n {\n Type = \"vmReady\",\n Timeout = 20,\n },\n new SpotInst.Inputs.StatefulNodeAzureSignalArgs\n {\n Type = \"vmReady\",\n Timeout = 40,\n },\n },\n ProximityPlacementGroups = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureProximityPlacementGroupArgs\n {\n Name = \"TestPPG\",\n ResourceGroupName = \"TestResourceGroup\",\n },\n },\n Deletes = new[]\n {\n new SpotInst.Inputs.StatefulNodeAzureDeleteArgs\n {\n ShouldTerminateVm = true,\n NetworkShouldDeallocate = true,\n NetworkTtlInHours = 0,\n DiskShouldDeallocate = true,\n DiskTtlInHours = 0,\n SnapshotShouldDeallocate = true,\n SnapshotTtlInHours = 0,\n PublicIpShouldDeallocate = true,\n PublicIpTtlInHours = 0,\n },\n },\n });\n\n // -------------------------------------------------------------------\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-spotinst/sdk/v3/go/spotinst\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := spotinst.NewStatefulNodeAzure(ctx, \"testStatefulNodeAzure\", \u0026spotinst.StatefulNodeAzureArgs{\n\t\t\tRegion: pulumi.String(\"eastus\"),\n\t\t\tResourceGroupName: pulumi.String(\"spotinst-azure\"),\n\t\t\tDescription: pulumi.String(\"example_stateful_node_azure_description\"),\n\t\t\tStrategy: \u0026spotinst.StatefulNodeAzureStrategyArgs{\n\t\t\t\tDrainingTimeout: pulumi.Int(30),\n\t\t\t\tFallbackToOnDemand: pulumi.Bool(true),\n\t\t\t\tOptimizationWindows: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"Tue:19:46-Tue:20:46\"),\n\t\t\t\t},\n\t\t\t\tRevertToSpot: \u0026spotinst.StatefulNodeAzureStrategyRevertToSpotArgs{\n\t\t\t\t\tPerformAt: pulumi.String(\"timeWindow\"),\n\t\t\t\t},\n\t\t\t\tPreferredLifeCycle: pulumi.String(\"od\"),\n\t\t\t\tCapacityReservations: spotinst.StatefulNodeAzureStrategyCapacityReservationArray{\n\t\t\t\t\t\u0026spotinst.StatefulNodeAzureStrategyCapacityReservationArgs{\n\t\t\t\t\t\tShouldUtilize: pulumi.Bool(true),\n\t\t\t\t\t\tUtilizationStrategy: pulumi.String(\"utilizeOverOD\"),\n\t\t\t\t\t\tCapacityReservationGroups: spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArray{\n\t\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs{\n\t\t\t\t\t\t\t\tCrgName: pulumi.String(\"crg name\"),\n\t\t\t\t\t\t\t\tCrgResourceGroupName: pulumi.String(\"resourceGroupName\"),\n\t\t\t\t\t\t\t\tCrgShouldPrioritize: pulumi.Bool(true),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOs: pulumi.String(\"Linux\"),\n\t\t\tOdSizes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"standard_ds1_v2\"),\n\t\t\t\tpulumi.String(\"standard_ds2_v2\"),\n\t\t\t},\n\t\t\tSpotSizes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"standard_ds1_v2\"),\n\t\t\t\tpulumi.String(\"standard_ds2_v2\"),\n\t\t\t},\n\t\t\tPreferredSpotSizes: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"standard_ds1_v2\"),\n\t\t\t},\n\t\t\tZones: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"1\"),\n\t\t\t\tpulumi.String(\"3\"),\n\t\t\t},\n\t\t\tPreferredZone: pulumi.String(\"1\"),\n\t\t\tCustomData: pulumi.String(\"\"),\n\t\t\tShutdownScript: pulumi.String(\"\"),\n\t\t\tUserData: pulumi.String(\"\"),\n\t\t\tVmName: pulumi.String(\"VMName\"),\n\t\t\tBootDiagnostics: spotinst.StatefulNodeAzureBootDiagnosticArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureBootDiagnosticArgs{\n\t\t\t\t\tIsEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUrl: pulumi.String(\"https://.blob.core.windows.net/test\"),\n\t\t\t\t\tType: pulumi.String(\"unmanaged\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tDataDisks: spotinst.StatefulNodeAzureDataDiskArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureDataDiskArgs{\n\t\t\t\t\tSizeGb: pulumi.Int(1),\n\t\t\t\t\tLun: pulumi.Int(1),\n\t\t\t\t\tType: pulumi.String(\"Standard_LRS\"),\n\t\t\t\t},\n\t\t\t\t\u0026spotinst.StatefulNodeAzureDataDiskArgs{\n\t\t\t\t\tSizeGb: pulumi.Int(10),\n\t\t\t\t\tLun: pulumi.Int(2),\n\t\t\t\t\tType: pulumi.String(\"Standard_LRS\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tExtensions: spotinst.StatefulNodeAzureExtensionArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureExtensionArgs{\n\t\t\t\t\tName: pulumi.String(\"extensionName\"),\n\t\t\t\t\tType: pulumi.String(\"customScript\"),\n\t\t\t\t\tPublisher: pulumi.String(\"Microsoft.Azure.Extensions\"),\n\t\t\t\t\tApiVersion: pulumi.String(\"2.0\"),\n\t\t\t\t\tMinorVersionAutoUpgrade: pulumi.Bool(true),\n\t\t\t\t\tProtectedSettings: pulumi.Map{\n\t\t\t\t\t\t\"script\": pulumi.Any(\"IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tImage: \u0026spotinst.StatefulNodeAzureImageArgs{\n\t\t\t\tMarketplaceImages: spotinst.StatefulNodeAzureImageMarketplaceImageArray{\n\t\t\t\t\t\u0026spotinst.StatefulNodeAzureImageMarketplaceImageArgs{\n\t\t\t\t\t\tPublisher: pulumi.String(\"Canonical\"),\n\t\t\t\t\t\tOffer: pulumi.String(\"UbuntuServer\"),\n\t\t\t\t\t\tSku: pulumi.String(\"16.04-LTS\"),\n\t\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tLoadBalancers: spotinst.StatefulNodeAzureLoadBalancerArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureLoadBalancerArgs{\n\t\t\t\t\tType: pulumi.String(\"loadBalancer\"),\n\t\t\t\t\tResourceGroupName: pulumi.String(\"testResourceGroup\"),\n\t\t\t\t\tName: pulumi.String(\"testLoadBalancer\"),\n\t\t\t\t\tSku: pulumi.String(\"Standard\"),\n\t\t\t\t\tBackendPoolNames: pulumi.StringArray{\n\t\t\t\t\t\tpulumi.String(\"testBackendPool1\"),\n\t\t\t\t\t\tpulumi.String(\"testBackendPool2\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tLogin: \u0026spotinst.StatefulNodeAzureLoginArgs{\n\t\t\t\tUserName: pulumi.String(\"admin\"),\n\t\t\t\tSshPublicKey: pulumi.String(\"33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\"),\n\t\t\t},\n\t\t\tManagedServiceIdentities: spotinst.StatefulNodeAzureManagedServiceIdentityArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureManagedServiceIdentityArgs{\n\t\t\t\t\tName: pulumi.String(\"mySI2\"),\n\t\t\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tNetwork: \u0026spotinst.StatefulNodeAzureNetworkArgs{\n\t\t\t\tNetworkResourceGroupName: pulumi.String(\"subnetResourceGroup\"),\n\t\t\t\tVirtualNetworkName: pulumi.String(\"vname\"),\n\t\t\t\tNetworkInterfaces: spotinst.StatefulNodeAzureNetworkNetworkInterfaceArray{\n\t\t\t\t\t\u0026spotinst.StatefulNodeAzureNetworkNetworkInterfaceArgs{\n\t\t\t\t\t\tIsPrimary: pulumi.Bool(true),\n\t\t\t\t\t\tSubnetName: pulumi.String(\"testSubnet\"),\n\t\t\t\t\t\tAssignPublicIp: pulumi.Bool(true),\n\t\t\t\t\t\tPublicIpSku: pulumi.String(\"Standard\"),\n\t\t\t\t\t\tNetworkSecurityGroups: spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArray{\n\t\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs{\n\t\t\t\t\t\t\t\tNetworkResourceGroupName: pulumi.String(\"test\"),\n\t\t\t\t\t\t\t\tName: pulumi.String(\"test\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tEnableIpForwarding: pulumi.Bool(true),\n\t\t\t\t\t\tPrivateIpAddresses: pulumi.StringArray{\n\t\t\t\t\t\t\tpulumi.String(\"172.23.4.20\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tAdditionalIpConfigurations: spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArray{\n\t\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"test\"),\n\t\t\t\t\t\t\t\tPrivateIpAddressVersion: pulumi.String(\"IPv4\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPublicIps: spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArray{\n\t\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs{\n\t\t\t\t\t\t\t\tNetworkResourceGroupName: pulumi.String(\"resourceGroup\"),\n\t\t\t\t\t\t\t\tName: pulumi.String(\"test\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tApplicationSecurityGroups: spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArray{\n\t\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs{\n\t\t\t\t\t\t\t\tNetworkResourceGroupName: pulumi.String(\"AsgResourceGroup\"),\n\t\t\t\t\t\t\t\tName: pulumi.String(\"AsgName\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsDisk: \u0026spotinst.StatefulNodeAzureOsDiskArgs{\n\t\t\t\tSizeGb: pulumi.Int(30),\n\t\t\t\tType: pulumi.String(\"Standard_LRS\"),\n\t\t\t},\n\t\t\tSecrets: spotinst.StatefulNodeAzureSecretArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSecretArgs{\n\t\t\t\t\tSourceVaults: spotinst.StatefulNodeAzureSecretSourceVaultArray{\n\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureSecretSourceVaultArgs{\n\t\t\t\t\t\t\tName: pulumi.String(\"string\"),\n\t\t\t\t\t\t\tResourceGroupName: pulumi.String(\"string\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tVaultCertificates: spotinst.StatefulNodeAzureSecretVaultCertificateArray{\n\t\t\t\t\t\t\u0026spotinst.StatefulNodeAzureSecretVaultCertificateArgs{\n\t\t\t\t\t\t\tCertificateUrl: pulumi.String(\"string\"),\n\t\t\t\t\t\t\tCertificateStore: pulumi.String(\"string\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tSecurity: \u0026spotinst.StatefulNodeAzureSecurityArgs{\n\t\t\t\tSecurityType: pulumi.String(\"Standard\"),\n\t\t\t\tSecureBootEnabled: pulumi.Bool(false),\n\t\t\t\tVtpmEnabled: pulumi.Bool(false),\n\t\t\t},\n\t\t\tTags: spotinst.StatefulNodeAzureTagArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureTagArgs{\n\t\t\t\t\tTagKey: pulumi.String(\"Creator\"),\n\t\t\t\t\tTagValue: pulumi.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHealth: \u0026spotinst.StatefulNodeAzureHealthArgs{\n\t\t\t\tHealthCheckTypes: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"vmState\"),\n\t\t\t\t},\n\t\t\t\tUnhealthyDuration: pulumi.Int(300),\n\t\t\t\tGracePeriod: pulumi.Int(120),\n\t\t\t\tAutoHealing: pulumi.Bool(true),\n\t\t\t},\n\t\t\tShouldPersistOsDisk: pulumi.Bool(false),\n\t\t\tOsDiskPersistenceMode: pulumi.String(\"reattach\"),\n\t\t\tShouldPersistDataDisks: pulumi.Bool(true),\n\t\t\tDataDisksPersistenceMode: pulumi.String(\"reattach\"),\n\t\t\tShouldPersistNetwork: pulumi.Bool(true),\n\t\t\tSchedulingTasks: spotinst.StatefulNodeAzureSchedulingTaskArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSchedulingTaskArgs{\n\t\t\t\t\tIsEnabled: pulumi.Bool(true),\n\t\t\t\t\tType: pulumi.String(\"pause\"),\n\t\t\t\t\tCronExpression: pulumi.String(\"44 10 * * *\"),\n\t\t\t\t},\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSchedulingTaskArgs{\n\t\t\t\t\tIsEnabled: pulumi.Bool(true),\n\t\t\t\t\tType: pulumi.String(\"resume\"),\n\t\t\t\t\tCronExpression: pulumi.String(\"48 10 * * *\"),\n\t\t\t\t},\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSchedulingTaskArgs{\n\t\t\t\t\tIsEnabled: pulumi.Bool(true),\n\t\t\t\t\tType: pulumi.String(\"recycle\"),\n\t\t\t\t\tCronExpression: pulumi.String(\"52 10 * * *\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tSignals: spotinst.StatefulNodeAzureSignalArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSignalArgs{\n\t\t\t\t\tType: pulumi.String(\"vmReady\"),\n\t\t\t\t\tTimeout: pulumi.Int(20),\n\t\t\t\t},\n\t\t\t\t\u0026spotinst.StatefulNodeAzureSignalArgs{\n\t\t\t\t\tType: pulumi.String(\"vmReady\"),\n\t\t\t\t\tTimeout: pulumi.Int(40),\n\t\t\t\t},\n\t\t\t},\n\t\t\tProximityPlacementGroups: spotinst.StatefulNodeAzureProximityPlacementGroupArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureProximityPlacementGroupArgs{\n\t\t\t\t\tName: pulumi.String(\"TestPPG\"),\n\t\t\t\t\tResourceGroupName: pulumi.String(\"TestResourceGroup\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tDeletes: spotinst.StatefulNodeAzureDeleteArray{\n\t\t\t\t\u0026spotinst.StatefulNodeAzureDeleteArgs{\n\t\t\t\t\tShouldTerminateVm: pulumi.Bool(true),\n\t\t\t\t\tNetworkShouldDeallocate: pulumi.Bool(true),\n\t\t\t\t\tNetworkTtlInHours: pulumi.Int(0),\n\t\t\t\t\tDiskShouldDeallocate: pulumi.Bool(true),\n\t\t\t\t\tDiskTtlInHours: pulumi.Int(0),\n\t\t\t\t\tSnapshotShouldDeallocate: pulumi.Bool(true),\n\t\t\t\t\tSnapshotTtlInHours: pulumi.Int(0),\n\t\t\t\t\tPublicIpShouldDeallocate: pulumi.Bool(true),\n\t\t\t\t\tPublicIpTtlInHours: pulumi.Int(0),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.spotinst.StatefulNodeAzure;\nimport com.pulumi.spotinst.StatefulNodeAzureArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureStrategyArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureStrategyRevertToSpotArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureBootDiagnosticArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureDataDiskArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureExtensionArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureImageArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureLoadBalancerArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureLoginArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureManagedServiceIdentityArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureNetworkArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureOsDiskArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureSecretArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureSecurityArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureTagArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureHealthArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureSchedulingTaskArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureSignalArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureProximityPlacementGroupArgs;\nimport com.pulumi.spotinst.inputs.StatefulNodeAzureDeleteArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testStatefulNodeAzure = new StatefulNodeAzure(\"testStatefulNodeAzure\", StatefulNodeAzureArgs.builder() \n .region(\"eastus\")\n .resourceGroupName(\"spotinst-azure\")\n .description(\"example_stateful_node_azure_description\")\n .strategy(StatefulNodeAzureStrategyArgs.builder()\n .drainingTimeout(30)\n .fallbackToOnDemand(true)\n .optimizationWindows(\"Tue:19:46-Tue:20:46\")\n .revertToSpot(StatefulNodeAzureStrategyRevertToSpotArgs.builder()\n .performAt(\"timeWindow\")\n .build())\n .preferredLifeCycle(\"od\")\n .capacityReservations(StatefulNodeAzureStrategyCapacityReservationArgs.builder()\n .shouldUtilize(true)\n .utilizationStrategy(\"utilizeOverOD\")\n .capacityReservationGroups(StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs.builder()\n .crgName(\"crg name\")\n .crgResourceGroupName(\"resourceGroupName\")\n .crgShouldPrioritize(true)\n .build())\n .build())\n .build())\n .os(\"Linux\")\n .odSizes( \n \"standard_ds1_v2\",\n \"standard_ds2_v2\")\n .spotSizes( \n \"standard_ds1_v2\",\n \"standard_ds2_v2\")\n .preferredSpotSizes(\"standard_ds1_v2\")\n .zones( \n \"1\",\n \"3\")\n .preferredZone(\"1\")\n .customData(\"\")\n .shutdownScript(\"\")\n .userData(\"\")\n .vmName(\"VMName\")\n .bootDiagnostics(StatefulNodeAzureBootDiagnosticArgs.builder()\n .isEnabled(true)\n .storageUrl(\"https://.blob.core.windows.net/test\")\n .type(\"unmanaged\")\n .build())\n .dataDisks( \n StatefulNodeAzureDataDiskArgs.builder()\n .sizeGb(1)\n .lun(1)\n .type(\"Standard_LRS\")\n .build(),\n StatefulNodeAzureDataDiskArgs.builder()\n .sizeGb(10)\n .lun(2)\n .type(\"Standard_LRS\")\n .build())\n .extensions(StatefulNodeAzureExtensionArgs.builder()\n .name(\"extensionName\")\n .type(\"customScript\")\n .publisher(\"Microsoft.Azure.Extensions\")\n .apiVersion(\"2.0\")\n .minorVersionAutoUpgrade(true)\n .protectedSettings(Map.of(\"script\", \"IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\"))\n .build())\n .image(StatefulNodeAzureImageArgs.builder()\n .marketplaceImages(StatefulNodeAzureImageMarketplaceImageArgs.builder()\n .publisher(\"Canonical\")\n .offer(\"UbuntuServer\")\n .sku(\"16.04-LTS\")\n .version(\"latest\")\n .build())\n .build())\n .loadBalancers(StatefulNodeAzureLoadBalancerArgs.builder()\n .type(\"loadBalancer\")\n .resourceGroupName(\"testResourceGroup\")\n .name(\"testLoadBalancer\")\n .sku(\"Standard\")\n .backendPoolNames( \n \"testBackendPool1\",\n \"testBackendPool2\")\n .build())\n .login(StatefulNodeAzureLoginArgs.builder()\n .userName(\"admin\")\n .sshPublicKey(\"33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\")\n .build())\n .managedServiceIdentities(StatefulNodeAzureManagedServiceIdentityArgs.builder()\n .name(\"mySI2\")\n .resourceGroupName(\"myResourceGroup\")\n .build())\n .network(StatefulNodeAzureNetworkArgs.builder()\n .networkResourceGroupName(\"subnetResourceGroup\")\n .virtualNetworkName(\"vname\")\n .networkInterfaces(StatefulNodeAzureNetworkNetworkInterfaceArgs.builder()\n .isPrimary(true)\n .subnetName(\"testSubnet\")\n .assignPublicIp(true)\n .publicIpSku(\"Standard\")\n .networkSecurityGroups(StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs.builder()\n .networkResourceGroupName(\"test\")\n .name(\"test\")\n .build())\n .enableIpForwarding(true)\n .privateIpAddresses(\"172.23.4.20\")\n .additionalIpConfigurations(StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs.builder()\n .name(\"test\")\n .privateIpAddressVersion(\"IPv4\")\n .build())\n .publicIps(StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs.builder()\n .networkResourceGroupName(\"resourceGroup\")\n .name(\"test\")\n .build())\n .applicationSecurityGroups(StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs.builder()\n .networkResourceGroupName(\"AsgResourceGroup\")\n .name(\"AsgName\")\n .build())\n .build())\n .build())\n .osDisk(StatefulNodeAzureOsDiskArgs.builder()\n .sizeGb(30)\n .type(\"Standard_LRS\")\n .build())\n .secrets(StatefulNodeAzureSecretArgs.builder()\n .sourceVaults(StatefulNodeAzureSecretSourceVaultArgs.builder()\n .name(\"string\")\n .resourceGroupName(\"string\")\n .build())\n .vaultCertificates(StatefulNodeAzureSecretVaultCertificateArgs.builder()\n .certificateUrl(\"string\")\n .certificateStore(\"string\")\n .build())\n .build())\n .security(StatefulNodeAzureSecurityArgs.builder()\n .securityType(\"Standard\")\n .secureBootEnabled(false)\n .vtpmEnabled(false)\n .build())\n .tags(StatefulNodeAzureTagArgs.builder()\n .tagKey(\"Creator\")\n .tagValue(\"string\")\n .build())\n .health(StatefulNodeAzureHealthArgs.builder()\n .healthCheckTypes(\"vmState\")\n .unhealthyDuration(300)\n .gracePeriod(120)\n .autoHealing(true)\n .build())\n .shouldPersistOsDisk(false)\n .osDiskPersistenceMode(\"reattach\")\n .shouldPersistDataDisks(true)\n .dataDisksPersistenceMode(\"reattach\")\n .shouldPersistNetwork(true)\n .schedulingTasks( \n StatefulNodeAzureSchedulingTaskArgs.builder()\n .isEnabled(true)\n .type(\"pause\")\n .cronExpression(\"44 10 * * *\")\n .build(),\n StatefulNodeAzureSchedulingTaskArgs.builder()\n .isEnabled(true)\n .type(\"resume\")\n .cronExpression(\"48 10 * * *\")\n .build(),\n StatefulNodeAzureSchedulingTaskArgs.builder()\n .isEnabled(true)\n .type(\"recycle\")\n .cronExpression(\"52 10 * * *\")\n .build())\n .signals( \n StatefulNodeAzureSignalArgs.builder()\n .type(\"vmReady\")\n .timeout(20)\n .build(),\n StatefulNodeAzureSignalArgs.builder()\n .type(\"vmReady\")\n .timeout(40)\n .build())\n .proximityPlacementGroups(StatefulNodeAzureProximityPlacementGroupArgs.builder()\n .name(\"TestPPG\")\n .resourceGroupName(\"TestResourceGroup\")\n .build())\n .deletes(StatefulNodeAzureDeleteArgs.builder()\n .shouldTerminateVm(true)\n .networkShouldDeallocate(true)\n .networkTtlInHours(0)\n .diskShouldDeallocate(true)\n .diskTtlInHours(0)\n .snapshotShouldDeallocate(true)\n .snapshotTtlInHours(0)\n .publicIpShouldDeallocate(true)\n .publicIpTtlInHours(0)\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testStatefulNodeAzure: # -------------------------------------------------------------------\n type: spotinst:StatefulNodeAzure\n properties:\n region: eastus\n resourceGroupName: spotinst-azure\n description: example_stateful_node_azure_description\n strategy: # -------------------------------------------------------------------\n drainingTimeout: 30\n fallbackToOnDemand: true\n optimizationWindows:\n - Tue:19:46-Tue:20:46\n revertToSpot:\n performAt: timeWindow\n preferredLifeCycle: od\n capacityReservations:\n - shouldUtilize: true\n utilizationStrategy: utilizeOverOD\n capacityReservationGroups:\n - crgName: crg name\n crgResourceGroupName: resourceGroupName\n crgShouldPrioritize: true\n # --- COMPUTE -------------------------------------------------------\n os: Linux\n odSizes:\n - standard_ds1_v2\n - standard_ds2_v2\n spotSizes:\n - standard_ds1_v2\n - standard_ds2_v2\n preferredSpotSizes:\n - standard_ds1_v2\n zones:\n - '1'\n - '3'\n preferredZone: '1'\n customData:\n shutdownScript:\n userData:\n vmName: VMName # -------------------------------------------------------------------\n # --- BOOT DIAGNOSTICS ----------------------------------------------\n bootDiagnostics: # -------------------------------------------------------------------\n - isEnabled: true\n storageUrl: https://.blob.core.windows.net/test\n type: unmanaged\n # --- DATA DISKS ----------------------------------------------------\n dataDisks: # -------------------------------------------------------------------\n - sizeGb: 1\n lun: 1\n type: Standard_LRS\n - sizeGb: 10\n lun: 2\n type: Standard_LRS\n # --- EXTENSIONS ----------------------------------------------------\n extensions: # -------------------------------------------------------------------\n - name: extensionName\n type: customScript\n publisher: Microsoft.Azure.Extensions\n apiVersion: '2.0'\n minorVersionAutoUpgrade: true\n protectedSettings:\n script: IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==\n image: # -------------------------------------------------------------------\n marketplaceImages:\n - publisher: Canonical\n offer: UbuntuServer\n sku: 16.04-LTS\n version: latest\n # --- LOAD BALANCERS ------------------------------------------------\n loadBalancers: # -------------------------------------------------------------------\n - type: loadBalancer\n resourceGroupName: testResourceGroup\n name: testLoadBalancer\n sku: Standard\n backendPoolNames:\n - testBackendPool1\n - testBackendPool2\n login: # -------------------------------------------------------------------\n userName: admin\n sshPublicKey: 33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==\n # --- MANAGED SERVICE IDENTITIES ------------------------------------\n managedServiceIdentities: # -------------------------------------------------------------------\n - name: mySI2\n resourceGroupName: myResourceGroup\n network: # -------------------------------------------------------------------\n networkResourceGroupName: subnetResourceGroup\n virtualNetworkName: vname\n networkInterfaces:\n - isPrimary: true\n subnetName: testSubnet\n assignPublicIp: true\n publicIpSku: Standard\n networkSecurityGroups:\n - networkResourceGroupName: test\n name: test\n enableIpForwarding: true\n privateIpAddresses:\n - 172.23.4.20\n additionalIpConfigurations:\n - name: test\n privateIpAddressVersion: IPv4\n publicIps:\n - networkResourceGroupName: resourceGroup\n name: test\n applicationSecurityGroups:\n - networkResourceGroupName: AsgResourceGroup\n name: AsgName\n osDisk: # -------------------------------------------------------------------\n sizeGb: 30\n type: Standard_LRS\n # --- SECRETS -------------------------------------------------------\n secrets: # --- Security ------------------------------------------------------\n - sourceVaults:\n - name: string\n resourceGroupName: string\n vaultCertificates:\n - certificateUrl: string\n certificateStore: string\n security: # -------------------------------------------------------------------\n securityType: Standard\n secureBootEnabled: false\n vtpmEnabled: false\n # --- TAGS ----------------------------------------------------------\n tags:\n - tagKey: Creator\n tagValue: string\n health: # -------------------------------------------------------------------\n healthCheckTypes:\n - vmState\n unhealthyDuration: 300\n gracePeriod: 120\n autoHealing: true\n # --- PERSISTENCE ---------------------------------------------------\n shouldPersistOsDisk: false\n osDiskPersistenceMode: reattach\n shouldPersistDataDisks: true\n dataDisksPersistenceMode: reattach\n shouldPersistNetwork: true # -------------------------------------------------------------------\n # --- SCHEDULING TASKS ----------------------------------------------\n schedulingTasks: # -------------------------------------------------------------------\n - isEnabled: true\n type: pause\n cronExpression: 44 10 * * *\n - isEnabled: true\n type: resume\n cronExpression: 48 10 * * *\n - isEnabled: true\n type: recycle\n cronExpression: 52 10 * * *\n # --- SIGNALS -------------------------------------------------------\n signals: # -------------------------------------------------------------------\n - type: vmReady\n timeout: 20\n - type: vmReady\n timeout: 40\n # --- PROMXIMITY PLACEMENTS GROUPS -----------------------------------\n proximityPlacementGroups: # -------------------------------------------------------------------\n - name: TestPPG\n resourceGroupName: TestResourceGroup\n # ---DELETE----------------------------------------------------------\n deletes:\n - shouldTerminateVm: true\n networkShouldDeallocate: true\n networkTtlInHours: 0\n diskShouldDeallocate: true\n diskTtlInHours: 0\n snapshotShouldDeallocate: true\n snapshotTtlInHours: 0\n publicIpShouldDeallocate: true\n publicIpTtlInHours: 0\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n# Argument Reference\n\nThe following arguments are supported:\n\n* `name` - (Required) Azure stateful node name.\n* `region` - (Required) The Azure region your stateful node will be created in.\n* `resource_group_name` - (Required) Name of the Resource Group for stateful node.\n* `description` - (Optional) Describe your Azure stateful node.\n\n\u003ca id=\"strategy\"\u003e\u003c/a\u003e\n## Strategy\n\n* `strategy` - (Required) Strategy for stateful node.\n * `draining_timeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation.\n * `fallback_to_on_demand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead.\n * `optimization_windows` - (Optional) Valid format: \"ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))\", not empty if revertToSpot.performAt = timeWindow.\n * `preferred_life_cycle` - (Optional, Enum `\"od\", \"spot\"`, Default `\"spot\"`) The desired type of VM.\n * `revert_to_spot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs.\n * `perform_at` - (Required, Enum `\"timeWindow\", \"never\", \"always\"`, Default `\"always\"`) Settings for maintenance strategy.\n * `capacity_reservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create)\n * `should_utilize` - (Required) Determines whether capacity reservations should be utilized.\n * `utilization_strategy` - (Required, Enum `\"utilizeOverSpot\", \"utilizeOverOD\"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`\"utilizeOverOD\"`- If picked, we will use CRG only in case On demand should be launched. `\"utilizeOverSpot\"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.)\n * `capacity_reservation_groups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification.\n * `crg_name` - (Required) The name of the CRG.\n * `crg_resource_group_name` - (Required) Azure resource group name\n * `crg_should_prioritize` - The desired CRG to utilize ahead of other CRGs in the subscription.\n\n\u003ca id=\"compute\"\u003e\u003c/a\u003e\n## Compute\n\n* `os` - (Required, Enum `\"Linux\", \"Windows\"`) Type of operating system.\n* `od_sizes` - (Required) Available On-Demand sizes.\n* `spot_sizes` - (Required) Available Spot-VM sizes.\n* `preferred_spot_sizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes.\n* `zones` - (Optional, Enum `\"1\", \"2\", \"3\"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally.\n* `preferred_zone` - (Optional, Enum `\"1\", \"2\", \"3\"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones.\n* `custom_data` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch.\n* `shutdown_script` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only.\n* `user_data` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded)\n* `vm_name` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle.\n\n\u003ca id=\"boot_diagnostics\"\u003e\u003c/a\u003e\n## Boot Diagnostics\n\n* `boot_diagnostics`\n * `is_enabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch.\n * `storage_url` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format (\"https://.blob.core.windows.net/\"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed.\n * `type` - (Optional, Enum `\"managed\", \"unmanaged\"`) Defines the storage type on VM launch in Azure.\n\n\u003ca id=\"data_disks\"\u003e\u003c/a\u003e\n## Data Disks\n\n* `data_disk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM.\n * `size_gb` - (Required) The size of the data disk in GB, required if dataDisks is specified.\n * `lun` - (Required) The LUN of the data disk.\n * `type` - (Required, Enum `\"Standard_LRS\", \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\"`) The type of the data disk.\n\n\u003ca id=\"extensions\"\u003e\u003c/a\u003e\n## Extensions\n\n* `extension` - (Optional) An object for an azure extension.\n * `name` - (Required) Required on compute.launchSpecification.extensions object.\n * `type` - (Required) Required on compute.launchSpecification.extensions object.\n * `publisher` - (Required) Required on compute.launchSpecification.extensions object.\n * `api_version` - (Required) The API version of the extension. Required if extension specified.\n * `minor_version_auto_upgrade` - (Required) Required on compute.launchSpecification.extensions object.\n * `protected_settings` - (Optional) Object for protected settings.\n * `public_settings` - (Optional) Object for public settings.\n \n\u003ca id=\"image\"\u003e\u003c/a\u003e\n## Image\n\n* `image`\n * `marketplace_image` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified.\n * `publisher` - (Required) Image publisher.\n * `offer` - (Required) Image offer.\n * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image.\n * `version` - (Required, Default `\"latest\"`) Image's version. if version not provided we use \"latest\".\n * `gallery_image` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified.\n * `gallery_resource_group_name` - (Required) The resource group name for gallery image.\n * `gallery_name` - (Required) Name of the gallery.\n * `image_name` - (Required) Name of the gallery image.\n * `version_name` - (Required) Image's version. Can be in the format x.x.x or 'latest'.\n * `custom_image` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified.\n * `custom_image_resource_group_name` - (Required) The resource group name for custom image.\n * `name` - (Required) The name of the custom image.\n\n\u003ca id=\"load balancer\"\u003e\u003c/a\u003e\n## Load Balancer\n\n* `load_balancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer.\n * `type` - (Required, Enum `\"loadBalancer\", \"applicationGateway\"`) The type of load balancer.\n * `resource_group_name` - (Required) The Resource Group name of the Load Balancer.\n * `name` - (Required) Name of the Application Gateway/Load Balancer.\n * `sku` - (Optional)\n * if type is `\"LoadBalancer\"` then possible values are `“Standard\", \"Basic”`.\n * If ApplicationGateway then possible values are\n `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2\", “WAF_Large”, “WAF_Medium\", “WAF_v2\"`.\n * `backend_pool_names` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY.\n\n\u003ca id=\"login\"\u003e\u003c/a\u003e\n## Login\n\n* `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux.\n * `user_name` - (Required) username for admin access to VMs.\n * `ssh_public_key` - (Optional) SSH for admin access to Linux VMs. Optional for Linux.\n * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows.\n\n\u003ca id=\"managed_service_identities\"\u003e\u003c/a\u003e\n## Managed Service Identities\n\n* `managed_service_identities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM.\n * `name` - (Required) name of the managed identity.\n * `resource_group_name` - (Required) The Resource Group that the user-assigned managed identity resides in.\n\n\u003ca id=\"proximity_placement_groups\"\u003e\u003c/a\u003e\n## Proximity Placement Groups\n\n* `proximity_placement_groups` - (Optional) Defines the proximity placement group in which the VM will be launched.\n * `name` - (Required) name of the proximity placement group.\n * `resource_group_name` - (Required) The Resource Group name of the proximity placement group.\n\n\u003ca id=\"network\"\u003e\u003c/a\u003e\n## Network\n\n* `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node.\n * `network_resource_group_name` - (Required) Vnet Resource Group Name.\n * `virtual_network_name` - (Required) Virtual Network.\n * `network_interface` - (Required) Define a network interface\n * `is_primary` - (Required) Defines whether the network interface is primary or not.\n * `subnet_name` - (Required) Subnet name.\n * `assign_public_ip` - (Optional) Assign public IP.\n * `public_ip_sku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic].\n * `network_security_group` - (Optional) Network Security Group.\n * `network_resource_group_name` - (Required) Requires valid security group name.\n * `name` - (Required) Requires valid resource group name.\n * `enable_ip_forwarding` - (Optional) Enable IP Forwarding.\n * `private_ip_addresses` - (Optional) A list with unique items that every item is a valid IP.\n * `additional_ip_configurations` - (Optional) Additional configuration of network interface.\n * `name` - (Required) Configuration name.\n * `private_ip_address_version` - (Required, Enum `\"IPv4\", \"IPv6\"` Default `\"IPv4\"`) Version of the private IP address.\n * `public_ips` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one.\n * `resource_group_name` - (Required) The resource group of the public ip.\n * `name` - (Required) - The name of the public ip.\n * `application_security_groups` - (Optional) Network Security Group.\n * `resource_group_name` - (Required) Requires valid security group name.\n * `name` - (Required) Requires valid resource group name.\n\n\u003ca id=\"os_disk\"\u003e\u003c/a\u003e\n## OS Disk\n\n* `os_disk` - (Optional) Specify OS disk specification other than default.\n * `size_gb` - (Optional, Default `\"30\"`) The size of the data disk in GB.\n * `type` - (Required, Enum `\"Standard_LRS\", \"Premium_LRS\", \"StandardSSD_LRS\"`) The type of the OS disk.\n\n\u003ca id=\"secret\"\u003e\u003c/a\u003e\n## Secret\n\n* `secret` - (Optional) Set of certificates that should be installed on the VM.\n * `source_vault` - (Required) The key vault reference, contains the required certificates.\n * `name` - (Required) The name of the key vault.\n * `resource_group_name` - (Required) The resource group name of the key vault.\n * `vault_certificates` - (Required) The required certificate references.\n * `certificate_url` - (Optional) The URL of the certificate under the key vault.\n * `certificate_store` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account.\n * This field is required only when using Windows OS type\n * This field must be ‘null’ when the OS type is Linux\n\n\u003ca id=\"secutiry\"\u003e\u003c/a\u003e\n## Security\n\n* `security` - (Optional) Specifies the Security related profile settings for the virtual machine.\n * `secure_boot_enabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine.\n * `security_type` - (Optional) Enum: `\"Standard\", \"TrustedLaunch\"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines.\n * `vtpm_enabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine.\n\n\n\u003ca id=\"tag\"\u003e\u003c/a\u003e\n## Tag\n\n* `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources.\n * `tag_key` - (Optional) Tag Key for Stateful Node Resources.\n * `tag_value` - (Optional) Tag Value for Stateful Node Resources.\n\n\u003ca id=\"health\"\u003e\u003c/a\u003e\n## Health\n\n* `health` - (Optional) Set the auto healing preferences for unhealthy VMs.\n * `health_check_types` - (Optional, Enum `\"vmState\", \"applicationGateway\"`) Healthcheck to use to validate VM health.\n * `unhealthy_duration` - (Optional) Amount of time to be unhealthy before a replacement is triggered.\n * `auto_healing` - (Required) Enable Autohealing of unhealthy VMs.\n * `grace_period` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness.\n\n\u003ca id=\"persistence\"\u003e\u003c/a\u003e\n## Persistence\n\n* `should_persist_os_disk` - (Required) Should persist os disk.\n* `os_disk_persistence_mode` - (Optional, Enum `\"reattach\", \"onLaunch\"`)\n* `should_persist_data_disks` - (Required) Should persist data disks.\n* `data_disks_persistence_mode` - (Optional, Enum `\"reattach\", \"onLaunch\"`)\n* `should_persist_network` - (Required) Should persist network.\n\n\u003ca id=\"scheduling_tasks\"\u003e\u003c/a\u003e\n## Scheduling Tasks\n\n* `scheduling_task` - (Optional) Scheduling settings object for stateful node.\n * `is_enabled` - (Required) Is scheduled task enabled for stateful node.\n * `type` - (Required, Enum `\"pause\", \"resume\", \"recycle\") The type of the scheduled task\n * `cron_expression` (Required) A expression which describes when to execute the scheduled task (UTC).\n\n\u003ca id=\"signals\"\u003e\u003c/a\u003e\n## Signals\n\n* `signal` - (Optional) A signal object defined for the stateful node.\n * `type` - (Required, Enum `\"vmReady\", \"vmReadyToShutdown\"`) The type of the signal defined for the stateful node.\n * `timeout` - (Required, Default `\"1800\"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout.\n\n---\n\n\u003ca id=\"attach_data_disk\"\u003e\u003c/a\u003e\n## Attach Data Disk\n\n* `attach_data_disk` - (Optional) Create a new data disk and attach it to the stateful node.\n * `data_disk_name` - (Required) The name of the created data disk.\n * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk will be created.\n * `storage_account_type` - (Required, Enum `\"Standard_LRS\", \"Premium_LRS\", \"StandardSSD_LRS\", \"UltraSSD_LRS\"`) The type of the data disk.\n * `size_gb` - (Required) The size of the data disk in GB, Required if dataDisks is specified.\n * `zone` - (Optional, Enum `\"1\", \"2\", \"3\"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally.\n * `lun` - (Optional, Default `\"orginal\"`) The LUN of the data disk. If not defined, the LUN will be set in order.\n\n\u003ca id=\"detach_data_disk\"\u003e\u003c/a\u003e\n## Detach Data Disk\n\n* `detach_data_disk` - (Optional) Detach a data disk from a stateful node.\n * `data_disk_name` - (Required) The name of the detached data disk.\n * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk exists.\n * `should_deallocate` - (Required) Indicates whether to delete the data disk in addition to detach.\n * `ttl_in_hours` - (Required, Default `\"0\"`) Hours to keep the disk alive before deletion.\n\n\u003ca id=\"update_state\"\u003e\u003c/a\u003e\n## Update State\n\n* `update_state` - (Optional) Update the stateful node state.\n * `state` - (Required, Enum `\"pause\", \"resume\", \"recycle\"`) New state for the stateful node.\n\n\u003ca id=\"import_vm\"\u003e\u003c/a\u003e\n## Import VM\n\n* `import_vm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration.\n * `resource_group_name` - (Required) Name of the Resource Group for Stateful Node.\n * `original_vm_name` - (Required) Azure Import Stateful Node Name.\n * `draining_timeout` - (Optional) Hours to keep resources alive.\n * `resources_retention_time` - (Optional) Hours to keep resources alive.\n\n\u003ca id=\"delete\"\u003e\u003c/a\u003e\n## Deallocation Config\n\n* `delete` - (Required) Specify deallocation parameters for stateful node deletion.\n * `should_terminate_vm` - (Required) Indicates whether to delete the stateful node's VM.\n * `network_should_deallocate` - (Required) Indicates whether to delete the stateful node's network resources.\n * `network_ttl_in_hours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion.\n * `disk_should_deallocate` - (Required) Indicates whether to delete the stateful node's disk resources.\n * `disk_ttl_in_hours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion.\n * `snapshot_should_deallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources.\n * `snapshot_ttl_in_hours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion.\n * `public_ip_should_deallocate` - (Required) Indicates whether to delete the stateful node's public ip resources.\n * `public_ip_ttl_in_hours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion.\n", + "description": "Provides a Spotinst stateful node Azure resource.\n\n", "properties": { "attachDataDisks": { "type": "array", @@ -17867,6 +17879,9 @@ "$ref": "#/types/spotinst:index/StatefulNodeAzureImportVm:StatefulNodeAzureImportVm" } }, + "licenseType": { + "type": "string" + }, "loadBalancers": { "type": "array", "items": { @@ -17987,6 +18002,9 @@ "vmName": { "type": "string" }, + "vmNamePrefix": { + "type": "string" + }, "zones": { "type": "array", "items": { @@ -18082,6 +18100,9 @@ "$ref": "#/types/spotinst:index/StatefulNodeAzureImportVm:StatefulNodeAzureImportVm" } }, + "licenseType": { + "type": "string" + }, "loadBalancers": { "type": "array", "items": { @@ -18202,6 +18223,9 @@ "vmName": { "type": "string" }, + "vmNamePrefix": { + "type": "string" + }, "zones": { "type": "array", "items": { @@ -18280,6 +18304,9 @@ "$ref": "#/types/spotinst:index/StatefulNodeAzureImportVm:StatefulNodeAzureImportVm" } }, + "licenseType": { + "type": "string" + }, "loadBalancers": { "type": "array", "items": { @@ -18400,6 +18427,9 @@ "vmName": { "type": "string" }, + "vmNamePrefix": { + "type": "string" + }, "zones": { "type": "array", "items": { diff --git a/provider/go.mod b/provider/go.mod index b1c20343..adb1e25d 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -205,7 +205,7 @@ require ( github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spotinst/spotinst-sdk-go v1.337.0 // indirect + github.com/spotinst/spotinst-sdk-go v1.338.0 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect diff --git a/provider/go.sum b/provider/go.sum index 4fbc20e8..8a4d4628 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -2964,8 +2964,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spotinst/spotinst-sdk-go v1.337.0 h1:sL4xmnptGQtCycmYQ7vYSgOHFMiqhqpoorWYaaeLDmU= -github.com/spotinst/spotinst-sdk-go v1.337.0/go.mod h1:cPpdCFZ4K3PWCbZdQB2wxNfEUVuz+KecJCSbqqesoMM= +github.com/spotinst/spotinst-sdk-go v1.338.0 h1:srQKsMuekyk02KCNE0YgZYfHsOkIuFaNcGJIUtV/WSE= +github.com/spotinst/spotinst-sdk-go v1.338.0/go.mod h1:cPpdCFZ4K3PWCbZdQB2wxNfEUVuz+KecJCSbqqesoMM= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= diff --git a/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskArgs.cs b/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskArgs.cs index 0c5e3c4d..100079db 100644 --- a/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskArgs.cs +++ b/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskArgs.cs @@ -12,6 +12,9 @@ namespace Pulumi.SpotInst.Inputs public sealed class StatefulNodeAzureOsDiskArgs : global::Pulumi.ResourceArgs { + [Input("caching")] + public Input? Caching { get; set; } + [Input("sizeGb")] public Input? SizeGb { get; set; } diff --git a/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskGetArgs.cs b/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskGetArgs.cs index 7a4a22ec..513a140f 100644 --- a/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskGetArgs.cs +++ b/sdk/dotnet/Inputs/StatefulNodeAzureOsDiskGetArgs.cs @@ -12,6 +12,9 @@ namespace Pulumi.SpotInst.Inputs public sealed class StatefulNodeAzureOsDiskGetArgs : global::Pulumi.ResourceArgs { + [Input("caching")] + public Input? Caching { get; set; } + [Input("sizeGb")] public Input? SizeGb { get; set; } diff --git a/sdk/dotnet/Inputs/StatefulNodeAzureStrategyArgs.cs b/sdk/dotnet/Inputs/StatefulNodeAzureStrategyArgs.cs index 35fb0ba1..86e443ad 100644 --- a/sdk/dotnet/Inputs/StatefulNodeAzureStrategyArgs.cs +++ b/sdk/dotnet/Inputs/StatefulNodeAzureStrategyArgs.cs @@ -12,6 +12,9 @@ namespace Pulumi.SpotInst.Inputs public sealed class StatefulNodeAzureStrategyArgs : global::Pulumi.ResourceArgs { + [Input("availabilityVsCost")] + public Input? AvailabilityVsCost { get; set; } + [Input("capacityReservations")] private InputList? _capacityReservations; public InputList CapacityReservations @@ -26,6 +29,14 @@ public InputList Capaci [Input("fallbackToOnDemand", required: true)] public Input FallbackToOnDemand { get; set; } = null!; + [Input("odWindows")] + private InputList? _odWindows; + public InputList OdWindows + { + get => _odWindows ?? (_odWindows = new InputList()); + set => _odWindows = value; + } + [Input("optimizationWindows")] private InputList? _optimizationWindows; public InputList OptimizationWindows diff --git a/sdk/dotnet/Inputs/StatefulNodeAzureStrategyGetArgs.cs b/sdk/dotnet/Inputs/StatefulNodeAzureStrategyGetArgs.cs index 04feba68..50c44dff 100644 --- a/sdk/dotnet/Inputs/StatefulNodeAzureStrategyGetArgs.cs +++ b/sdk/dotnet/Inputs/StatefulNodeAzureStrategyGetArgs.cs @@ -12,6 +12,9 @@ namespace Pulumi.SpotInst.Inputs public sealed class StatefulNodeAzureStrategyGetArgs : global::Pulumi.ResourceArgs { + [Input("availabilityVsCost")] + public Input? AvailabilityVsCost { get; set; } + [Input("capacityReservations")] private InputList? _capacityReservations; public InputList CapacityReservations @@ -26,6 +29,14 @@ public InputList Cap [Input("fallbackToOnDemand", required: true)] public Input FallbackToOnDemand { get; set; } = null!; + [Input("odWindows")] + private InputList? _odWindows; + public InputList OdWindows + { + get => _odWindows ?? (_odWindows = new InputList()); + set => _odWindows = value; + } + [Input("optimizationWindows")] private InputList? _optimizationWindows; public InputList OptimizationWindows diff --git a/sdk/dotnet/Outputs/StatefulNodeAzureOsDisk.cs b/sdk/dotnet/Outputs/StatefulNodeAzureOsDisk.cs index 8267a90f..98b2ae03 100644 --- a/sdk/dotnet/Outputs/StatefulNodeAzureOsDisk.cs +++ b/sdk/dotnet/Outputs/StatefulNodeAzureOsDisk.cs @@ -13,15 +13,19 @@ namespace Pulumi.SpotInst.Outputs [OutputType] public sealed class StatefulNodeAzureOsDisk { + public readonly string? Caching; public readonly int? SizeGb; public readonly string Type; [OutputConstructor] private StatefulNodeAzureOsDisk( + string? caching, + int? sizeGb, string type) { + Caching = caching; SizeGb = sizeGb; Type = type; } diff --git a/sdk/dotnet/Outputs/StatefulNodeAzureStrategy.cs b/sdk/dotnet/Outputs/StatefulNodeAzureStrategy.cs index 82484752..58b67d91 100644 --- a/sdk/dotnet/Outputs/StatefulNodeAzureStrategy.cs +++ b/sdk/dotnet/Outputs/StatefulNodeAzureStrategy.cs @@ -13,30 +13,38 @@ namespace Pulumi.SpotInst.Outputs [OutputType] public sealed class StatefulNodeAzureStrategy { + public readonly int? AvailabilityVsCost; public readonly ImmutableArray CapacityReservations; public readonly int? DrainingTimeout; public readonly bool FallbackToOnDemand; + public readonly ImmutableArray OdWindows; public readonly ImmutableArray OptimizationWindows; public readonly string? PreferredLifeCycle; public readonly Outputs.StatefulNodeAzureStrategyRevertToSpot? RevertToSpot; [OutputConstructor] private StatefulNodeAzureStrategy( + int? availabilityVsCost, + ImmutableArray capacityReservations, int? drainingTimeout, bool fallbackToOnDemand, + ImmutableArray odWindows, + ImmutableArray optimizationWindows, string? preferredLifeCycle, Outputs.StatefulNodeAzureStrategyRevertToSpot? revertToSpot) { + AvailabilityVsCost = availabilityVsCost; CapacityReservations = capacityReservations; DrainingTimeout = drainingTimeout; FallbackToOnDemand = fallbackToOnDemand; + OdWindows = odWindows; OptimizationWindows = optimizationWindows; PreferredLifeCycle = preferredLifeCycle; RevertToSpot = revertToSpot; diff --git a/sdk/dotnet/StatefulNodeAzure.cs b/sdk/dotnet/StatefulNodeAzure.cs index a35a2570..cc72448e 100644 --- a/sdk/dotnet/StatefulNodeAzure.cs +++ b/sdk/dotnet/StatefulNodeAzure.cs @@ -11,597 +11,6 @@ namespace Pulumi.SpotInst { /// /// Provides a Spotinst stateful node Azure resource. - /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```csharp - /// using System.Collections.Generic; - /// using System.Linq; - /// using Pulumi; - /// using SpotInst = Pulumi.SpotInst; - /// - /// return await Deployment.RunAsync(() => - /// { - /// var testStatefulNodeAzure = new SpotInst.StatefulNodeAzure("testStatefulNodeAzure", new() - /// { - /// Region = "eastus", - /// ResourceGroupName = "spotinst-azure", - /// Description = "example_stateful_node_azure_description", - /// Strategy = new SpotInst.Inputs.StatefulNodeAzureStrategyArgs - /// { - /// DrainingTimeout = 30, - /// FallbackToOnDemand = true, - /// OptimizationWindows = new[] - /// { - /// "Tue:19:46-Tue:20:46", - /// }, - /// RevertToSpot = new SpotInst.Inputs.StatefulNodeAzureStrategyRevertToSpotArgs - /// { - /// PerformAt = "timeWindow", - /// }, - /// PreferredLifeCycle = "od", - /// CapacityReservations = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureStrategyCapacityReservationArgs - /// { - /// ShouldUtilize = true, - /// UtilizationStrategy = "utilizeOverOD", - /// CapacityReservationGroups = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs - /// { - /// CrgName = "crg name", - /// CrgResourceGroupName = "resourceGroupName", - /// CrgShouldPrioritize = true, - /// }, - /// }, - /// }, - /// }, - /// }, - /// Os = "Linux", - /// OdSizes = new[] - /// { - /// "standard_ds1_v2", - /// "standard_ds2_v2", - /// }, - /// SpotSizes = new[] - /// { - /// "standard_ds1_v2", - /// "standard_ds2_v2", - /// }, - /// PreferredSpotSizes = new[] - /// { - /// "standard_ds1_v2", - /// }, - /// Zones = new[] - /// { - /// "1", - /// "3", - /// }, - /// PreferredZone = "1", - /// CustomData = "", - /// ShutdownScript = "", - /// UserData = "", - /// VmName = "VMName", - /// BootDiagnostics = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureBootDiagnosticArgs - /// { - /// IsEnabled = true, - /// StorageUrl = "https://.blob.core.windows.net/test", - /// Type = "unmanaged", - /// }, - /// }, - /// DataDisks = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureDataDiskArgs - /// { - /// SizeGb = 1, - /// Lun = 1, - /// Type = "Standard_LRS", - /// }, - /// new SpotInst.Inputs.StatefulNodeAzureDataDiskArgs - /// { - /// SizeGb = 10, - /// Lun = 2, - /// Type = "Standard_LRS", - /// }, - /// }, - /// Extensions = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureExtensionArgs - /// { - /// Name = "extensionName", - /// Type = "customScript", - /// Publisher = "Microsoft.Azure.Extensions", - /// ApiVersion = "2.0", - /// MinorVersionAutoUpgrade = true, - /// ProtectedSettings = - /// { - /// { "script", "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==" }, - /// }, - /// }, - /// }, - /// Image = new SpotInst.Inputs.StatefulNodeAzureImageArgs - /// { - /// MarketplaceImages = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureImageMarketplaceImageArgs - /// { - /// Publisher = "Canonical", - /// Offer = "UbuntuServer", - /// Sku = "16.04-LTS", - /// Version = "latest", - /// }, - /// }, - /// }, - /// LoadBalancers = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureLoadBalancerArgs - /// { - /// Type = "loadBalancer", - /// ResourceGroupName = "testResourceGroup", - /// Name = "testLoadBalancer", - /// Sku = "Standard", - /// BackendPoolNames = new[] - /// { - /// "testBackendPool1", - /// "testBackendPool2", - /// }, - /// }, - /// }, - /// Login = new SpotInst.Inputs.StatefulNodeAzureLoginArgs - /// { - /// UserName = "admin", - /// SshPublicKey = "33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==", - /// }, - /// ManagedServiceIdentities = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureManagedServiceIdentityArgs - /// { - /// Name = "mySI2", - /// ResourceGroupName = "myResourceGroup", - /// }, - /// }, - /// Network = new SpotInst.Inputs.StatefulNodeAzureNetworkArgs - /// { - /// NetworkResourceGroupName = "subnetResourceGroup", - /// VirtualNetworkName = "vname", - /// NetworkInterfaces = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceArgs - /// { - /// IsPrimary = true, - /// SubnetName = "testSubnet", - /// AssignPublicIp = true, - /// PublicIpSku = "Standard", - /// NetworkSecurityGroups = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs - /// { - /// NetworkResourceGroupName = "test", - /// Name = "test", - /// }, - /// }, - /// EnableIpForwarding = true, - /// PrivateIpAddresses = new[] - /// { - /// "172.23.4.20", - /// }, - /// AdditionalIpConfigurations = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs - /// { - /// Name = "test", - /// PrivateIpAddressVersion = "IPv4", - /// }, - /// }, - /// PublicIps = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs - /// { - /// NetworkResourceGroupName = "resourceGroup", - /// Name = "test", - /// }, - /// }, - /// ApplicationSecurityGroups = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs - /// { - /// NetworkResourceGroupName = "AsgResourceGroup", - /// Name = "AsgName", - /// }, - /// }, - /// }, - /// }, - /// }, - /// OsDisk = new SpotInst.Inputs.StatefulNodeAzureOsDiskArgs - /// { - /// SizeGb = 30, - /// Type = "Standard_LRS", - /// }, - /// Secrets = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureSecretArgs - /// { - /// SourceVaults = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureSecretSourceVaultArgs - /// { - /// Name = "string", - /// ResourceGroupName = "string", - /// }, - /// }, - /// VaultCertificates = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureSecretVaultCertificateArgs - /// { - /// CertificateUrl = "string", - /// CertificateStore = "string", - /// }, - /// }, - /// }, - /// }, - /// Security = new SpotInst.Inputs.StatefulNodeAzureSecurityArgs - /// { - /// SecurityType = "Standard", - /// SecureBootEnabled = false, - /// VtpmEnabled = false, - /// }, - /// Tags = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureTagArgs - /// { - /// TagKey = "Creator", - /// TagValue = "string", - /// }, - /// }, - /// Health = new SpotInst.Inputs.StatefulNodeAzureHealthArgs - /// { - /// HealthCheckTypes = new[] - /// { - /// "vmState", - /// }, - /// UnhealthyDuration = 300, - /// GracePeriod = 120, - /// AutoHealing = true, - /// }, - /// ShouldPersistOsDisk = false, - /// OsDiskPersistenceMode = "reattach", - /// ShouldPersistDataDisks = true, - /// DataDisksPersistenceMode = "reattach", - /// ShouldPersistNetwork = true, - /// SchedulingTasks = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs - /// { - /// IsEnabled = true, - /// Type = "pause", - /// CronExpression = "44 10 * * *", - /// }, - /// new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs - /// { - /// IsEnabled = true, - /// Type = "resume", - /// CronExpression = "48 10 * * *", - /// }, - /// new SpotInst.Inputs.StatefulNodeAzureSchedulingTaskArgs - /// { - /// IsEnabled = true, - /// Type = "recycle", - /// CronExpression = "52 10 * * *", - /// }, - /// }, - /// Signals = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureSignalArgs - /// { - /// Type = "vmReady", - /// Timeout = 20, - /// }, - /// new SpotInst.Inputs.StatefulNodeAzureSignalArgs - /// { - /// Type = "vmReady", - /// Timeout = 40, - /// }, - /// }, - /// ProximityPlacementGroups = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureProximityPlacementGroupArgs - /// { - /// Name = "TestPPG", - /// ResourceGroupName = "TestResourceGroup", - /// }, - /// }, - /// Deletes = new[] - /// { - /// new SpotInst.Inputs.StatefulNodeAzureDeleteArgs - /// { - /// ShouldTerminateVm = true, - /// NetworkShouldDeallocate = true, - /// NetworkTtlInHours = 0, - /// DiskShouldDeallocate = true, - /// DiskTtlInHours = 0, - /// SnapshotShouldDeallocate = true, - /// SnapshotTtlInHours = 0, - /// PublicIpShouldDeallocate = true, - /// PublicIpTtlInHours = 0, - /// }, - /// }, - /// }); - /// - /// // ------------------------------------------------------------------- - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// - /// # Argument Reference - /// - /// The following arguments are supported: - /// - /// * `name` - (Required) Azure stateful node name. - /// * `region` - (Required) The Azure region your stateful node will be created in. - /// * `resource_group_name` - (Required) Name of the Resource Group for stateful node. - /// * `description` - (Optional) Describe your Azure stateful node. - /// - /// <a id="strategy"></a> - /// ## Strategy - /// - /// * `strategy` - (Required) Strategy for stateful node. - /// * `draining_timeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. - /// * `fallback_to_on_demand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. - /// * `optimization_windows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. - /// * `preferred_life_cycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. - /// * `revert_to_spot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. - /// * `perform_at` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. - /// * `capacity_reservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) - /// * `should_utilize` - (Required) Determines whether capacity reservations should be utilized. - /// * `utilization_strategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) - /// * `capacity_reservation_groups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. - /// * `crg_name` - (Required) The name of the CRG. - /// * `crg_resource_group_name` - (Required) Azure resource group name - /// * `crg_should_prioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. - /// - /// <a id="compute"></a> - /// ## Compute - /// - /// * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. - /// * `od_sizes` - (Required) Available On-Demand sizes. - /// * `spot_sizes` - (Required) Available Spot-VM sizes. - /// * `preferred_spot_sizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. - /// * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. - /// * `preferred_zone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. - /// * `custom_data` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. - /// * `shutdown_script` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. - /// * `user_data` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) - /// * `vm_name` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. - /// - /// <a id="boot_diagnostics"></a> - /// ## Boot Diagnostics - /// - /// * `boot_diagnostics` - /// * `is_enabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. - /// * `storage_url` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. - /// * `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. - /// - /// <a id="data_disks"></a> - /// ## Data Disks - /// - /// * `data_disk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. - /// * `size_gb` - (Required) The size of the data disk in GB, required if dataDisks is specified. - /// * `lun` - (Required) The LUN of the data disk. - /// * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - /// - /// <a id="extensions"></a> - /// ## Extensions - /// - /// * `extension` - (Optional) An object for an azure extension. - /// * `name` - (Required) Required on compute.launchSpecification.extensions object. - /// * `type` - (Required) Required on compute.launchSpecification.extensions object. - /// * `publisher` - (Required) Required on compute.launchSpecification.extensions object. - /// * `api_version` - (Required) The API version of the extension. Required if extension specified. - /// * `minor_version_auto_upgrade` - (Required) Required on compute.launchSpecification.extensions object. - /// * `protected_settings` - (Optional) Object for protected settings. - /// * `public_settings` - (Optional) Object for public settings. - /// - /// <a id="image"></a> - /// ## Image - /// - /// * `image` - /// * `marketplace_image` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. - /// * `publisher` - (Required) Image publisher. - /// * `offer` - (Required) Image offer. - /// * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. - /// * `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". - /// * `gallery_image` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. - /// * `gallery_resource_group_name` - (Required) The resource group name for gallery image. - /// * `gallery_name` - (Required) Name of the gallery. - /// * `image_name` - (Required) Name of the gallery image. - /// * `version_name` - (Required) Image's version. Can be in the format x.x.x or 'latest'. - /// * `custom_image` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. - /// * `custom_image_resource_group_name` - (Required) The resource group name for custom image. - /// * `name` - (Required) The name of the custom image. - /// - /// <a id="load balancer"></a> - /// ## Load Balancer - /// - /// * `load_balancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. - /// * `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. - /// * `resource_group_name` - (Required) The Resource Group name of the Load Balancer. - /// * `name` - (Required) Name of the Application Gateway/Load Balancer. - /// * `sku` - (Optional) - /// * if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. - /// * If ApplicationGateway then possible values are - /// `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. - /// * `backend_pool_names` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. - /// - /// <a id="login"></a> - /// ## Login - /// - /// * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. - /// * `user_name` - (Required) username for admin access to VMs. - /// * `ssh_public_key` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. - /// * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. - /// - /// <a id="managed_service_identities"></a> - /// ## Managed Service Identities - /// - /// * `managed_service_identities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. - /// * `name` - (Required) name of the managed identity. - /// * `resource_group_name` - (Required) The Resource Group that the user-assigned managed identity resides in. - /// - /// <a id="proximity_placement_groups"></a> - /// ## Proximity Placement Groups - /// - /// * `proximity_placement_groups` - (Optional) Defines the proximity placement group in which the VM will be launched. - /// * `name` - (Required) name of the proximity placement group. - /// * `resource_group_name` - (Required) The Resource Group name of the proximity placement group. - /// - /// <a id="network"></a> - /// ## Network - /// - /// * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. - /// * `network_resource_group_name` - (Required) Vnet Resource Group Name. - /// * `virtual_network_name` - (Required) Virtual Network. - /// * `network_interface` - (Required) Define a network interface - /// * `is_primary` - (Required) Defines whether the network interface is primary or not. - /// * `subnet_name` - (Required) Subnet name. - /// * `assign_public_ip` - (Optional) Assign public IP. - /// * `public_ip_sku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. - /// * `network_security_group` - (Optional) Network Security Group. - /// * `network_resource_group_name` - (Required) Requires valid security group name. - /// * `name` - (Required) Requires valid resource group name. - /// * `enable_ip_forwarding` - (Optional) Enable IP Forwarding. - /// * `private_ip_addresses` - (Optional) A list with unique items that every item is a valid IP. - /// * `additional_ip_configurations` - (Optional) Additional configuration of network interface. - /// * `name` - (Required) Configuration name. - /// * `private_ip_address_version` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. - /// * `public_ips` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. - /// * `resource_group_name` - (Required) The resource group of the public ip. - /// * `name` - (Required) - The name of the public ip. - /// * `application_security_groups` - (Optional) Network Security Group. - /// * `resource_group_name` - (Required) Requires valid security group name. - /// * `name` - (Required) Requires valid resource group name. - /// - /// <a id="os_disk"></a> - /// ## OS Disk - /// - /// * `os_disk` - (Optional) Specify OS disk specification other than default. - /// * `size_gb` - (Optional, Default `"30"`) The size of the data disk in GB. - /// * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. - /// - /// <a id="secret"></a> - /// ## Secret - /// - /// * `secret` - (Optional) Set of certificates that should be installed on the VM. - /// * `source_vault` - (Required) The key vault reference, contains the required certificates. - /// * `name` - (Required) The name of the key vault. - /// * `resource_group_name` - (Required) The resource group name of the key vault. - /// * `vault_certificates` - (Required) The required certificate references. - /// * `certificate_url` - (Optional) The URL of the certificate under the key vault. - /// * `certificate_store` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. - /// * This field is required only when using Windows OS type - /// * This field must be ‘null’ when the OS type is Linux - /// - /// <a id="secutiry"></a> - /// ## Security - /// - /// * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. - /// * `secure_boot_enabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. - /// * `security_type` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. - /// * `vtpm_enabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. - /// - /// <a id="tag"></a> - /// ## Tag - /// - /// * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. - /// * `tag_key` - (Optional) Tag Key for Stateful Node Resources. - /// * `tag_value` - (Optional) Tag Value for Stateful Node Resources. - /// - /// <a id="health"></a> - /// ## Health - /// - /// * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. - /// * `health_check_types` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. - /// * `unhealthy_duration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. - /// * `auto_healing` - (Required) Enable Autohealing of unhealthy VMs. - /// * `grace_period` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. - /// - /// <a id="persistence"></a> - /// ## Persistence - /// - /// * `should_persist_os_disk` - (Required) Should persist os disk. - /// * `os_disk_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - /// * `should_persist_data_disks` - (Required) Should persist data disks. - /// * `data_disks_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - /// * `should_persist_network` - (Required) Should persist network. - /// - /// <a id="scheduling_tasks"></a> - /// ## Scheduling Tasks - /// - /// * `scheduling_task` - (Optional) Scheduling settings object for stateful node. - /// * `is_enabled` - (Required) Is scheduled task enabled for stateful node. - /// * `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task - /// * `cron_expression` (Required) A expression which describes when to execute the scheduled task (UTC). - /// - /// <a id="signals"></a> - /// ## Signals - /// - /// * `signal` - (Optional) A signal object defined for the stateful node. - /// * `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. - /// * `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. - /// - /// *** - /// - /// <a id="attach_data_disk"></a> - /// ## Attach Data Disk - /// - /// * `attach_data_disk` - (Optional) Create a new data disk and attach it to the stateful node. - /// * `data_disk_name` - (Required) The name of the created data disk. - /// * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk will be created. - /// * `storage_account_type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - /// * `size_gb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. - /// * `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. - /// * `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. - /// - /// <a id="detach_data_disk"></a> - /// ## Detach Data Disk - /// - /// * `detach_data_disk` - (Optional) Detach a data disk from a stateful node. - /// * `data_disk_name` - (Required) The name of the detached data disk. - /// * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk exists. - /// * `should_deallocate` - (Required) Indicates whether to delete the data disk in addition to detach. - /// * `ttl_in_hours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. - /// - /// <a id="update_state"></a> - /// ## Update State - /// - /// * `update_state` - (Optional) Update the stateful node state. - /// * `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. - /// - /// <a id="import_vm"></a> - /// ## Import VM - /// - /// * `import_vm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. - /// * `resource_group_name` - (Required) Name of the Resource Group for Stateful Node. - /// * `original_vm_name` - (Required) Azure Import Stateful Node Name. - /// * `draining_timeout` - (Optional) Hours to keep resources alive. - /// * `resources_retention_time` - (Optional) Hours to keep resources alive. - /// - /// <a id="delete"></a> - /// ## Deallocation Config - /// - /// * `delete` - (Required) Specify deallocation parameters for stateful node deletion. - /// * `should_terminate_vm` - (Required) Indicates whether to delete the stateful node's VM. - /// * `network_should_deallocate` - (Required) Indicates whether to delete the stateful node's network resources. - /// * `network_ttl_in_hours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. - /// * `disk_should_deallocate` - (Required) Indicates whether to delete the stateful node's disk resources. - /// * `disk_ttl_in_hours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. - /// * `snapshot_should_deallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. - /// * `snapshot_ttl_in_hours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. - /// * `public_ip_should_deallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. - /// * `public_ip_ttl_in_hours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. /// [SpotInstResourceType("spotinst:index/statefulNodeAzure:StatefulNodeAzure")] public partial class StatefulNodeAzure : global::Pulumi.CustomResource @@ -642,6 +51,9 @@ public partial class StatefulNodeAzure : global::Pulumi.CustomResource [Output("importVms")] public Output> ImportVms { get; private set; } = null!; + [Output("licenseType")] + public Output LicenseType { get; private set; } = null!; + [Output("loadBalancers")] public Output> LoadBalancers { get; private set; } = null!; @@ -729,6 +141,9 @@ public partial class StatefulNodeAzure : global::Pulumi.CustomResource [Output("vmName")] public Output VmName { get; private set; } = null!; + [Output("vmNamePrefix")] + public Output VmNamePrefix { get; private set; } = null!; + [Output("zones")] public Output> Zones { get; private set; } = null!; @@ -849,6 +264,9 @@ public InputList ImportVms set => _importVms = value; } + [Input("licenseType")] + public Input? LicenseType { get; set; } + [Input("loadBalancers")] private InputList? _loadBalancers; public InputList LoadBalancers @@ -991,6 +409,9 @@ public InputList UpdateStates [Input("vmName")] public Input? VmName { get; set; } + [Input("vmNamePrefix")] + public Input? VmNamePrefix { get; set; } + [Input("zones")] private InputList? _zones; public InputList Zones @@ -1078,6 +499,9 @@ public InputList ImportVms set => _importVms = value; } + [Input("licenseType")] + public Input? LicenseType { get; set; } + [Input("loadBalancers")] private InputList? _loadBalancers; public InputList LoadBalancers @@ -1220,6 +644,9 @@ public InputList UpdateStates [Input("vmName")] public Input? VmName { get; set; } + [Input("vmNamePrefix")] + public Input? VmNamePrefix { get; set; } + [Input("zones")] private InputList? _zones; public InputList Zones diff --git a/sdk/go/spotinst/pulumiTypes.go b/sdk/go/spotinst/pulumiTypes.go index cb5875df..757b4d72 100644 --- a/sdk/go/spotinst/pulumiTypes.go +++ b/sdk/go/spotinst/pulumiTypes.go @@ -4216,8 +4216,9 @@ func (o StatefulNodeAzureNetworkNetworkInterfacePublicIpArrayOutput) Index(i pul } type StatefulNodeAzureOsDisk struct { - SizeGb *int `pulumi:"sizeGb"` - Type string `pulumi:"type"` + Caching *string `pulumi:"caching"` + SizeGb *int `pulumi:"sizeGb"` + Type string `pulumi:"type"` } // StatefulNodeAzureOsDiskInput is an input type that accepts StatefulNodeAzureOsDiskArgs and StatefulNodeAzureOsDiskOutput values. @@ -4232,8 +4233,9 @@ type StatefulNodeAzureOsDiskInput interface { } type StatefulNodeAzureOsDiskArgs struct { - SizeGb pulumi.IntPtrInput `pulumi:"sizeGb"` - Type pulumi.StringInput `pulumi:"type"` + Caching pulumi.StringPtrInput `pulumi:"caching"` + SizeGb pulumi.IntPtrInput `pulumi:"sizeGb"` + Type pulumi.StringInput `pulumi:"type"` } func (StatefulNodeAzureOsDiskArgs) ElementType() reflect.Type { @@ -4313,6 +4315,10 @@ func (o StatefulNodeAzureOsDiskOutput) ToStatefulNodeAzureOsDiskPtrOutputWithCon }).(StatefulNodeAzureOsDiskPtrOutput) } +func (o StatefulNodeAzureOsDiskOutput) Caching() pulumi.StringPtrOutput { + return o.ApplyT(func(v StatefulNodeAzureOsDisk) *string { return v.Caching }).(pulumi.StringPtrOutput) +} + func (o StatefulNodeAzureOsDiskOutput) SizeGb() pulumi.IntPtrOutput { return o.ApplyT(func(v StatefulNodeAzureOsDisk) *int { return v.SizeGb }).(pulumi.IntPtrOutput) } @@ -4345,6 +4351,15 @@ func (o StatefulNodeAzureOsDiskPtrOutput) Elem() StatefulNodeAzureOsDiskOutput { }).(StatefulNodeAzureOsDiskOutput) } +func (o StatefulNodeAzureOsDiskPtrOutput) Caching() pulumi.StringPtrOutput { + return o.ApplyT(func(v *StatefulNodeAzureOsDisk) *string { + if v == nil { + return nil + } + return v.Caching + }).(pulumi.StringPtrOutput) +} + func (o StatefulNodeAzureOsDiskPtrOutput) SizeGb() pulumi.IntPtrOutput { return o.ApplyT(func(v *StatefulNodeAzureOsDisk) *int { if v == nil { @@ -5133,9 +5148,11 @@ func (o StatefulNodeAzureSignalArrayOutput) Index(i pulumi.IntInput) StatefulNod } type StatefulNodeAzureStrategy struct { + AvailabilityVsCost *int `pulumi:"availabilityVsCost"` CapacityReservations []StatefulNodeAzureStrategyCapacityReservation `pulumi:"capacityReservations"` DrainingTimeout *int `pulumi:"drainingTimeout"` FallbackToOnDemand bool `pulumi:"fallbackToOnDemand"` + OdWindows []string `pulumi:"odWindows"` OptimizationWindows []string `pulumi:"optimizationWindows"` PreferredLifeCycle *string `pulumi:"preferredLifeCycle"` RevertToSpot *StatefulNodeAzureStrategyRevertToSpot `pulumi:"revertToSpot"` @@ -5153,9 +5170,11 @@ type StatefulNodeAzureStrategyInput interface { } type StatefulNodeAzureStrategyArgs struct { + AvailabilityVsCost pulumi.IntPtrInput `pulumi:"availabilityVsCost"` CapacityReservations StatefulNodeAzureStrategyCapacityReservationArrayInput `pulumi:"capacityReservations"` DrainingTimeout pulumi.IntPtrInput `pulumi:"drainingTimeout"` FallbackToOnDemand pulumi.BoolInput `pulumi:"fallbackToOnDemand"` + OdWindows pulumi.StringArrayInput `pulumi:"odWindows"` OptimizationWindows pulumi.StringArrayInput `pulumi:"optimizationWindows"` PreferredLifeCycle pulumi.StringPtrInput `pulumi:"preferredLifeCycle"` RevertToSpot StatefulNodeAzureStrategyRevertToSpotPtrInput `pulumi:"revertToSpot"` @@ -5238,6 +5257,10 @@ func (o StatefulNodeAzureStrategyOutput) ToStatefulNodeAzureStrategyPtrOutputWit }).(StatefulNodeAzureStrategyPtrOutput) } +func (o StatefulNodeAzureStrategyOutput) AvailabilityVsCost() pulumi.IntPtrOutput { + return o.ApplyT(func(v StatefulNodeAzureStrategy) *int { return v.AvailabilityVsCost }).(pulumi.IntPtrOutput) +} + func (o StatefulNodeAzureStrategyOutput) CapacityReservations() StatefulNodeAzureStrategyCapacityReservationArrayOutput { return o.ApplyT(func(v StatefulNodeAzureStrategy) []StatefulNodeAzureStrategyCapacityReservation { return v.CapacityReservations @@ -5252,6 +5275,10 @@ func (o StatefulNodeAzureStrategyOutput) FallbackToOnDemand() pulumi.BoolOutput return o.ApplyT(func(v StatefulNodeAzureStrategy) bool { return v.FallbackToOnDemand }).(pulumi.BoolOutput) } +func (o StatefulNodeAzureStrategyOutput) OdWindows() pulumi.StringArrayOutput { + return o.ApplyT(func(v StatefulNodeAzureStrategy) []string { return v.OdWindows }).(pulumi.StringArrayOutput) +} + func (o StatefulNodeAzureStrategyOutput) OptimizationWindows() pulumi.StringArrayOutput { return o.ApplyT(func(v StatefulNodeAzureStrategy) []string { return v.OptimizationWindows }).(pulumi.StringArrayOutput) } @@ -5288,6 +5315,15 @@ func (o StatefulNodeAzureStrategyPtrOutput) Elem() StatefulNodeAzureStrategyOutp }).(StatefulNodeAzureStrategyOutput) } +func (o StatefulNodeAzureStrategyPtrOutput) AvailabilityVsCost() pulumi.IntPtrOutput { + return o.ApplyT(func(v *StatefulNodeAzureStrategy) *int { + if v == nil { + return nil + } + return v.AvailabilityVsCost + }).(pulumi.IntPtrOutput) +} + func (o StatefulNodeAzureStrategyPtrOutput) CapacityReservations() StatefulNodeAzureStrategyCapacityReservationArrayOutput { return o.ApplyT(func(v *StatefulNodeAzureStrategy) []StatefulNodeAzureStrategyCapacityReservation { if v == nil { @@ -5315,6 +5351,15 @@ func (o StatefulNodeAzureStrategyPtrOutput) FallbackToOnDemand() pulumi.BoolPtrO }).(pulumi.BoolPtrOutput) } +func (o StatefulNodeAzureStrategyPtrOutput) OdWindows() pulumi.StringArrayOutput { + return o.ApplyT(func(v *StatefulNodeAzureStrategy) []string { + if v == nil { + return nil + } + return v.OdWindows + }).(pulumi.StringArrayOutput) +} + func (o StatefulNodeAzureStrategyPtrOutput) OptimizationWindows() pulumi.StringArrayOutput { return o.ApplyT(func(v *StatefulNodeAzureStrategy) []string { if v == nil { diff --git a/sdk/go/spotinst/statefulNodeAzure.go b/sdk/go/spotinst/statefulNodeAzure.go index c8948e71..d05f9a77 100644 --- a/sdk/go/spotinst/statefulNodeAzure.go +++ b/sdk/go/spotinst/statefulNodeAzure.go @@ -13,541 +13,6 @@ import ( ) // Provides a Spotinst stateful node Azure resource. -// -// ## Example Usage -// -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-spotinst/sdk/v3/go/spotinst" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := spotinst.NewStatefulNodeAzure(ctx, "testStatefulNodeAzure", &spotinst.StatefulNodeAzureArgs{ -// Region: pulumi.String("eastus"), -// ResourceGroupName: pulumi.String("spotinst-azure"), -// Description: pulumi.String("example_stateful_node_azure_description"), -// Strategy: &spotinst.StatefulNodeAzureStrategyArgs{ -// DrainingTimeout: pulumi.Int(30), -// FallbackToOnDemand: pulumi.Bool(true), -// OptimizationWindows: pulumi.StringArray{ -// pulumi.String("Tue:19:46-Tue:20:46"), -// }, -// RevertToSpot: &spotinst.StatefulNodeAzureStrategyRevertToSpotArgs{ -// PerformAt: pulumi.String("timeWindow"), -// }, -// PreferredLifeCycle: pulumi.String("od"), -// CapacityReservations: spotinst.StatefulNodeAzureStrategyCapacityReservationArray{ -// &spotinst.StatefulNodeAzureStrategyCapacityReservationArgs{ -// ShouldUtilize: pulumi.Bool(true), -// UtilizationStrategy: pulumi.String("utilizeOverOD"), -// CapacityReservationGroups: spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArray{ -// &spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs{ -// CrgName: pulumi.String("crg name"), -// CrgResourceGroupName: pulumi.String("resourceGroupName"), -// CrgShouldPrioritize: pulumi.Bool(true), -// }, -// }, -// }, -// }, -// }, -// Os: pulumi.String("Linux"), -// OdSizes: pulumi.StringArray{ -// pulumi.String("standard_ds1_v2"), -// pulumi.String("standard_ds2_v2"), -// }, -// SpotSizes: pulumi.StringArray{ -// pulumi.String("standard_ds1_v2"), -// pulumi.String("standard_ds2_v2"), -// }, -// PreferredSpotSizes: pulumi.StringArray{ -// pulumi.String("standard_ds1_v2"), -// }, -// Zones: pulumi.StringArray{ -// pulumi.String("1"), -// pulumi.String("3"), -// }, -// PreferredZone: pulumi.String("1"), -// CustomData: pulumi.String(""), -// ShutdownScript: pulumi.String(""), -// UserData: pulumi.String(""), -// VmName: pulumi.String("VMName"), -// BootDiagnostics: spotinst.StatefulNodeAzureBootDiagnosticArray{ -// &spotinst.StatefulNodeAzureBootDiagnosticArgs{ -// IsEnabled: pulumi.Bool(true), -// StorageUrl: pulumi.String("https://.blob.core.windows.net/test"), -// Type: pulumi.String("unmanaged"), -// }, -// }, -// DataDisks: spotinst.StatefulNodeAzureDataDiskArray{ -// &spotinst.StatefulNodeAzureDataDiskArgs{ -// SizeGb: pulumi.Int(1), -// Lun: pulumi.Int(1), -// Type: pulumi.String("Standard_LRS"), -// }, -// &spotinst.StatefulNodeAzureDataDiskArgs{ -// SizeGb: pulumi.Int(10), -// Lun: pulumi.Int(2), -// Type: pulumi.String("Standard_LRS"), -// }, -// }, -// Extensions: spotinst.StatefulNodeAzureExtensionArray{ -// &spotinst.StatefulNodeAzureExtensionArgs{ -// Name: pulumi.String("extensionName"), -// Type: pulumi.String("customScript"), -// Publisher: pulumi.String("Microsoft.Azure.Extensions"), -// ApiVersion: pulumi.String("2.0"), -// MinorVersionAutoUpgrade: pulumi.Bool(true), -// ProtectedSettings: pulumi.Map{ -// "script": pulumi.Any("IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg=="), -// }, -// }, -// }, -// Image: &spotinst.StatefulNodeAzureImageArgs{ -// MarketplaceImages: spotinst.StatefulNodeAzureImageMarketplaceImageArray{ -// &spotinst.StatefulNodeAzureImageMarketplaceImageArgs{ -// Publisher: pulumi.String("Canonical"), -// Offer: pulumi.String("UbuntuServer"), -// Sku: pulumi.String("16.04-LTS"), -// Version: pulumi.String("latest"), -// }, -// }, -// }, -// LoadBalancers: spotinst.StatefulNodeAzureLoadBalancerArray{ -// &spotinst.StatefulNodeAzureLoadBalancerArgs{ -// Type: pulumi.String("loadBalancer"), -// ResourceGroupName: pulumi.String("testResourceGroup"), -// Name: pulumi.String("testLoadBalancer"), -// Sku: pulumi.String("Standard"), -// BackendPoolNames: pulumi.StringArray{ -// pulumi.String("testBackendPool1"), -// pulumi.String("testBackendPool2"), -// }, -// }, -// }, -// Login: &spotinst.StatefulNodeAzureLoginArgs{ -// UserName: pulumi.String("admin"), -// SshPublicKey: pulumi.String("33a2s1f3g5a1df5g1ad3f2g1adfg56dfg=="), -// }, -// ManagedServiceIdentities: spotinst.StatefulNodeAzureManagedServiceIdentityArray{ -// &spotinst.StatefulNodeAzureManagedServiceIdentityArgs{ -// Name: pulumi.String("mySI2"), -// ResourceGroupName: pulumi.String("myResourceGroup"), -// }, -// }, -// Network: &spotinst.StatefulNodeAzureNetworkArgs{ -// NetworkResourceGroupName: pulumi.String("subnetResourceGroup"), -// VirtualNetworkName: pulumi.String("vname"), -// NetworkInterfaces: spotinst.StatefulNodeAzureNetworkNetworkInterfaceArray{ -// &spotinst.StatefulNodeAzureNetworkNetworkInterfaceArgs{ -// IsPrimary: pulumi.Bool(true), -// SubnetName: pulumi.String("testSubnet"), -// AssignPublicIp: pulumi.Bool(true), -// PublicIpSku: pulumi.String("Standard"), -// NetworkSecurityGroups: spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArray{ -// &spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs{ -// NetworkResourceGroupName: pulumi.String("test"), -// Name: pulumi.String("test"), -// }, -// }, -// EnableIpForwarding: pulumi.Bool(true), -// PrivateIpAddresses: pulumi.StringArray{ -// pulumi.String("172.23.4.20"), -// }, -// AdditionalIpConfigurations: spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArray{ -// &spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs{ -// Name: pulumi.String("test"), -// PrivateIpAddressVersion: pulumi.String("IPv4"), -// }, -// }, -// PublicIps: spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArray{ -// &spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs{ -// NetworkResourceGroupName: pulumi.String("resourceGroup"), -// Name: pulumi.String("test"), -// }, -// }, -// ApplicationSecurityGroups: spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArray{ -// &spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs{ -// NetworkResourceGroupName: pulumi.String("AsgResourceGroup"), -// Name: pulumi.String("AsgName"), -// }, -// }, -// }, -// }, -// }, -// OsDisk: &spotinst.StatefulNodeAzureOsDiskArgs{ -// SizeGb: pulumi.Int(30), -// Type: pulumi.String("Standard_LRS"), -// }, -// Secrets: spotinst.StatefulNodeAzureSecretArray{ -// &spotinst.StatefulNodeAzureSecretArgs{ -// SourceVaults: spotinst.StatefulNodeAzureSecretSourceVaultArray{ -// &spotinst.StatefulNodeAzureSecretSourceVaultArgs{ -// Name: pulumi.String("string"), -// ResourceGroupName: pulumi.String("string"), -// }, -// }, -// VaultCertificates: spotinst.StatefulNodeAzureSecretVaultCertificateArray{ -// &spotinst.StatefulNodeAzureSecretVaultCertificateArgs{ -// CertificateUrl: pulumi.String("string"), -// CertificateStore: pulumi.String("string"), -// }, -// }, -// }, -// }, -// Security: &spotinst.StatefulNodeAzureSecurityArgs{ -// SecurityType: pulumi.String("Standard"), -// SecureBootEnabled: pulumi.Bool(false), -// VtpmEnabled: pulumi.Bool(false), -// }, -// Tags: spotinst.StatefulNodeAzureTagArray{ -// &spotinst.StatefulNodeAzureTagArgs{ -// TagKey: pulumi.String("Creator"), -// TagValue: pulumi.String("string"), -// }, -// }, -// Health: &spotinst.StatefulNodeAzureHealthArgs{ -// HealthCheckTypes: pulumi.StringArray{ -// pulumi.String("vmState"), -// }, -// UnhealthyDuration: pulumi.Int(300), -// GracePeriod: pulumi.Int(120), -// AutoHealing: pulumi.Bool(true), -// }, -// ShouldPersistOsDisk: pulumi.Bool(false), -// OsDiskPersistenceMode: pulumi.String("reattach"), -// ShouldPersistDataDisks: pulumi.Bool(true), -// DataDisksPersistenceMode: pulumi.String("reattach"), -// ShouldPersistNetwork: pulumi.Bool(true), -// SchedulingTasks: spotinst.StatefulNodeAzureSchedulingTaskArray{ -// &spotinst.StatefulNodeAzureSchedulingTaskArgs{ -// IsEnabled: pulumi.Bool(true), -// Type: pulumi.String("pause"), -// CronExpression: pulumi.String("44 10 * * *"), -// }, -// &spotinst.StatefulNodeAzureSchedulingTaskArgs{ -// IsEnabled: pulumi.Bool(true), -// Type: pulumi.String("resume"), -// CronExpression: pulumi.String("48 10 * * *"), -// }, -// &spotinst.StatefulNodeAzureSchedulingTaskArgs{ -// IsEnabled: pulumi.Bool(true), -// Type: pulumi.String("recycle"), -// CronExpression: pulumi.String("52 10 * * *"), -// }, -// }, -// Signals: spotinst.StatefulNodeAzureSignalArray{ -// &spotinst.StatefulNodeAzureSignalArgs{ -// Type: pulumi.String("vmReady"), -// Timeout: pulumi.Int(20), -// }, -// &spotinst.StatefulNodeAzureSignalArgs{ -// Type: pulumi.String("vmReady"), -// Timeout: pulumi.Int(40), -// }, -// }, -// ProximityPlacementGroups: spotinst.StatefulNodeAzureProximityPlacementGroupArray{ -// &spotinst.StatefulNodeAzureProximityPlacementGroupArgs{ -// Name: pulumi.String("TestPPG"), -// ResourceGroupName: pulumi.String("TestResourceGroup"), -// }, -// }, -// Deletes: spotinst.StatefulNodeAzureDeleteArray{ -// &spotinst.StatefulNodeAzureDeleteArgs{ -// ShouldTerminateVm: pulumi.Bool(true), -// NetworkShouldDeallocate: pulumi.Bool(true), -// NetworkTtlInHours: pulumi.Int(0), -// DiskShouldDeallocate: pulumi.Bool(true), -// DiskTtlInHours: pulumi.Int(0), -// SnapshotShouldDeallocate: pulumi.Bool(true), -// SnapshotTtlInHours: pulumi.Int(0), -// PublicIpShouldDeallocate: pulumi.Bool(true), -// PublicIpTtlInHours: pulumi.Int(0), -// }, -// }, -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// -// # Argument Reference -// -// The following arguments are supported: -// -// * `name` - (Required) Azure stateful node name. -// * `region` - (Required) The Azure region your stateful node will be created in. -// * `resourceGroupName` - (Required) Name of the Resource Group for stateful node. -// * `description` - (Optional) Describe your Azure stateful node. -// -// -// ## Strategy -// -// * `strategy` - (Required) Strategy for stateful node. -// - `drainingTimeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. -// - `fallbackToOnDemand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. -// - `optimizationWindows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. -// - `preferredLifeCycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. -// - `revertToSpot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. -// - `performAt` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. -// - `capacityReservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) -// - `shouldUtilize` - (Required) Determines whether capacity reservations should be utilized. -// - `utilizationStrategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) -// - `capacityReservationGroups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. -// - `crgName` - (Required) The name of the CRG. -// - `crgResourceGroupName` - (Required) Azure resource group name -// - `crgShouldPrioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. -// -// -// ## Compute -// -// * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. -// * `odSizes` - (Required) Available On-Demand sizes. -// * `spotSizes` - (Required) Available Spot-VM sizes. -// * `preferredSpotSizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. -// * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. -// * `preferredZone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. -// * `customData` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. -// * `shutdownScript` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. -// * `userData` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) -// * `vmName` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. -// -// -// ## Boot Diagnostics -// -// * `bootDiagnostics` -// - `isEnabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. -// - `storageUrl` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. -// - `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. -// -// -// ## Data Disks -// -// * `dataDisk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. -// - `sizeGb` - (Required) The size of the data disk in GB, required if dataDisks is specified. -// - `lun` - (Required) The LUN of the data disk. -// - `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. -// -// -// ## Extensions -// -// * `extension` - (Optional) An object for an azure extension. -// - `name` - (Required) Required on compute.launchSpecification.extensions object. -// - `type` - (Required) Required on compute.launchSpecification.extensions object. -// - `publisher` - (Required) Required on compute.launchSpecification.extensions object. -// - `apiVersion` - (Required) The API version of the extension. Required if extension specified. -// - `minorVersionAutoUpgrade` - (Required) Required on compute.launchSpecification.extensions object. -// - `protectedSettings` - (Optional) Object for protected settings. -// - `publicSettings` - (Optional) Object for public settings. -// -// -// ## Image -// -// * `image` -// - `marketplaceImage` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. -// - `publisher` - (Required) Image publisher. -// - `offer` - (Required) Image offer. -// - `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. -// - `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". -// - `galleryImage` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. -// - `galleryResourceGroupName` - (Required) The resource group name for gallery image. -// - `galleryName` - (Required) Name of the gallery. -// - `imageName` - (Required) Name of the gallery image. -// - `versionName` - (Required) Image's version. Can be in the format x.x.x or 'latest'. -// - `customImage` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. -// - `customImageResourceGroupName` - (Required) The resource group name for custom image. -// - `name` - (Required) The name of the custom image. -// -// -// ## Load Balancer -// -// * `loadBalancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. -// - `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. -// - `resourceGroupName` - (Required) The Resource Group name of the Load Balancer. -// - `name` - (Required) Name of the Application Gateway/Load Balancer. -// - `sku` - (Optional) -// - if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. -// - If ApplicationGateway then possible values are -// `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. -// - `backendPoolNames` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. -// -// -// ## Login -// -// * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. -// - `userName` - (Required) username for admin access to VMs. -// - `sshPublicKey` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. -// - `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. -// -// -// ## Managed Service Identities -// -// * `managedServiceIdentities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. -// - `name` - (Required) name of the managed identity. -// - `resourceGroupName` - (Required) The Resource Group that the user-assigned managed identity resides in. -// -// -// ## Proximity Placement Groups -// -// * `proximityPlacementGroups` - (Optional) Defines the proximity placement group in which the VM will be launched. -// - `name` - (Required) name of the proximity placement group. -// - `resourceGroupName` - (Required) The Resource Group name of the proximity placement group. -// -// -// ## Network -// -// * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. -// - `networkResourceGroupName` - (Required) Vnet Resource Group Name. -// - `virtualNetworkName` - (Required) Virtual Network. -// - `networkInterface` - (Required) Define a network interface -// - `isPrimary` - (Required) Defines whether the network interface is primary or not. -// - `subnetName` - (Required) Subnet name. -// - `assignPublicIp` - (Optional) Assign public IP. -// - `publicIpSku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. -// - `networkSecurityGroup` - (Optional) Network Security Group. -// - `networkResourceGroupName` - (Required) Requires valid security group name. -// - `name` - (Required) Requires valid resource group name. -// - `enableIpForwarding` - (Optional) Enable IP Forwarding. -// - `privateIpAddresses` - (Optional) A list with unique items that every item is a valid IP. -// - `additionalIpConfigurations` - (Optional) Additional configuration of network interface. -// - `name` - (Required) Configuration name. -// - `privateIpAddressVersion` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. -// - `publicIps` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. -// - `resourceGroupName` - (Required) The resource group of the public ip. -// - `name` - (Required) - The name of the public ip. -// - `applicationSecurityGroups` - (Optional) Network Security Group. -// - `resourceGroupName` - (Required) Requires valid security group name. -// - `name` - (Required) Requires valid resource group name. -// -// -// ## OS Disk -// -// * `osDisk` - (Optional) Specify OS disk specification other than default. -// - `sizeGb` - (Optional, Default `"30"`) The size of the data disk in GB. -// - `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. -// -// -// ## Secret -// -// * `secret` - (Optional) Set of certificates that should be installed on the VM. -// - `sourceVault` - (Required) The key vault reference, contains the required certificates. -// - `name` - (Required) The name of the key vault. -// - `resourceGroupName` - (Required) The resource group name of the key vault. -// - `vaultCertificates` - (Required) The required certificate references. -// - `certificateUrl` - (Optional) The URL of the certificate under the key vault. -// - `certificateStore` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. -// - This field is required only when using Windows OS type -// - This field must be ‘null’ when the OS type is Linux -// -// -// ## Security -// -// * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. -// - `secureBootEnabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. -// - `securityType` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. -// - `vtpmEnabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. -// -// -// ## Tag -// -// * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. -// - `tagKey` - (Optional) Tag Key for Stateful Node Resources. -// - `tagValue` - (Optional) Tag Value for Stateful Node Resources. -// -// -// ## Health -// -// * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. -// - `healthCheckTypes` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. -// - `unhealthyDuration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. -// - `autoHealing` - (Required) Enable Autohealing of unhealthy VMs. -// - `gracePeriod` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. -// -// -// ## Persistence -// -// * `shouldPersistOsDisk` - (Required) Should persist os disk. -// * `osDiskPersistenceMode` - (Optional, Enum `"reattach", "onLaunch"`) -// * `shouldPersistDataDisks` - (Required) Should persist data disks. -// * `dataDisksPersistenceMode` - (Optional, Enum `"reattach", "onLaunch"`) -// * `shouldPersistNetwork` - (Required) Should persist network. -// -// -// ## Scheduling Tasks -// -// * `schedulingTask` - (Optional) Scheduling settings object for stateful node. -// - `isEnabled` - (Required) Is scheduled task enabled for stateful node. -// - `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task -// - `cronExpression` (Required) A expression which describes when to execute the scheduled task (UTC). -// -// -// ## Signals -// -// * `signal` - (Optional) A signal object defined for the stateful node. -// - `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. -// - `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. -// -// *** -// -// -// ## Attach Data Disk -// -// * `attachDataDisk` - (Optional) Create a new data disk and attach it to the stateful node. -// - `dataDiskName` - (Required) The name of the created data disk. -// - `dataDiskResourceGroupName` - (Required) The resource group name in which the data disk will be created. -// - `storageAccountType` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. -// - `sizeGb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. -// - `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. -// - `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. -// -// -// ## Detach Data Disk -// -// * `detachDataDisk` - (Optional) Detach a data disk from a stateful node. -// - `dataDiskName` - (Required) The name of the detached data disk. -// - `dataDiskResourceGroupName` - (Required) The resource group name in which the data disk exists. -// - `shouldDeallocate` - (Required) Indicates whether to delete the data disk in addition to detach. -// - `ttlInHours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. -// -// -// ## Update State -// -// * `updateState` - (Optional) Update the stateful node state. -// - `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. -// -// -// ## Import VM -// -// * `importVm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. -// - `resourceGroupName` - (Required) Name of the Resource Group for Stateful Node. -// - `originalVmName` - (Required) Azure Import Stateful Node Name. -// - `drainingTimeout` - (Optional) Hours to keep resources alive. -// - `resourcesRetentionTime` - (Optional) Hours to keep resources alive. -// -// -// ## Deallocation Config -// -// * `delete` - (Required) Specify deallocation parameters for stateful node deletion. -// - `shouldTerminateVm` - (Required) Indicates whether to delete the stateful node's VM. -// - `networkShouldDeallocate` - (Required) Indicates whether to delete the stateful node's network resources. -// - `networkTtlInHours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. -// - `diskShouldDeallocate` - (Required) Indicates whether to delete the stateful node's disk resources. -// - `diskTtlInHours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. -// - `snapshotShouldDeallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. -// - `snapshotTtlInHours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. -// - `publicIpShouldDeallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. -// - `publicIpTtlInHours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. type StatefulNodeAzure struct { pulumi.CustomResourceState @@ -563,6 +28,7 @@ type StatefulNodeAzure struct { Health StatefulNodeAzureHealthOutput `pulumi:"health"` Image StatefulNodeAzureImagePtrOutput `pulumi:"image"` ImportVms StatefulNodeAzureImportVmArrayOutput `pulumi:"importVms"` + LicenseType pulumi.StringPtrOutput `pulumi:"licenseType"` LoadBalancers StatefulNodeAzureLoadBalancerArrayOutput `pulumi:"loadBalancers"` Login StatefulNodeAzureLoginPtrOutput `pulumi:"login"` ManagedServiceIdentities StatefulNodeAzureManagedServiceIdentityArrayOutput `pulumi:"managedServiceIdentities"` @@ -592,6 +58,7 @@ type StatefulNodeAzure struct { UpdateStates StatefulNodeAzureUpdateStateArrayOutput `pulumi:"updateStates"` UserData pulumi.StringOutput `pulumi:"userData"` VmName pulumi.StringPtrOutput `pulumi:"vmName"` + VmNamePrefix pulumi.StringPtrOutput `pulumi:"vmNamePrefix"` Zones pulumi.StringArrayOutput `pulumi:"zones"` } @@ -664,6 +131,7 @@ type statefulNodeAzureState struct { Health *StatefulNodeAzureHealth `pulumi:"health"` Image *StatefulNodeAzureImage `pulumi:"image"` ImportVms []StatefulNodeAzureImportVm `pulumi:"importVms"` + LicenseType *string `pulumi:"licenseType"` LoadBalancers []StatefulNodeAzureLoadBalancer `pulumi:"loadBalancers"` Login *StatefulNodeAzureLogin `pulumi:"login"` ManagedServiceIdentities []StatefulNodeAzureManagedServiceIdentity `pulumi:"managedServiceIdentities"` @@ -693,6 +161,7 @@ type statefulNodeAzureState struct { UpdateStates []StatefulNodeAzureUpdateState `pulumi:"updateStates"` UserData *string `pulumi:"userData"` VmName *string `pulumi:"vmName"` + VmNamePrefix *string `pulumi:"vmNamePrefix"` Zones []string `pulumi:"zones"` } @@ -709,6 +178,7 @@ type StatefulNodeAzureState struct { Health StatefulNodeAzureHealthPtrInput Image StatefulNodeAzureImagePtrInput ImportVms StatefulNodeAzureImportVmArrayInput + LicenseType pulumi.StringPtrInput LoadBalancers StatefulNodeAzureLoadBalancerArrayInput Login StatefulNodeAzureLoginPtrInput ManagedServiceIdentities StatefulNodeAzureManagedServiceIdentityArrayInput @@ -738,6 +208,7 @@ type StatefulNodeAzureState struct { UpdateStates StatefulNodeAzureUpdateStateArrayInput UserData pulumi.StringPtrInput VmName pulumi.StringPtrInput + VmNamePrefix pulumi.StringPtrInput Zones pulumi.StringArrayInput } @@ -758,6 +229,7 @@ type statefulNodeAzureArgs struct { Health *StatefulNodeAzureHealth `pulumi:"health"` Image *StatefulNodeAzureImage `pulumi:"image"` ImportVms []StatefulNodeAzureImportVm `pulumi:"importVms"` + LicenseType *string `pulumi:"licenseType"` LoadBalancers []StatefulNodeAzureLoadBalancer `pulumi:"loadBalancers"` Login *StatefulNodeAzureLogin `pulumi:"login"` ManagedServiceIdentities []StatefulNodeAzureManagedServiceIdentity `pulumi:"managedServiceIdentities"` @@ -787,6 +259,7 @@ type statefulNodeAzureArgs struct { UpdateStates []StatefulNodeAzureUpdateState `pulumi:"updateStates"` UserData *string `pulumi:"userData"` VmName *string `pulumi:"vmName"` + VmNamePrefix *string `pulumi:"vmNamePrefix"` Zones []string `pulumi:"zones"` } @@ -804,6 +277,7 @@ type StatefulNodeAzureArgs struct { Health StatefulNodeAzureHealthPtrInput Image StatefulNodeAzureImagePtrInput ImportVms StatefulNodeAzureImportVmArrayInput + LicenseType pulumi.StringPtrInput LoadBalancers StatefulNodeAzureLoadBalancerArrayInput Login StatefulNodeAzureLoginPtrInput ManagedServiceIdentities StatefulNodeAzureManagedServiceIdentityArrayInput @@ -833,6 +307,7 @@ type StatefulNodeAzureArgs struct { UpdateStates StatefulNodeAzureUpdateStateArrayInput UserData pulumi.StringPtrInput VmName pulumi.StringPtrInput + VmNamePrefix pulumi.StringPtrInput Zones pulumi.StringArrayInput } @@ -971,6 +446,10 @@ func (o StatefulNodeAzureOutput) ImportVms() StatefulNodeAzureImportVmArrayOutpu return o.ApplyT(func(v *StatefulNodeAzure) StatefulNodeAzureImportVmArrayOutput { return v.ImportVms }).(StatefulNodeAzureImportVmArrayOutput) } +func (o StatefulNodeAzureOutput) LicenseType() pulumi.StringPtrOutput { + return o.ApplyT(func(v *StatefulNodeAzure) pulumi.StringPtrOutput { return v.LicenseType }).(pulumi.StringPtrOutput) +} + func (o StatefulNodeAzureOutput) LoadBalancers() StatefulNodeAzureLoadBalancerArrayOutput { return o.ApplyT(func(v *StatefulNodeAzure) StatefulNodeAzureLoadBalancerArrayOutput { return v.LoadBalancers }).(StatefulNodeAzureLoadBalancerArrayOutput) } @@ -1091,6 +570,10 @@ func (o StatefulNodeAzureOutput) VmName() pulumi.StringPtrOutput { return o.ApplyT(func(v *StatefulNodeAzure) pulumi.StringPtrOutput { return v.VmName }).(pulumi.StringPtrOutput) } +func (o StatefulNodeAzureOutput) VmNamePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *StatefulNodeAzure) pulumi.StringPtrOutput { return v.VmNamePrefix }).(pulumi.StringPtrOutput) +} + func (o StatefulNodeAzureOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *StatefulNodeAzure) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzure.java b/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzure.java index 027c02eb..4ccddb57 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzure.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzure.java @@ -41,512 +41,6 @@ /** * Provides a Spotinst stateful node Azure resource. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.spotinst.StatefulNodeAzure; - * import com.pulumi.spotinst.StatefulNodeAzureArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureStrategyArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureStrategyRevertToSpotArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureBootDiagnosticArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureDataDiskArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureExtensionArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureImageArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureLoadBalancerArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureLoginArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureManagedServiceIdentityArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureNetworkArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureOsDiskArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureSecretArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureSecurityArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureTagArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureHealthArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureSchedulingTaskArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureSignalArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureProximityPlacementGroupArgs; - * import com.pulumi.spotinst.inputs.StatefulNodeAzureDeleteArgs; - * import java.util.List; - * import java.util.ArrayList; - * import java.util.Map; - * import java.io.File; - * import java.nio.file.Files; - * import java.nio.file.Paths; - * - * public class App { - * public static void main(String[] args) { - * Pulumi.run(App::stack); - * } - * - * public static void stack(Context ctx) { - * var testStatefulNodeAzure = new StatefulNodeAzure("testStatefulNodeAzure", StatefulNodeAzureArgs.builder() - * .region("eastus") - * .resourceGroupName("spotinst-azure") - * .description("example_stateful_node_azure_description") - * .strategy(StatefulNodeAzureStrategyArgs.builder() - * .drainingTimeout(30) - * .fallbackToOnDemand(true) - * .optimizationWindows("Tue:19:46-Tue:20:46") - * .revertToSpot(StatefulNodeAzureStrategyRevertToSpotArgs.builder() - * .performAt("timeWindow") - * .build()) - * .preferredLifeCycle("od") - * .capacityReservations(StatefulNodeAzureStrategyCapacityReservationArgs.builder() - * .shouldUtilize(true) - * .utilizationStrategy("utilizeOverOD") - * .capacityReservationGroups(StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs.builder() - * .crgName("crg name") - * .crgResourceGroupName("resourceGroupName") - * .crgShouldPrioritize(true) - * .build()) - * .build()) - * .build()) - * .os("Linux") - * .odSizes( - * "standard_ds1_v2", - * "standard_ds2_v2") - * .spotSizes( - * "standard_ds1_v2", - * "standard_ds2_v2") - * .preferredSpotSizes("standard_ds1_v2") - * .zones( - * "1", - * "3") - * .preferredZone("1") - * .customData("") - * .shutdownScript("") - * .userData("") - * .vmName("VMName") - * .bootDiagnostics(StatefulNodeAzureBootDiagnosticArgs.builder() - * .isEnabled(true) - * .storageUrl("https://.blob.core.windows.net/test") - * .type("unmanaged") - * .build()) - * .dataDisks( - * StatefulNodeAzureDataDiskArgs.builder() - * .sizeGb(1) - * .lun(1) - * .type("Standard_LRS") - * .build(), - * StatefulNodeAzureDataDiskArgs.builder() - * .sizeGb(10) - * .lun(2) - * .type("Standard_LRS") - * .build()) - * .extensions(StatefulNodeAzureExtensionArgs.builder() - * .name("extensionName") - * .type("customScript") - * .publisher("Microsoft.Azure.Extensions") - * .apiVersion("2.0") - * .minorVersionAutoUpgrade(true) - * .protectedSettings(Map.of("script", "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==")) - * .build()) - * .image(StatefulNodeAzureImageArgs.builder() - * .marketplaceImages(StatefulNodeAzureImageMarketplaceImageArgs.builder() - * .publisher("Canonical") - * .offer("UbuntuServer") - * .sku("16.04-LTS") - * .version("latest") - * .build()) - * .build()) - * .loadBalancers(StatefulNodeAzureLoadBalancerArgs.builder() - * .type("loadBalancer") - * .resourceGroupName("testResourceGroup") - * .name("testLoadBalancer") - * .sku("Standard") - * .backendPoolNames( - * "testBackendPool1", - * "testBackendPool2") - * .build()) - * .login(StatefulNodeAzureLoginArgs.builder() - * .userName("admin") - * .sshPublicKey("33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==") - * .build()) - * .managedServiceIdentities(StatefulNodeAzureManagedServiceIdentityArgs.builder() - * .name("mySI2") - * .resourceGroupName("myResourceGroup") - * .build()) - * .network(StatefulNodeAzureNetworkArgs.builder() - * .networkResourceGroupName("subnetResourceGroup") - * .virtualNetworkName("vname") - * .networkInterfaces(StatefulNodeAzureNetworkNetworkInterfaceArgs.builder() - * .isPrimary(true) - * .subnetName("testSubnet") - * .assignPublicIp(true) - * .publicIpSku("Standard") - * .networkSecurityGroups(StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs.builder() - * .networkResourceGroupName("test") - * .name("test") - * .build()) - * .enableIpForwarding(true) - * .privateIpAddresses("172.23.4.20") - * .additionalIpConfigurations(StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs.builder() - * .name("test") - * .privateIpAddressVersion("IPv4") - * .build()) - * .publicIps(StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs.builder() - * .networkResourceGroupName("resourceGroup") - * .name("test") - * .build()) - * .applicationSecurityGroups(StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs.builder() - * .networkResourceGroupName("AsgResourceGroup") - * .name("AsgName") - * .build()) - * .build()) - * .build()) - * .osDisk(StatefulNodeAzureOsDiskArgs.builder() - * .sizeGb(30) - * .type("Standard_LRS") - * .build()) - * .secrets(StatefulNodeAzureSecretArgs.builder() - * .sourceVaults(StatefulNodeAzureSecretSourceVaultArgs.builder() - * .name("string") - * .resourceGroupName("string") - * .build()) - * .vaultCertificates(StatefulNodeAzureSecretVaultCertificateArgs.builder() - * .certificateUrl("string") - * .certificateStore("string") - * .build()) - * .build()) - * .security(StatefulNodeAzureSecurityArgs.builder() - * .securityType("Standard") - * .secureBootEnabled(false) - * .vtpmEnabled(false) - * .build()) - * .tags(StatefulNodeAzureTagArgs.builder() - * .tagKey("Creator") - * .tagValue("string") - * .build()) - * .health(StatefulNodeAzureHealthArgs.builder() - * .healthCheckTypes("vmState") - * .unhealthyDuration(300) - * .gracePeriod(120) - * .autoHealing(true) - * .build()) - * .shouldPersistOsDisk(false) - * .osDiskPersistenceMode("reattach") - * .shouldPersistDataDisks(true) - * .dataDisksPersistenceMode("reattach") - * .shouldPersistNetwork(true) - * .schedulingTasks( - * StatefulNodeAzureSchedulingTaskArgs.builder() - * .isEnabled(true) - * .type("pause") - * .cronExpression("44 10 * * *") - * .build(), - * StatefulNodeAzureSchedulingTaskArgs.builder() - * .isEnabled(true) - * .type("resume") - * .cronExpression("48 10 * * *") - * .build(), - * StatefulNodeAzureSchedulingTaskArgs.builder() - * .isEnabled(true) - * .type("recycle") - * .cronExpression("52 10 * * *") - * .build()) - * .signals( - * StatefulNodeAzureSignalArgs.builder() - * .type("vmReady") - * .timeout(20) - * .build(), - * StatefulNodeAzureSignalArgs.builder() - * .type("vmReady") - * .timeout(40) - * .build()) - * .proximityPlacementGroups(StatefulNodeAzureProximityPlacementGroupArgs.builder() - * .name("TestPPG") - * .resourceGroupName("TestResourceGroup") - * .build()) - * .deletes(StatefulNodeAzureDeleteArgs.builder() - * .shouldTerminateVm(true) - * .networkShouldDeallocate(true) - * .networkTtlInHours(0) - * .diskShouldDeallocate(true) - * .diskTtlInHours(0) - * .snapshotShouldDeallocate(true) - * .snapshotTtlInHours(0) - * .publicIpShouldDeallocate(true) - * .publicIpTtlInHours(0) - * .build()) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * - * # Argument Reference - * - * The following arguments are supported: - * - * * `name` - (Required) Azure stateful node name. - * * `region` - (Required) The Azure region your stateful node will be created in. - * * `resource_group_name` - (Required) Name of the Resource Group for stateful node. - * * `description` - (Optional) Describe your Azure stateful node. - * - * <a id="strategy"></a> - * ## Strategy - * - * * `strategy` - (Required) Strategy for stateful node. - * * `draining_timeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. - * * `fallback_to_on_demand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. - * * `optimization_windows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. - * * `preferred_life_cycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. - * * `revert_to_spot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. - * * `perform_at` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. - * * `capacity_reservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) - * * `should_utilize` - (Required) Determines whether capacity reservations should be utilized. - * * `utilization_strategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) - * * `capacity_reservation_groups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. - * * `crg_name` - (Required) The name of the CRG. - * * `crg_resource_group_name` - (Required) Azure resource group name - * * `crg_should_prioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. - * - * <a id="compute"></a> - * ## Compute - * - * * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. - * * `od_sizes` - (Required) Available On-Demand sizes. - * * `spot_sizes` - (Required) Available Spot-VM sizes. - * * `preferred_spot_sizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. - * * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. - * * `preferred_zone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. - * * `custom_data` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. - * * `shutdown_script` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. - * * `user_data` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) - * * `vm_name` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. - * - * <a id="boot_diagnostics"></a> - * ## Boot Diagnostics - * - * * `boot_diagnostics` - * * `is_enabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. - * * `storage_url` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. - * * `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. - * - * <a id="data_disks"></a> - * ## Data Disks - * - * * `data_disk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. - * * `size_gb` - (Required) The size of the data disk in GB, required if dataDisks is specified. - * * `lun` - (Required) The LUN of the data disk. - * * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * - * <a id="extensions"></a> - * ## Extensions - * - * * `extension` - (Optional) An object for an azure extension. - * * `name` - (Required) Required on compute.launchSpecification.extensions object. - * * `type` - (Required) Required on compute.launchSpecification.extensions object. - * * `publisher` - (Required) Required on compute.launchSpecification.extensions object. - * * `api_version` - (Required) The API version of the extension. Required if extension specified. - * * `minor_version_auto_upgrade` - (Required) Required on compute.launchSpecification.extensions object. - * * `protected_settings` - (Optional) Object for protected settings. - * * `public_settings` - (Optional) Object for public settings. - * - * <a id="image"></a> - * ## Image - * - * * `image` - * * `marketplace_image` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. - * * `publisher` - (Required) Image publisher. - * * `offer` - (Required) Image offer. - * * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. - * * `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". - * * `gallery_image` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. - * * `gallery_resource_group_name` - (Required) The resource group name for gallery image. - * * `gallery_name` - (Required) Name of the gallery. - * * `image_name` - (Required) Name of the gallery image. - * * `version_name` - (Required) Image's version. Can be in the format x.x.x or 'latest'. - * * `custom_image` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. - * * `custom_image_resource_group_name` - (Required) The resource group name for custom image. - * * `name` - (Required) The name of the custom image. - * - * <a id="load balancer"></a> - * ## Load Balancer - * - * * `load_balancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. - * * `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. - * * `resource_group_name` - (Required) The Resource Group name of the Load Balancer. - * * `name` - (Required) Name of the Application Gateway/Load Balancer. - * * `sku` - (Optional) - * * if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. - * * If ApplicationGateway then possible values are - * `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. - * * `backend_pool_names` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. - * - * <a id="login"></a> - * ## Login - * - * * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. - * * `user_name` - (Required) username for admin access to VMs. - * * `ssh_public_key` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. - * * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. - * - * <a id="managed_service_identities"></a> - * ## Managed Service Identities - * - * * `managed_service_identities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. - * * `name` - (Required) name of the managed identity. - * * `resource_group_name` - (Required) The Resource Group that the user-assigned managed identity resides in. - * - * <a id="proximity_placement_groups"></a> - * ## Proximity Placement Groups - * - * * `proximity_placement_groups` - (Optional) Defines the proximity placement group in which the VM will be launched. - * * `name` - (Required) name of the proximity placement group. - * * `resource_group_name` - (Required) The Resource Group name of the proximity placement group. - * - * <a id="network"></a> - * ## Network - * - * * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. - * * `network_resource_group_name` - (Required) Vnet Resource Group Name. - * * `virtual_network_name` - (Required) Virtual Network. - * * `network_interface` - (Required) Define a network interface - * * `is_primary` - (Required) Defines whether the network interface is primary or not. - * * `subnet_name` - (Required) Subnet name. - * * `assign_public_ip` - (Optional) Assign public IP. - * * `public_ip_sku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. - * * `network_security_group` - (Optional) Network Security Group. - * * `network_resource_group_name` - (Required) Requires valid security group name. - * * `name` - (Required) Requires valid resource group name. - * * `enable_ip_forwarding` - (Optional) Enable IP Forwarding. - * * `private_ip_addresses` - (Optional) A list with unique items that every item is a valid IP. - * * `additional_ip_configurations` - (Optional) Additional configuration of network interface. - * * `name` - (Required) Configuration name. - * * `private_ip_address_version` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. - * * `public_ips` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. - * * `resource_group_name` - (Required) The resource group of the public ip. - * * `name` - (Required) - The name of the public ip. - * * `application_security_groups` - (Optional) Network Security Group. - * * `resource_group_name` - (Required) Requires valid security group name. - * * `name` - (Required) Requires valid resource group name. - * - * <a id="os_disk"></a> - * ## OS Disk - * - * * `os_disk` - (Optional) Specify OS disk specification other than default. - * * `size_gb` - (Optional, Default `"30"`) The size of the data disk in GB. - * * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. - * - * <a id="secret"></a> - * ## Secret - * - * * `secret` - (Optional) Set of certificates that should be installed on the VM. - * * `source_vault` - (Required) The key vault reference, contains the required certificates. - * * `name` - (Required) The name of the key vault. - * * `resource_group_name` - (Required) The resource group name of the key vault. - * * `vault_certificates` - (Required) The required certificate references. - * * `certificate_url` - (Optional) The URL of the certificate under the key vault. - * * `certificate_store` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. - * * This field is required only when using Windows OS type - * * This field must be ‘null’ when the OS type is Linux - * - * <a id="secutiry"></a> - * ## Security - * - * * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. - * * `secure_boot_enabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. - * * `security_type` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. - * * `vtpm_enabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. - * - * <a id="tag"></a> - * ## Tag - * - * * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. - * * `tag_key` - (Optional) Tag Key for Stateful Node Resources. - * * `tag_value` - (Optional) Tag Value for Stateful Node Resources. - * - * <a id="health"></a> - * ## Health - * - * * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. - * * `health_check_types` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. - * * `unhealthy_duration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. - * * `auto_healing` - (Required) Enable Autohealing of unhealthy VMs. - * * `grace_period` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. - * - * <a id="persistence"></a> - * ## Persistence - * - * * `should_persist_os_disk` - (Required) Should persist os disk. - * * `os_disk_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * * `should_persist_data_disks` - (Required) Should persist data disks. - * * `data_disks_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * * `should_persist_network` - (Required) Should persist network. - * - * <a id="scheduling_tasks"></a> - * ## Scheduling Tasks - * - * * `scheduling_task` - (Optional) Scheduling settings object for stateful node. - * * `is_enabled` - (Required) Is scheduled task enabled for stateful node. - * * `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task - * * `cron_expression` (Required) A expression which describes when to execute the scheduled task (UTC). - * - * <a id="signals"></a> - * ## Signals - * - * * `signal` - (Optional) A signal object defined for the stateful node. - * * `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. - * * `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. - * - * *** - * - * <a id="attach_data_disk"></a> - * ## Attach Data Disk - * - * * `attach_data_disk` - (Optional) Create a new data disk and attach it to the stateful node. - * * `data_disk_name` - (Required) The name of the created data disk. - * * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk will be created. - * * `storage_account_type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * * `size_gb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. - * * `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. - * * `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. - * - * <a id="detach_data_disk"></a> - * ## Detach Data Disk - * - * * `detach_data_disk` - (Optional) Detach a data disk from a stateful node. - * * `data_disk_name` - (Required) The name of the detached data disk. - * * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk exists. - * * `should_deallocate` - (Required) Indicates whether to delete the data disk in addition to detach. - * * `ttl_in_hours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. - * - * <a id="update_state"></a> - * ## Update State - * - * * `update_state` - (Optional) Update the stateful node state. - * * `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. - * - * <a id="import_vm"></a> - * ## Import VM - * - * * `import_vm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. - * * `resource_group_name` - (Required) Name of the Resource Group for Stateful Node. - * * `original_vm_name` - (Required) Azure Import Stateful Node Name. - * * `draining_timeout` - (Optional) Hours to keep resources alive. - * * `resources_retention_time` - (Optional) Hours to keep resources alive. - * - * <a id="delete"></a> - * ## Deallocation Config - * - * * `delete` - (Required) Specify deallocation parameters for stateful node deletion. - * * `should_terminate_vm` - (Required) Indicates whether to delete the stateful node's VM. - * * `network_should_deallocate` - (Required) Indicates whether to delete the stateful node's network resources. - * * `network_ttl_in_hours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. - * * `disk_should_deallocate` - (Required) Indicates whether to delete the stateful node's disk resources. - * * `disk_ttl_in_hours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. - * * `snapshot_should_deallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. - * * `snapshot_ttl_in_hours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. - * * `public_ip_should_deallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. - * * `public_ip_ttl_in_hours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. - * */ @ResourceType(type="spotinst:index/statefulNodeAzure:StatefulNodeAzure") public class StatefulNodeAzure extends com.pulumi.resources.CustomResource { @@ -622,6 +116,12 @@ public Output> image() { public Output>> importVms() { return Codegen.optional(this.importVms); } + @Export(name="licenseType", refs={String.class}, tree="[0]") + private Output licenseType; + + public Output> licenseType() { + return Codegen.optional(this.licenseType); + } @Export(name="loadBalancers", refs={List.class,StatefulNodeAzureLoadBalancer.class}, tree="[0,1]") private Output> loadBalancers; @@ -796,6 +296,12 @@ public Output userData() { public Output> vmName() { return Codegen.optional(this.vmName); } + @Export(name="vmNamePrefix", refs={String.class}, tree="[0]") + private Output vmNamePrefix; + + public Output> vmNamePrefix() { + return Codegen.optional(this.vmNamePrefix); + } @Export(name="zones", refs={List.class,String.class}, tree="[0,1]") private Output> zones; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzureArgs.java b/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzureArgs.java index 7ac651ee..76c92c4e 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzureArgs.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/StatefulNodeAzureArgs.java @@ -124,6 +124,13 @@ public Optional>> importVms() { return Optional.ofNullable(this.importVms); } + @Import(name="licenseType") + private @Nullable Output licenseType; + + public Optional> licenseType() { + return Optional.ofNullable(this.licenseType); + } + @Import(name="loadBalancers") private @Nullable Output> loadBalancers; @@ -327,6 +334,13 @@ public Optional> vmName() { return Optional.ofNullable(this.vmName); } + @Import(name="vmNamePrefix") + private @Nullable Output vmNamePrefix; + + public Optional> vmNamePrefix() { + return Optional.ofNullable(this.vmNamePrefix); + } + @Import(name="zones") private @Nullable Output> zones; @@ -349,6 +363,7 @@ private StatefulNodeAzureArgs(StatefulNodeAzureArgs $) { this.health = $.health; this.image = $.image; this.importVms = $.importVms; + this.licenseType = $.licenseType; this.loadBalancers = $.loadBalancers; this.login = $.login; this.managedServiceIdentities = $.managedServiceIdentities; @@ -378,6 +393,7 @@ private StatefulNodeAzureArgs(StatefulNodeAzureArgs $) { this.updateStates = $.updateStates; this.userData = $.userData; this.vmName = $.vmName; + this.vmNamePrefix = $.vmNamePrefix; this.zones = $.zones; } @@ -535,6 +551,15 @@ public Builder importVms(StatefulNodeAzureImportVmArgs... importVms) { return importVms(List.of(importVms)); } + public Builder licenseType(@Nullable Output licenseType) { + $.licenseType = licenseType; + return this; + } + + public Builder licenseType(String licenseType) { + return licenseType(Output.of(licenseType)); + } + public Builder loadBalancers(@Nullable Output> loadBalancers) { $.loadBalancers = loadBalancers; return this; @@ -840,6 +865,15 @@ public Builder vmName(String vmName) { return vmName(Output.of(vmName)); } + public Builder vmNamePrefix(@Nullable Output vmNamePrefix) { + $.vmNamePrefix = vmNamePrefix; + return this; + } + + public Builder vmNamePrefix(String vmNamePrefix) { + return vmNamePrefix(Output.of(vmNamePrefix)); + } + public Builder zones(@Nullable Output> zones) { $.zones = zones; return this; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureOsDiskArgs.java b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureOsDiskArgs.java index 56f0d511..8f0d7031 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureOsDiskArgs.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureOsDiskArgs.java @@ -17,6 +17,13 @@ public final class StatefulNodeAzureOsDiskArgs extends com.pulumi.resources.Reso public static final StatefulNodeAzureOsDiskArgs Empty = new StatefulNodeAzureOsDiskArgs(); + @Import(name="caching") + private @Nullable Output caching; + + public Optional> caching() { + return Optional.ofNullable(this.caching); + } + @Import(name="sizeGb") private @Nullable Output sizeGb; @@ -34,6 +41,7 @@ public Output type() { private StatefulNodeAzureOsDiskArgs() {} private StatefulNodeAzureOsDiskArgs(StatefulNodeAzureOsDiskArgs $) { + this.caching = $.caching; this.sizeGb = $.sizeGb; this.type = $.type; } @@ -56,6 +64,15 @@ public Builder(StatefulNodeAzureOsDiskArgs defaults) { $ = new StatefulNodeAzureOsDiskArgs(Objects.requireNonNull(defaults)); } + public Builder caching(@Nullable Output caching) { + $.caching = caching; + return this; + } + + public Builder caching(String caching) { + return caching(Output.of(caching)); + } + public Builder sizeGb(@Nullable Output sizeGb) { $.sizeGb = sizeGb; return this; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureState.java b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureState.java index aeb7a896..912c7e7f 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureState.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureState.java @@ -123,6 +123,13 @@ public Optional>> importVms() { return Optional.ofNullable(this.importVms); } + @Import(name="licenseType") + private @Nullable Output licenseType; + + public Optional> licenseType() { + return Optional.ofNullable(this.licenseType); + } + @Import(name="loadBalancers") private @Nullable Output> loadBalancers; @@ -326,6 +333,13 @@ public Optional> vmName() { return Optional.ofNullable(this.vmName); } + @Import(name="vmNamePrefix") + private @Nullable Output vmNamePrefix; + + public Optional> vmNamePrefix() { + return Optional.ofNullable(this.vmNamePrefix); + } + @Import(name="zones") private @Nullable Output> zones; @@ -348,6 +362,7 @@ private StatefulNodeAzureState(StatefulNodeAzureState $) { this.health = $.health; this.image = $.image; this.importVms = $.importVms; + this.licenseType = $.licenseType; this.loadBalancers = $.loadBalancers; this.login = $.login; this.managedServiceIdentities = $.managedServiceIdentities; @@ -377,6 +392,7 @@ private StatefulNodeAzureState(StatefulNodeAzureState $) { this.updateStates = $.updateStates; this.userData = $.userData; this.vmName = $.vmName; + this.vmNamePrefix = $.vmNamePrefix; this.zones = $.zones; } @@ -534,6 +550,15 @@ public Builder importVms(StatefulNodeAzureImportVmArgs... importVms) { return importVms(List.of(importVms)); } + public Builder licenseType(@Nullable Output licenseType) { + $.licenseType = licenseType; + return this; + } + + public Builder licenseType(String licenseType) { + return licenseType(Output.of(licenseType)); + } + public Builder loadBalancers(@Nullable Output> loadBalancers) { $.loadBalancers = loadBalancers; return this; @@ -839,6 +864,15 @@ public Builder vmName(String vmName) { return vmName(Output.of(vmName)); } + public Builder vmNamePrefix(@Nullable Output vmNamePrefix) { + $.vmNamePrefix = vmNamePrefix; + return this; + } + + public Builder vmNamePrefix(String vmNamePrefix) { + return vmNamePrefix(Output.of(vmNamePrefix)); + } + public Builder zones(@Nullable Output> zones) { $.zones = zones; return this; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureStrategyArgs.java b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureStrategyArgs.java index c261a77c..b4d8ec19 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureStrategyArgs.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/inputs/StatefulNodeAzureStrategyArgs.java @@ -21,6 +21,13 @@ public final class StatefulNodeAzureStrategyArgs extends com.pulumi.resources.Re public static final StatefulNodeAzureStrategyArgs Empty = new StatefulNodeAzureStrategyArgs(); + @Import(name="availabilityVsCost") + private @Nullable Output availabilityVsCost; + + public Optional> availabilityVsCost() { + return Optional.ofNullable(this.availabilityVsCost); + } + @Import(name="capacityReservations") private @Nullable Output> capacityReservations; @@ -42,6 +49,13 @@ public Output fallbackToOnDemand() { return this.fallbackToOnDemand; } + @Import(name="odWindows") + private @Nullable Output> odWindows; + + public Optional>> odWindows() { + return Optional.ofNullable(this.odWindows); + } + @Import(name="optimizationWindows") private @Nullable Output> optimizationWindows; @@ -66,9 +80,11 @@ public Optional> revertToSpot( private StatefulNodeAzureStrategyArgs() {} private StatefulNodeAzureStrategyArgs(StatefulNodeAzureStrategyArgs $) { + this.availabilityVsCost = $.availabilityVsCost; this.capacityReservations = $.capacityReservations; this.drainingTimeout = $.drainingTimeout; this.fallbackToOnDemand = $.fallbackToOnDemand; + this.odWindows = $.odWindows; this.optimizationWindows = $.optimizationWindows; this.preferredLifeCycle = $.preferredLifeCycle; this.revertToSpot = $.revertToSpot; @@ -92,6 +108,15 @@ public Builder(StatefulNodeAzureStrategyArgs defaults) { $ = new StatefulNodeAzureStrategyArgs(Objects.requireNonNull(defaults)); } + public Builder availabilityVsCost(@Nullable Output availabilityVsCost) { + $.availabilityVsCost = availabilityVsCost; + return this; + } + + public Builder availabilityVsCost(Integer availabilityVsCost) { + return availabilityVsCost(Output.of(availabilityVsCost)); + } + public Builder capacityReservations(@Nullable Output> capacityReservations) { $.capacityReservations = capacityReservations; return this; @@ -123,6 +148,19 @@ public Builder fallbackToOnDemand(Boolean fallbackToOnDemand) { return fallbackToOnDemand(Output.of(fallbackToOnDemand)); } + public Builder odWindows(@Nullable Output> odWindows) { + $.odWindows = odWindows; + return this; + } + + public Builder odWindows(List odWindows) { + return odWindows(Output.of(odWindows)); + } + + public Builder odWindows(String... odWindows) { + return odWindows(List.of(odWindows)); + } + public Builder optimizationWindows(@Nullable Output> optimizationWindows) { $.optimizationWindows = optimizationWindows; return this; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureOsDisk.java b/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureOsDisk.java index d1eb82ff..b4028129 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureOsDisk.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureOsDisk.java @@ -13,10 +13,14 @@ @CustomType public final class StatefulNodeAzureOsDisk { + private @Nullable String caching; private @Nullable Integer sizeGb; private String type; private StatefulNodeAzureOsDisk() {} + public Optional caching() { + return Optional.ofNullable(this.caching); + } public Optional sizeGb() { return Optional.ofNullable(this.sizeGb); } @@ -33,15 +37,23 @@ public static Builder builder(StatefulNodeAzureOsDisk defaults) { } @CustomType.Builder public static final class Builder { + private @Nullable String caching; private @Nullable Integer sizeGb; private String type; public Builder() {} public Builder(StatefulNodeAzureOsDisk defaults) { Objects.requireNonNull(defaults); + this.caching = defaults.caching; this.sizeGb = defaults.sizeGb; this.type = defaults.type; } + @CustomType.Setter + public Builder caching(@Nullable String caching) { + + this.caching = caching; + return this; + } @CustomType.Setter public Builder sizeGb(@Nullable Integer sizeGb) { @@ -58,6 +70,7 @@ public Builder type(String type) { } public StatefulNodeAzureOsDisk build() { final var _resultValue = new StatefulNodeAzureOsDisk(); + _resultValue.caching = caching; _resultValue.sizeGb = sizeGb; _resultValue.type = type; return _resultValue; diff --git a/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureStrategy.java b/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureStrategy.java index 07bc5497..79709781 100644 --- a/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureStrategy.java +++ b/sdk/java/src/main/java/com/pulumi/spotinst/outputs/StatefulNodeAzureStrategy.java @@ -17,14 +17,19 @@ @CustomType public final class StatefulNodeAzureStrategy { + private @Nullable Integer availabilityVsCost; private @Nullable List capacityReservations; private @Nullable Integer drainingTimeout; private Boolean fallbackToOnDemand; + private @Nullable List odWindows; private @Nullable List optimizationWindows; private @Nullable String preferredLifeCycle; private @Nullable StatefulNodeAzureStrategyRevertToSpot revertToSpot; private StatefulNodeAzureStrategy() {} + public Optional availabilityVsCost() { + return Optional.ofNullable(this.availabilityVsCost); + } public List capacityReservations() { return this.capacityReservations == null ? List.of() : this.capacityReservations; } @@ -34,6 +39,9 @@ public Optional drainingTimeout() { public Boolean fallbackToOnDemand() { return this.fallbackToOnDemand; } + public List odWindows() { + return this.odWindows == null ? List.of() : this.odWindows; + } public List optimizationWindows() { return this.optimizationWindows == null ? List.of() : this.optimizationWindows; } @@ -53,23 +61,33 @@ public static Builder builder(StatefulNodeAzureStrategy defaults) { } @CustomType.Builder public static final class Builder { + private @Nullable Integer availabilityVsCost; private @Nullable List capacityReservations; private @Nullable Integer drainingTimeout; private Boolean fallbackToOnDemand; + private @Nullable List odWindows; private @Nullable List optimizationWindows; private @Nullable String preferredLifeCycle; private @Nullable StatefulNodeAzureStrategyRevertToSpot revertToSpot; public Builder() {} public Builder(StatefulNodeAzureStrategy defaults) { Objects.requireNonNull(defaults); + this.availabilityVsCost = defaults.availabilityVsCost; this.capacityReservations = defaults.capacityReservations; this.drainingTimeout = defaults.drainingTimeout; this.fallbackToOnDemand = defaults.fallbackToOnDemand; + this.odWindows = defaults.odWindows; this.optimizationWindows = defaults.optimizationWindows; this.preferredLifeCycle = defaults.preferredLifeCycle; this.revertToSpot = defaults.revertToSpot; } + @CustomType.Setter + public Builder availabilityVsCost(@Nullable Integer availabilityVsCost) { + + this.availabilityVsCost = availabilityVsCost; + return this; + } @CustomType.Setter public Builder capacityReservations(@Nullable List capacityReservations) { @@ -94,6 +112,15 @@ public Builder fallbackToOnDemand(Boolean fallbackToOnDemand) { return this; } @CustomType.Setter + public Builder odWindows(@Nullable List odWindows) { + + this.odWindows = odWindows; + return this; + } + public Builder odWindows(String... odWindows) { + return odWindows(List.of(odWindows)); + } + @CustomType.Setter public Builder optimizationWindows(@Nullable List optimizationWindows) { this.optimizationWindows = optimizationWindows; @@ -116,9 +143,11 @@ public Builder revertToSpot(@Nullable StatefulNodeAzureStrategyRevertToSpot reve } public StatefulNodeAzureStrategy build() { final var _resultValue = new StatefulNodeAzureStrategy(); + _resultValue.availabilityVsCost = availabilityVsCost; _resultValue.capacityReservations = capacityReservations; _resultValue.drainingTimeout = drainingTimeout; _resultValue.fallbackToOnDemand = fallbackToOnDemand; + _resultValue.odWindows = odWindows; _resultValue.optimizationWindows = optimizationWindows; _resultValue.preferredLifeCycle = preferredLifeCycle; _resultValue.revertToSpot = revertToSpot; diff --git a/sdk/nodejs/statefulNodeAzure.ts b/sdk/nodejs/statefulNodeAzure.ts index 17685bf3..9c8b972c 100644 --- a/sdk/nodejs/statefulNodeAzure.ts +++ b/sdk/nodejs/statefulNodeAzure.ts @@ -8,483 +8,6 @@ import * as utilities from "./utilities"; /** * Provides a Spotinst stateful node Azure resource. - * - * ## Example Usage - * - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as spotinst from "@pulumi/spotinst"; - * - * const testStatefulNodeAzure = new spotinst.StatefulNodeAzure("testStatefulNodeAzure", { - * region: "eastus", - * resourceGroupName: "spotinst-azure", - * description: "example_stateful_node_azure_description", - * strategy: { - * drainingTimeout: 30, - * fallbackToOnDemand: true, - * optimizationWindows: ["Tue:19:46-Tue:20:46"], - * revertToSpot: { - * performAt: "timeWindow", - * }, - * preferredLifeCycle: "od", - * capacityReservations: [{ - * shouldUtilize: true, - * utilizationStrategy: "utilizeOverOD", - * capacityReservationGroups: [{ - * crgName: "crg name", - * crgResourceGroupName: "resourceGroupName", - * crgShouldPrioritize: true, - * }], - * }], - * }, - * os: "Linux", - * odSizes: [ - * "standard_ds1_v2", - * "standard_ds2_v2", - * ], - * spotSizes: [ - * "standard_ds1_v2", - * "standard_ds2_v2", - * ], - * preferredSpotSizes: ["standard_ds1_v2"], - * zones: [ - * "1", - * "3", - * ], - * preferredZone: "1", - * customData: "", - * shutdownScript: "", - * userData: "", - * vmName: "VMName", - * bootDiagnostics: [{ - * isEnabled: true, - * storageUrl: "https://.blob.core.windows.net/test", - * type: "unmanaged", - * }], - * dataDisks: [ - * { - * sizeGb: 1, - * lun: 1, - * type: "Standard_LRS", - * }, - * { - * sizeGb: 10, - * lun: 2, - * type: "Standard_LRS", - * }, - * ], - * extensions: [{ - * name: "extensionName", - * type: "customScript", - * publisher: "Microsoft.Azure.Extensions", - * apiVersion: "2.0", - * minorVersionAutoUpgrade: true, - * protectedSettings: { - * script: "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==", - * }, - * }], - * image: { - * marketplaceImages: [{ - * publisher: "Canonical", - * offer: "UbuntuServer", - * sku: "16.04-LTS", - * version: "latest", - * }], - * }, - * loadBalancers: [{ - * type: "loadBalancer", - * resourceGroupName: "testResourceGroup", - * name: "testLoadBalancer", - * sku: "Standard", - * backendPoolNames: [ - * "testBackendPool1", - * "testBackendPool2", - * ], - * }], - * login: { - * userName: "admin", - * sshPublicKey: "33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==", - * }, - * managedServiceIdentities: [{ - * name: "mySI2", - * resourceGroupName: "myResourceGroup", - * }], - * network: { - * networkResourceGroupName: "subnetResourceGroup", - * virtualNetworkName: "vname", - * networkInterfaces: [{ - * isPrimary: true, - * subnetName: "testSubnet", - * assignPublicIp: true, - * publicIpSku: "Standard", - * networkSecurityGroups: [{ - * networkResourceGroupName: "test", - * name: "test", - * }], - * enableIpForwarding: true, - * privateIpAddresses: ["172.23.4.20"], - * additionalIpConfigurations: [{ - * name: "test", - * privateIpAddressVersion: "IPv4", - * }], - * publicIps: [{ - * networkResourceGroupName: "resourceGroup", - * name: "test", - * }], - * applicationSecurityGroups: [{ - * networkResourceGroupName: "AsgResourceGroup", - * name: "AsgName", - * }], - * }], - * }, - * osDisk: { - * sizeGb: 30, - * type: "Standard_LRS", - * }, - * secrets: [{ - * sourceVaults: [{ - * name: "string", - * resourceGroupName: "string", - * }], - * vaultCertificates: [{ - * certificateUrl: "string", - * certificateStore: "string", - * }], - * }], - * security: { - * securityType: "Standard", - * secureBootEnabled: false, - * vtpmEnabled: false, - * }, - * tags: [{ - * tagKey: "Creator", - * tagValue: "string", - * }], - * health: { - * healthCheckTypes: ["vmState"], - * unhealthyDuration: 300, - * gracePeriod: 120, - * autoHealing: true, - * }, - * shouldPersistOsDisk: false, - * osDiskPersistenceMode: "reattach", - * shouldPersistDataDisks: true, - * dataDisksPersistenceMode: "reattach", - * shouldPersistNetwork: true, - * schedulingTasks: [ - * { - * isEnabled: true, - * type: "pause", - * cronExpression: "44 10 * * *", - * }, - * { - * isEnabled: true, - * type: "resume", - * cronExpression: "48 10 * * *", - * }, - * { - * isEnabled: true, - * type: "recycle", - * cronExpression: "52 10 * * *", - * }, - * ], - * signals: [ - * { - * type: "vmReady", - * timeout: 20, - * }, - * { - * type: "vmReady", - * timeout: 40, - * }, - * ], - * proximityPlacementGroups: [{ - * name: "TestPPG", - * resourceGroupName: "TestResourceGroup", - * }], - * deletes: [{ - * shouldTerminateVm: true, - * networkShouldDeallocate: true, - * networkTtlInHours: 0, - * diskShouldDeallocate: true, - * diskTtlInHours: 0, - * snapshotShouldDeallocate: true, - * snapshotTtlInHours: 0, - * publicIpShouldDeallocate: true, - * publicIpTtlInHours: 0, - * }], - * }); - * // ------------------------------------------------------------------- - * ``` - * - * - * # Argument Reference - * - * The following arguments are supported: - * - * * `name` - (Required) Azure stateful node name. - * * `region` - (Required) The Azure region your stateful node will be created in. - * * `resourceGroupName` - (Required) Name of the Resource Group for stateful node. - * * `description` - (Optional) Describe your Azure stateful node. - * - * - * ## Strategy - * - * * `strategy` - (Required) Strategy for stateful node. - * * `drainingTimeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. - * * `fallbackToOnDemand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. - * * `optimizationWindows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. - * * `preferredLifeCycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. - * * `revertToSpot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. - * * `performAt` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. - * * `capacityReservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) - * * `shouldUtilize` - (Required) Determines whether capacity reservations should be utilized. - * * `utilizationStrategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) - * * `capacityReservationGroups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. - * * `crgName` - (Required) The name of the CRG. - * * `crgResourceGroupName` - (Required) Azure resource group name - * * `crgShouldPrioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. - * - * - * ## Compute - * - * * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. - * * `odSizes` - (Required) Available On-Demand sizes. - * * `spotSizes` - (Required) Available Spot-VM sizes. - * * `preferredSpotSizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. - * * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. - * * `preferredZone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. - * * `customData` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. - * * `shutdownScript` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. - * * `userData` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) - * * `vmName` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. - * - * - * ## Boot Diagnostics - * - * * `bootDiagnostics` - * * `isEnabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. - * * `storageUrl` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. - * * `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. - * - * - * ## Data Disks - * - * * `dataDisk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. - * * `sizeGb` - (Required) The size of the data disk in GB, required if dataDisks is specified. - * * `lun` - (Required) The LUN of the data disk. - * * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * - * - * ## Extensions - * - * * `extension` - (Optional) An object for an azure extension. - * * `name` - (Required) Required on compute.launchSpecification.extensions object. - * * `type` - (Required) Required on compute.launchSpecification.extensions object. - * * `publisher` - (Required) Required on compute.launchSpecification.extensions object. - * * `apiVersion` - (Required) The API version of the extension. Required if extension specified. - * * `minorVersionAutoUpgrade` - (Required) Required on compute.launchSpecification.extensions object. - * * `protectedSettings` - (Optional) Object for protected settings. - * * `publicSettings` - (Optional) Object for public settings. - * - * - * ## Image - * - * * `image` - * * `marketplaceImage` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. - * * `publisher` - (Required) Image publisher. - * * `offer` - (Required) Image offer. - * * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. - * * `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". - * * `galleryImage` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. - * * `galleryResourceGroupName` - (Required) The resource group name for gallery image. - * * `galleryName` - (Required) Name of the gallery. - * * `imageName` - (Required) Name of the gallery image. - * * `versionName` - (Required) Image's version. Can be in the format x.x.x or 'latest'. - * * `customImage` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. - * * `customImageResourceGroupName` - (Required) The resource group name for custom image. - * * `name` - (Required) The name of the custom image. - * - * - * ## Load Balancer - * - * * `loadBalancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. - * * `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. - * * `resourceGroupName` - (Required) The Resource Group name of the Load Balancer. - * * `name` - (Required) Name of the Application Gateway/Load Balancer. - * * `sku` - (Optional) - * * if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. - * * If ApplicationGateway then possible values are - * `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. - * * `backendPoolNames` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. - * - * - * ## Login - * - * * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. - * * `userName` - (Required) username for admin access to VMs. - * * `sshPublicKey` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. - * * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. - * - * - * ## Managed Service Identities - * - * * `managedServiceIdentities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. - * * `name` - (Required) name of the managed identity. - * * `resourceGroupName` - (Required) The Resource Group that the user-assigned managed identity resides in. - * - * - * ## Proximity Placement Groups - * - * * `proximityPlacementGroups` - (Optional) Defines the proximity placement group in which the VM will be launched. - * * `name` - (Required) name of the proximity placement group. - * * `resourceGroupName` - (Required) The Resource Group name of the proximity placement group. - * - * - * ## Network - * - * * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. - * * `networkResourceGroupName` - (Required) Vnet Resource Group Name. - * * `virtualNetworkName` - (Required) Virtual Network. - * * `networkInterface` - (Required) Define a network interface - * * `isPrimary` - (Required) Defines whether the network interface is primary or not. - * * `subnetName` - (Required) Subnet name. - * * `assignPublicIp` - (Optional) Assign public IP. - * * `publicIpSku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. - * * `networkSecurityGroup` - (Optional) Network Security Group. - * * `networkResourceGroupName` - (Required) Requires valid security group name. - * * `name` - (Required) Requires valid resource group name. - * * `enableIpForwarding` - (Optional) Enable IP Forwarding. - * * `privateIpAddresses` - (Optional) A list with unique items that every item is a valid IP. - * * `additionalIpConfigurations` - (Optional) Additional configuration of network interface. - * * `name` - (Required) Configuration name. - * * `privateIpAddressVersion` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. - * * `publicIps` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. - * * `resourceGroupName` - (Required) The resource group of the public ip. - * * `name` - (Required) - The name of the public ip. - * * `applicationSecurityGroups` - (Optional) Network Security Group. - * * `resourceGroupName` - (Required) Requires valid security group name. - * * `name` - (Required) Requires valid resource group name. - * - * - * ## OS Disk - * - * * `osDisk` - (Optional) Specify OS disk specification other than default. - * * `sizeGb` - (Optional, Default `"30"`) The size of the data disk in GB. - * * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. - * - * - * ## Secret - * - * * `secret` - (Optional) Set of certificates that should be installed on the VM. - * * `sourceVault` - (Required) The key vault reference, contains the required certificates. - * * `name` - (Required) The name of the key vault. - * * `resourceGroupName` - (Required) The resource group name of the key vault. - * * `vaultCertificates` - (Required) The required certificate references. - * * `certificateUrl` - (Optional) The URL of the certificate under the key vault. - * * `certificateStore` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. - * * This field is required only when using Windows OS type - * * This field must be ‘null’ when the OS type is Linux - * - * - * ## Security - * - * * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. - * * `secureBootEnabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. - * * `securityType` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. - * * `vtpmEnabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. - * - * - * ## Tag - * - * * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. - * * `tagKey` - (Optional) Tag Key for Stateful Node Resources. - * * `tagValue` - (Optional) Tag Value for Stateful Node Resources. - * - * - * ## Health - * - * * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. - * * `healthCheckTypes` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. - * * `unhealthyDuration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. - * * `autoHealing` - (Required) Enable Autohealing of unhealthy VMs. - * * `gracePeriod` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. - * - * - * ## Persistence - * - * * `shouldPersistOsDisk` - (Required) Should persist os disk. - * * `osDiskPersistenceMode` - (Optional, Enum `"reattach", "onLaunch"`) - * * `shouldPersistDataDisks` - (Required) Should persist data disks. - * * `dataDisksPersistenceMode` - (Optional, Enum `"reattach", "onLaunch"`) - * * `shouldPersistNetwork` - (Required) Should persist network. - * - * - * ## Scheduling Tasks - * - * * `schedulingTask` - (Optional) Scheduling settings object for stateful node. - * * `isEnabled` - (Required) Is scheduled task enabled for stateful node. - * * `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task - * * `cronExpression` (Required) A expression which describes when to execute the scheduled task (UTC). - * - * - * ## Signals - * - * * `signal` - (Optional) A signal object defined for the stateful node. - * * `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. - * * `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. - * - * *** - * - * - * ## Attach Data Disk - * - * * `attachDataDisk` - (Optional) Create a new data disk and attach it to the stateful node. - * * `dataDiskName` - (Required) The name of the created data disk. - * * `dataDiskResourceGroupName` - (Required) The resource group name in which the data disk will be created. - * * `storageAccountType` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * * `sizeGb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. - * * `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. - * * `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. - * - * - * ## Detach Data Disk - * - * * `detachDataDisk` - (Optional) Detach a data disk from a stateful node. - * * `dataDiskName` - (Required) The name of the detached data disk. - * * `dataDiskResourceGroupName` - (Required) The resource group name in which the data disk exists. - * * `shouldDeallocate` - (Required) Indicates whether to delete the data disk in addition to detach. - * * `ttlInHours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. - * - * - * ## Update State - * - * * `updateState` - (Optional) Update the stateful node state. - * * `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. - * - * - * ## Import VM - * - * * `importVm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. - * * `resourceGroupName` - (Required) Name of the Resource Group for Stateful Node. - * * `originalVmName` - (Required) Azure Import Stateful Node Name. - * * `drainingTimeout` - (Optional) Hours to keep resources alive. - * * `resourcesRetentionTime` - (Optional) Hours to keep resources alive. - * - * - * ## Deallocation Config - * - * * `delete` - (Required) Specify deallocation parameters for stateful node deletion. - * * `shouldTerminateVm` - (Required) Indicates whether to delete the stateful node's VM. - * * `networkShouldDeallocate` - (Required) Indicates whether to delete the stateful node's network resources. - * * `networkTtlInHours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. - * * `diskShouldDeallocate` - (Required) Indicates whether to delete the stateful node's disk resources. - * * `diskTtlInHours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. - * * `snapshotShouldDeallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. - * * `snapshotTtlInHours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. - * * `publicIpShouldDeallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. - * * `publicIpTtlInHours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. */ export class StatefulNodeAzure extends pulumi.CustomResource { /** @@ -526,6 +49,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { public readonly health!: pulumi.Output; public readonly image!: pulumi.Output; public readonly importVms!: pulumi.Output; + public readonly licenseType!: pulumi.Output; public readonly loadBalancers!: pulumi.Output; public readonly login!: pulumi.Output; public readonly managedServiceIdentities!: pulumi.Output; @@ -555,6 +79,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { public readonly updateStates!: pulumi.Output; public readonly userData!: pulumi.Output; public readonly vmName!: pulumi.Output; + public readonly vmNamePrefix!: pulumi.Output; public readonly zones!: pulumi.Output; /** @@ -582,6 +107,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { resourceInputs["health"] = state ? state.health : undefined; resourceInputs["image"] = state ? state.image : undefined; resourceInputs["importVms"] = state ? state.importVms : undefined; + resourceInputs["licenseType"] = state ? state.licenseType : undefined; resourceInputs["loadBalancers"] = state ? state.loadBalancers : undefined; resourceInputs["login"] = state ? state.login : undefined; resourceInputs["managedServiceIdentities"] = state ? state.managedServiceIdentities : undefined; @@ -611,6 +137,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { resourceInputs["updateStates"] = state ? state.updateStates : undefined; resourceInputs["userData"] = state ? state.userData : undefined; resourceInputs["vmName"] = state ? state.vmName : undefined; + resourceInputs["vmNamePrefix"] = state ? state.vmNamePrefix : undefined; resourceInputs["zones"] = state ? state.zones : undefined; } else { const args = argsOrState as StatefulNodeAzureArgs | undefined; @@ -653,6 +180,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { resourceInputs["health"] = args ? args.health : undefined; resourceInputs["image"] = args ? args.image : undefined; resourceInputs["importVms"] = args ? args.importVms : undefined; + resourceInputs["licenseType"] = args ? args.licenseType : undefined; resourceInputs["loadBalancers"] = args ? args.loadBalancers : undefined; resourceInputs["login"] = args ? args.login : undefined; resourceInputs["managedServiceIdentities"] = args ? args.managedServiceIdentities : undefined; @@ -682,6 +210,7 @@ export class StatefulNodeAzure extends pulumi.CustomResource { resourceInputs["updateStates"] = args ? args.updateStates : undefined; resourceInputs["userData"] = args ? args.userData : undefined; resourceInputs["vmName"] = args ? args.vmName : undefined; + resourceInputs["vmNamePrefix"] = args ? args.vmNamePrefix : undefined; resourceInputs["zones"] = args ? args.zones : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); @@ -705,6 +234,7 @@ export interface StatefulNodeAzureState { health?: pulumi.Input; image?: pulumi.Input; importVms?: pulumi.Input[]>; + licenseType?: pulumi.Input; loadBalancers?: pulumi.Input[]>; login?: pulumi.Input; managedServiceIdentities?: pulumi.Input[]>; @@ -734,6 +264,7 @@ export interface StatefulNodeAzureState { updateStates?: pulumi.Input[]>; userData?: pulumi.Input; vmName?: pulumi.Input; + vmNamePrefix?: pulumi.Input; zones?: pulumi.Input[]>; } @@ -753,6 +284,7 @@ export interface StatefulNodeAzureArgs { health?: pulumi.Input; image?: pulumi.Input; importVms?: pulumi.Input[]>; + licenseType?: pulumi.Input; loadBalancers?: pulumi.Input[]>; login?: pulumi.Input; managedServiceIdentities?: pulumi.Input[]>; @@ -782,5 +314,6 @@ export interface StatefulNodeAzureArgs { updateStates?: pulumi.Input[]>; userData?: pulumi.Input; vmName?: pulumi.Input; + vmNamePrefix?: pulumi.Input; zones?: pulumi.Input[]>; } diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts index 42ede3f3..f6783236 100644 --- a/sdk/nodejs/types/input.ts +++ b/sdk/nodejs/types/input.ts @@ -251,6 +251,7 @@ export interface StatefulNodeAzureNetworkNetworkInterfacePublicIp { } export interface StatefulNodeAzureOsDisk { + caching?: pulumi.Input; sizeGb?: pulumi.Input; type: pulumi.Input; } @@ -293,9 +294,11 @@ export interface StatefulNodeAzureSignal { } export interface StatefulNodeAzureStrategy { + availabilityVsCost?: pulumi.Input; capacityReservations?: pulumi.Input[]>; drainingTimeout?: pulumi.Input; fallbackToOnDemand: pulumi.Input; + odWindows?: pulumi.Input[]>; optimizationWindows?: pulumi.Input[]>; preferredLifeCycle?: pulumi.Input; revertToSpot?: pulumi.Input; diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts index 893e3c43..f8343280 100644 --- a/sdk/nodejs/types/output.ts +++ b/sdk/nodejs/types/output.ts @@ -251,6 +251,7 @@ export interface StatefulNodeAzureNetworkNetworkInterfacePublicIp { } export interface StatefulNodeAzureOsDisk { + caching?: string; sizeGb?: number; type: string; } @@ -293,9 +294,11 @@ export interface StatefulNodeAzureSignal { } export interface StatefulNodeAzureStrategy { + availabilityVsCost?: number; capacityReservations?: outputs.StatefulNodeAzureStrategyCapacityReservation[]; drainingTimeout: number; fallbackToOnDemand: boolean; + odWindows?: string[]; optimizationWindows?: string[]; preferredLifeCycle: string; revertToSpot: outputs.StatefulNodeAzureStrategyRevertToSpot; diff --git a/sdk/python/pulumi_spotinst/_inputs.py b/sdk/python/pulumi_spotinst/_inputs.py index 3ca01248..615e391f 100644 --- a/sdk/python/pulumi_spotinst/_inputs.py +++ b/sdk/python/pulumi_spotinst/_inputs.py @@ -1650,8 +1650,11 @@ def network_resource_group_name(self, value: pulumi.Input[str]): class StatefulNodeAzureOsDiskArgs: def __init__(__self__, *, type: pulumi.Input[str], + caching: Optional[pulumi.Input[str]] = None, size_gb: Optional[pulumi.Input[int]] = None): pulumi.set(__self__, "type", type) + if caching is not None: + pulumi.set(__self__, "caching", caching) if size_gb is not None: pulumi.set(__self__, "size_gb", size_gb) @@ -1664,6 +1667,15 @@ def type(self) -> pulumi.Input[str]: def type(self, value: pulumi.Input[str]): pulumi.set(self, "type", value) + @property + @pulumi.getter + def caching(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "caching") + + @caching.setter + def caching(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "caching", value) + @property @pulumi.getter(name="sizeGb") def size_gb(self) -> Optional[pulumi.Input[int]]: @@ -1894,16 +1906,22 @@ def type(self, value: pulumi.Input[str]): class StatefulNodeAzureStrategyArgs: def __init__(__self__, *, fallback_to_on_demand: pulumi.Input[bool], + availability_vs_cost: Optional[pulumi.Input[int]] = None, capacity_reservations: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureStrategyCapacityReservationArgs']]]] = None, draining_timeout: Optional[pulumi.Input[int]] = None, + od_windows: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, optimization_windows: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, preferred_life_cycle: Optional[pulumi.Input[str]] = None, revert_to_spot: Optional[pulumi.Input['StatefulNodeAzureStrategyRevertToSpotArgs']] = None): pulumi.set(__self__, "fallback_to_on_demand", fallback_to_on_demand) + if availability_vs_cost is not None: + pulumi.set(__self__, "availability_vs_cost", availability_vs_cost) if capacity_reservations is not None: pulumi.set(__self__, "capacity_reservations", capacity_reservations) if draining_timeout is not None: pulumi.set(__self__, "draining_timeout", draining_timeout) + if od_windows is not None: + pulumi.set(__self__, "od_windows", od_windows) if optimization_windows is not None: pulumi.set(__self__, "optimization_windows", optimization_windows) if preferred_life_cycle is not None: @@ -1920,6 +1938,15 @@ def fallback_to_on_demand(self) -> pulumi.Input[bool]: def fallback_to_on_demand(self, value: pulumi.Input[bool]): pulumi.set(self, "fallback_to_on_demand", value) + @property + @pulumi.getter(name="availabilityVsCost") + def availability_vs_cost(self) -> Optional[pulumi.Input[int]]: + return pulumi.get(self, "availability_vs_cost") + + @availability_vs_cost.setter + def availability_vs_cost(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "availability_vs_cost", value) + @property @pulumi.getter(name="capacityReservations") def capacity_reservations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureStrategyCapacityReservationArgs']]]]: @@ -1938,6 +1965,15 @@ def draining_timeout(self) -> Optional[pulumi.Input[int]]: def draining_timeout(self, value: Optional[pulumi.Input[int]]): pulumi.set(self, "draining_timeout", value) + @property + @pulumi.getter(name="odWindows") + def od_windows(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + return pulumi.get(self, "od_windows") + + @od_windows.setter + def od_windows(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "od_windows", value) + @property @pulumi.getter(name="optimizationWindows") def optimization_windows(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: diff --git a/sdk/python/pulumi_spotinst/outputs.py b/sdk/python/pulumi_spotinst/outputs.py index 8a2aaaa0..e14fb998 100644 --- a/sdk/python/pulumi_spotinst/outputs.py +++ b/sdk/python/pulumi_spotinst/outputs.py @@ -1773,8 +1773,11 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, type: str, + caching: Optional[str] = None, size_gb: Optional[int] = None): pulumi.set(__self__, "type", type) + if caching is not None: + pulumi.set(__self__, "caching", caching) if size_gb is not None: pulumi.set(__self__, "size_gb", size_gb) @@ -1783,6 +1786,11 @@ def __init__(__self__, *, def type(self) -> str: return pulumi.get(self, "type") + @property + @pulumi.getter + def caching(self) -> Optional[str]: + return pulumi.get(self, "caching") + @property @pulumi.getter(name="sizeGb") def size_gb(self) -> Optional[int]: @@ -2060,10 +2068,14 @@ def __key_warning(key: str): suggest = None if key == "fallbackToOnDemand": suggest = "fallback_to_on_demand" + elif key == "availabilityVsCost": + suggest = "availability_vs_cost" elif key == "capacityReservations": suggest = "capacity_reservations" elif key == "drainingTimeout": suggest = "draining_timeout" + elif key == "odWindows": + suggest = "od_windows" elif key == "optimizationWindows": suggest = "optimization_windows" elif key == "preferredLifeCycle": @@ -2084,16 +2096,22 @@ def get(self, key: str, default = None) -> Any: def __init__(__self__, *, fallback_to_on_demand: bool, + availability_vs_cost: Optional[int] = None, capacity_reservations: Optional[Sequence['outputs.StatefulNodeAzureStrategyCapacityReservation']] = None, draining_timeout: Optional[int] = None, + od_windows: Optional[Sequence[str]] = None, optimization_windows: Optional[Sequence[str]] = None, preferred_life_cycle: Optional[str] = None, revert_to_spot: Optional['outputs.StatefulNodeAzureStrategyRevertToSpot'] = None): pulumi.set(__self__, "fallback_to_on_demand", fallback_to_on_demand) + if availability_vs_cost is not None: + pulumi.set(__self__, "availability_vs_cost", availability_vs_cost) if capacity_reservations is not None: pulumi.set(__self__, "capacity_reservations", capacity_reservations) if draining_timeout is not None: pulumi.set(__self__, "draining_timeout", draining_timeout) + if od_windows is not None: + pulumi.set(__self__, "od_windows", od_windows) if optimization_windows is not None: pulumi.set(__self__, "optimization_windows", optimization_windows) if preferred_life_cycle is not None: @@ -2106,6 +2124,11 @@ def __init__(__self__, *, def fallback_to_on_demand(self) -> bool: return pulumi.get(self, "fallback_to_on_demand") + @property + @pulumi.getter(name="availabilityVsCost") + def availability_vs_cost(self) -> Optional[int]: + return pulumi.get(self, "availability_vs_cost") + @property @pulumi.getter(name="capacityReservations") def capacity_reservations(self) -> Optional[Sequence['outputs.StatefulNodeAzureStrategyCapacityReservation']]: @@ -2116,6 +2139,11 @@ def capacity_reservations(self) -> Optional[Sequence['outputs.StatefulNodeAzureS def draining_timeout(self) -> Optional[int]: return pulumi.get(self, "draining_timeout") + @property + @pulumi.getter(name="odWindows") + def od_windows(self) -> Optional[Sequence[str]]: + return pulumi.get(self, "od_windows") + @property @pulumi.getter(name="optimizationWindows") def optimization_windows(self) -> Optional[Sequence[str]]: diff --git a/sdk/python/pulumi_spotinst/stateful_node_azure.py b/sdk/python/pulumi_spotinst/stateful_node_azure.py index ebe57013..fcc915c5 100644 --- a/sdk/python/pulumi_spotinst/stateful_node_azure.py +++ b/sdk/python/pulumi_spotinst/stateful_node_azure.py @@ -37,6 +37,7 @@ def __init__(__self__, *, health: Optional[pulumi.Input['StatefulNodeAzureHealthArgs']] = None, image: Optional[pulumi.Input['StatefulNodeAzureImageArgs']] = None, import_vms: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureImportVmArgs']]]] = None, + license_type: Optional[pulumi.Input[str]] = None, load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureLoadBalancerArgs']]]] = None, login: Optional[pulumi.Input['StatefulNodeAzureLoginArgs']] = None, managed_service_identities: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureManagedServiceIdentityArgs']]]] = None, @@ -57,6 +58,7 @@ def __init__(__self__, *, update_states: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureUpdateStateArgs']]]] = None, user_data: Optional[pulumi.Input[str]] = None, vm_name: Optional[pulumi.Input[str]] = None, + vm_name_prefix: Optional[pulumi.Input[str]] = None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ The set of arguments for constructing a StatefulNodeAzure resource. @@ -94,6 +96,8 @@ def __init__(__self__, *, pulumi.set(__self__, "image", image) if import_vms is not None: pulumi.set(__self__, "import_vms", import_vms) + if license_type is not None: + pulumi.set(__self__, "license_type", license_type) if load_balancers is not None: pulumi.set(__self__, "load_balancers", load_balancers) if login is not None: @@ -134,6 +138,8 @@ def __init__(__self__, *, pulumi.set(__self__, "user_data", user_data) if vm_name is not None: pulumi.set(__self__, "vm_name", vm_name) + if vm_name_prefix is not None: + pulumi.set(__self__, "vm_name_prefix", vm_name_prefix) if zones is not None: pulumi.set(__self__, "zones", zones) @@ -326,6 +332,15 @@ def import_vms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNod def import_vms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureImportVmArgs']]]]): pulumi.set(self, "import_vms", value) + @property + @pulumi.getter(name="licenseType") + def license_type(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "license_type") + + @license_type.setter + def license_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "license_type", value) + @property @pulumi.getter(name="loadBalancers") def load_balancers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureLoadBalancerArgs']]]]: @@ -506,6 +521,15 @@ def vm_name(self) -> Optional[pulumi.Input[str]]: def vm_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "vm_name", value) + @property + @pulumi.getter(name="vmNamePrefix") + def vm_name_prefix(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "vm_name_prefix") + + @vm_name_prefix.setter + def vm_name_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "vm_name_prefix", value) + @property @pulumi.getter def zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: @@ -531,6 +555,7 @@ def __init__(__self__, *, health: Optional[pulumi.Input['StatefulNodeAzureHealthArgs']] = None, image: Optional[pulumi.Input['StatefulNodeAzureImageArgs']] = None, import_vms: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureImportVmArgs']]]] = None, + license_type: Optional[pulumi.Input[str]] = None, load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureLoadBalancerArgs']]]] = None, login: Optional[pulumi.Input['StatefulNodeAzureLoginArgs']] = None, managed_service_identities: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureManagedServiceIdentityArgs']]]] = None, @@ -560,6 +585,7 @@ def __init__(__self__, *, update_states: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureUpdateStateArgs']]]] = None, user_data: Optional[pulumi.Input[str]] = None, vm_name: Optional[pulumi.Input[str]] = None, + vm_name_prefix: Optional[pulumi.Input[str]] = None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): """ Input properties used for looking up and filtering StatefulNodeAzure resources. @@ -588,6 +614,8 @@ def __init__(__self__, *, pulumi.set(__self__, "image", image) if import_vms is not None: pulumi.set(__self__, "import_vms", import_vms) + if license_type is not None: + pulumi.set(__self__, "license_type", license_type) if load_balancers is not None: pulumi.set(__self__, "load_balancers", load_balancers) if login is not None: @@ -646,6 +674,8 @@ def __init__(__self__, *, pulumi.set(__self__, "user_data", user_data) if vm_name is not None: pulumi.set(__self__, "vm_name", vm_name) + if vm_name_prefix is not None: + pulumi.set(__self__, "vm_name_prefix", vm_name_prefix) if zones is not None: pulumi.set(__self__, "zones", zones) @@ -757,6 +787,15 @@ def import_vms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNod def import_vms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureImportVmArgs']]]]): pulumi.set(self, "import_vms", value) + @property + @pulumi.getter(name="licenseType") + def license_type(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "license_type") + + @license_type.setter + def license_type(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "license_type", value) + @property @pulumi.getter(name="loadBalancers") def load_balancers(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['StatefulNodeAzureLoadBalancerArgs']]]]: @@ -1018,6 +1057,15 @@ def vm_name(self) -> Optional[pulumi.Input[str]]: def vm_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "vm_name", value) + @property + @pulumi.getter(name="vmNamePrefix") + def vm_name_prefix(self) -> Optional[pulumi.Input[str]]: + return pulumi.get(self, "vm_name_prefix") + + @vm_name_prefix.setter + def vm_name_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "vm_name_prefix", value) + @property @pulumi.getter def zones(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: @@ -1045,6 +1093,7 @@ def __init__(__self__, health: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureHealthArgs']]] = None, image: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureImageArgs']]] = None, import_vms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureImportVmArgs']]]]] = None, + license_type: Optional[pulumi.Input[str]] = None, load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoadBalancerArgs']]]]] = None, login: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoginArgs']]] = None, managed_service_identities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureManagedServiceIdentityArgs']]]]] = None, @@ -1074,487 +1123,12 @@ def __init__(__self__, update_states: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureUpdateStateArgs']]]]] = None, user_data: Optional[pulumi.Input[str]] = None, vm_name: Optional[pulumi.Input[str]] = None, + vm_name_prefix: Optional[pulumi.Input[str]] = None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): """ Provides a Spotinst stateful node Azure resource. - ## Example Usage - - - ```python - import pulumi - import pulumi_spotinst as spotinst - - test_stateful_node_azure = spotinst.StatefulNodeAzure("testStatefulNodeAzure", - region="eastus", - resource_group_name="spotinst-azure", - description="example_stateful_node_azure_description", - strategy=spotinst.StatefulNodeAzureStrategyArgs( - draining_timeout=30, - fallback_to_on_demand=True, - optimization_windows=["Tue:19:46-Tue:20:46"], - revert_to_spot=spotinst.StatefulNodeAzureStrategyRevertToSpotArgs( - perform_at="timeWindow", - ), - preferred_life_cycle="od", - capacity_reservations=[spotinst.StatefulNodeAzureStrategyCapacityReservationArgs( - should_utilize=True, - utilization_strategy="utilizeOverOD", - capacity_reservation_groups=[spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs( - crg_name="crg name", - crg_resource_group_name="resourceGroupName", - crg_should_prioritize=True, - )], - )], - ), - os="Linux", - od_sizes=[ - "standard_ds1_v2", - "standard_ds2_v2", - ], - spot_sizes=[ - "standard_ds1_v2", - "standard_ds2_v2", - ], - preferred_spot_sizes=["standard_ds1_v2"], - zones=[ - "1", - "3", - ], - preferred_zone="1", - custom_data="", - shutdown_script="", - user_data="", - vm_name="VMName", - boot_diagnostics=[spotinst.StatefulNodeAzureBootDiagnosticArgs( - is_enabled=True, - storage_url="https://.blob.core.windows.net/test", - type="unmanaged", - )], - data_disks=[ - spotinst.StatefulNodeAzureDataDiskArgs( - size_gb=1, - lun=1, - type="Standard_LRS", - ), - spotinst.StatefulNodeAzureDataDiskArgs( - size_gb=10, - lun=2, - type="Standard_LRS", - ), - ], - extensions=[spotinst.StatefulNodeAzureExtensionArgs( - name="extensionName", - type="customScript", - publisher="Microsoft.Azure.Extensions", - api_version="2.0", - minor_version_auto_upgrade=True, - protected_settings={ - "script": "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==", - }, - )], - image=spotinst.StatefulNodeAzureImageArgs( - marketplace_images=[spotinst.StatefulNodeAzureImageMarketplaceImageArgs( - publisher="Canonical", - offer="UbuntuServer", - sku="16.04-LTS", - version="latest", - )], - ), - load_balancers=[spotinst.StatefulNodeAzureLoadBalancerArgs( - type="loadBalancer", - resource_group_name="testResourceGroup", - name="testLoadBalancer", - sku="Standard", - backend_pool_names=[ - "testBackendPool1", - "testBackendPool2", - ], - )], - login=spotinst.StatefulNodeAzureLoginArgs( - user_name="admin", - ssh_public_key="33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==", - ), - managed_service_identities=[spotinst.StatefulNodeAzureManagedServiceIdentityArgs( - name="mySI2", - resource_group_name="myResourceGroup", - )], - network=spotinst.StatefulNodeAzureNetworkArgs( - network_resource_group_name="subnetResourceGroup", - virtual_network_name="vname", - network_interfaces=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceArgs( - is_primary=True, - subnet_name="testSubnet", - assign_public_ip=True, - public_ip_sku="Standard", - network_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs( - network_resource_group_name="test", - name="test", - )], - enable_ip_forwarding=True, - private_ip_addresses=["172.23.4.20"], - additional_ip_configurations=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs( - name="test", - private_ip_address_version="IPv4", - )], - public_ips=[spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs( - network_resource_group_name="resourceGroup", - name="test", - )], - application_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs( - network_resource_group_name="AsgResourceGroup", - name="AsgName", - )], - )], - ), - os_disk=spotinst.StatefulNodeAzureOsDiskArgs( - size_gb=30, - type="Standard_LRS", - ), - secrets=[spotinst.StatefulNodeAzureSecretArgs( - source_vaults=[spotinst.StatefulNodeAzureSecretSourceVaultArgs( - name="string", - resource_group_name="string", - )], - vault_certificates=[spotinst.StatefulNodeAzureSecretVaultCertificateArgs( - certificate_url="string", - certificate_store="string", - )], - )], - security=spotinst.StatefulNodeAzureSecurityArgs( - security_type="Standard", - secure_boot_enabled=False, - vtpm_enabled=False, - ), - tags=[spotinst.StatefulNodeAzureTagArgs( - tag_key="Creator", - tag_value="string", - )], - health=spotinst.StatefulNodeAzureHealthArgs( - health_check_types=["vmState"], - unhealthy_duration=300, - grace_period=120, - auto_healing=True, - ), - should_persist_os_disk=False, - os_disk_persistence_mode="reattach", - should_persist_data_disks=True, - data_disks_persistence_mode="reattach", - should_persist_network=True, - scheduling_tasks=[ - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="pause", - cron_expression="44 10 * * *", - ), - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="resume", - cron_expression="48 10 * * *", - ), - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="recycle", - cron_expression="52 10 * * *", - ), - ], - signals=[ - spotinst.StatefulNodeAzureSignalArgs( - type="vmReady", - timeout=20, - ), - spotinst.StatefulNodeAzureSignalArgs( - type="vmReady", - timeout=40, - ), - ], - proximity_placement_groups=[spotinst.StatefulNodeAzureProximityPlacementGroupArgs( - name="TestPPG", - resource_group_name="TestResourceGroup", - )], - deletes=[spotinst.StatefulNodeAzureDeleteArgs( - should_terminate_vm=True, - network_should_deallocate=True, - network_ttl_in_hours=0, - disk_should_deallocate=True, - disk_ttl_in_hours=0, - snapshot_should_deallocate=True, - snapshot_ttl_in_hours=0, - public_ip_should_deallocate=True, - public_ip_ttl_in_hours=0, - )]) - # ------------------------------------------------------------------- - ``` - - - # Argument Reference - - The following arguments are supported: - - * `name` - (Required) Azure stateful node name. - * `region` - (Required) The Azure region your stateful node will be created in. - * `resource_group_name` - (Required) Name of the Resource Group for stateful node. - * `description` - (Optional) Describe your Azure stateful node. - - - ## Strategy - - * `strategy` - (Required) Strategy for stateful node. - * `draining_timeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. - * `fallback_to_on_demand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. - * `optimization_windows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. - * `preferred_life_cycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. - * `revert_to_spot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. - * `perform_at` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. - * `capacity_reservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) - * `should_utilize` - (Required) Determines whether capacity reservations should be utilized. - * `utilization_strategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) - * `capacity_reservation_groups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. - * `crg_name` - (Required) The name of the CRG. - * `crg_resource_group_name` - (Required) Azure resource group name - * `crg_should_prioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. - - - ## Compute - - * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. - * `od_sizes` - (Required) Available On-Demand sizes. - * `spot_sizes` - (Required) Available Spot-VM sizes. - * `preferred_spot_sizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. - * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. - * `preferred_zone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. - * `custom_data` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. - * `shutdown_script` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. - * `user_data` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) - * `vm_name` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. - - - ## Boot Diagnostics - - * `boot_diagnostics` - * `is_enabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. - * `storage_url` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. - * `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. - - - ## Data Disks - - * `data_disk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. - * `size_gb` - (Required) The size of the data disk in GB, required if dataDisks is specified. - * `lun` - (Required) The LUN of the data disk. - * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - - - ## Extensions - - * `extension` - (Optional) An object for an azure extension. - * `name` - (Required) Required on compute.launchSpecification.extensions object. - * `type` - (Required) Required on compute.launchSpecification.extensions object. - * `publisher` - (Required) Required on compute.launchSpecification.extensions object. - * `api_version` - (Required) The API version of the extension. Required if extension specified. - * `minor_version_auto_upgrade` - (Required) Required on compute.launchSpecification.extensions object. - * `protected_settings` - (Optional) Object for protected settings. - * `public_settings` - (Optional) Object for public settings. - - - ## Image - - * `image` - * `marketplace_image` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. - * `publisher` - (Required) Image publisher. - * `offer` - (Required) Image offer. - * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. - * `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". - * `gallery_image` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. - * `gallery_resource_group_name` - (Required) The resource group name for gallery image. - * `gallery_name` - (Required) Name of the gallery. - * `image_name` - (Required) Name of the gallery image. - * `version_name` - (Required) Image's version. Can be in the format x.x.x or 'latest'. - * `custom_image` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. - * `custom_image_resource_group_name` - (Required) The resource group name for custom image. - * `name` - (Required) The name of the custom image. - - - ## Load Balancer - - * `load_balancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. - * `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. - * `resource_group_name` - (Required) The Resource Group name of the Load Balancer. - * `name` - (Required) Name of the Application Gateway/Load Balancer. - * `sku` - (Optional) - * if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. - * If ApplicationGateway then possible values are - `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. - * `backend_pool_names` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. - - - ## Login - - * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. - * `user_name` - (Required) username for admin access to VMs. - * `ssh_public_key` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. - * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. - - - ## Managed Service Identities - - * `managed_service_identities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. - * `name` - (Required) name of the managed identity. - * `resource_group_name` - (Required) The Resource Group that the user-assigned managed identity resides in. - - - ## Proximity Placement Groups - - * `proximity_placement_groups` - (Optional) Defines the proximity placement group in which the VM will be launched. - * `name` - (Required) name of the proximity placement group. - * `resource_group_name` - (Required) The Resource Group name of the proximity placement group. - - - ## Network - - * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. - * `network_resource_group_name` - (Required) Vnet Resource Group Name. - * `virtual_network_name` - (Required) Virtual Network. - * `network_interface` - (Required) Define a network interface - * `is_primary` - (Required) Defines whether the network interface is primary or not. - * `subnet_name` - (Required) Subnet name. - * `assign_public_ip` - (Optional) Assign public IP. - * `public_ip_sku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. - * `network_security_group` - (Optional) Network Security Group. - * `network_resource_group_name` - (Required) Requires valid security group name. - * `name` - (Required) Requires valid resource group name. - * `enable_ip_forwarding` - (Optional) Enable IP Forwarding. - * `private_ip_addresses` - (Optional) A list with unique items that every item is a valid IP. - * `additional_ip_configurations` - (Optional) Additional configuration of network interface. - * `name` - (Required) Configuration name. - * `private_ip_address_version` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. - * `public_ips` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. - * `resource_group_name` - (Required) The resource group of the public ip. - * `name` - (Required) - The name of the public ip. - * `application_security_groups` - (Optional) Network Security Group. - * `resource_group_name` - (Required) Requires valid security group name. - * `name` - (Required) Requires valid resource group name. - - - ## OS Disk - - * `os_disk` - (Optional) Specify OS disk specification other than default. - * `size_gb` - (Optional, Default `"30"`) The size of the data disk in GB. - * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. - - - ## Secret - - * `secret` - (Optional) Set of certificates that should be installed on the VM. - * `source_vault` - (Required) The key vault reference, contains the required certificates. - * `name` - (Required) The name of the key vault. - * `resource_group_name` - (Required) The resource group name of the key vault. - * `vault_certificates` - (Required) The required certificate references. - * `certificate_url` - (Optional) The URL of the certificate under the key vault. - * `certificate_store` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. - * This field is required only when using Windows OS type - * This field must be ‘null’ when the OS type is Linux - - - ## Security - - * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. - * `secure_boot_enabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. - * `security_type` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. - * `vtpm_enabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. - - - ## Tag - - * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. - * `tag_key` - (Optional) Tag Key for Stateful Node Resources. - * `tag_value` - (Optional) Tag Value for Stateful Node Resources. - - - ## Health - - * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. - * `health_check_types` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. - * `unhealthy_duration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. - * `auto_healing` - (Required) Enable Autohealing of unhealthy VMs. - * `grace_period` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. - - - ## Persistence - - * `should_persist_os_disk` - (Required) Should persist os disk. - * `os_disk_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * `should_persist_data_disks` - (Required) Should persist data disks. - * `data_disks_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * `should_persist_network` - (Required) Should persist network. - - - ## Scheduling Tasks - - * `scheduling_task` - (Optional) Scheduling settings object for stateful node. - * `is_enabled` - (Required) Is scheduled task enabled for stateful node. - * `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task - * `cron_expression` (Required) A expression which describes when to execute the scheduled task (UTC). - - - ## Signals - - * `signal` - (Optional) A signal object defined for the stateful node. - * `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. - * `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. - - *** - - - ## Attach Data Disk - - * `attach_data_disk` - (Optional) Create a new data disk and attach it to the stateful node. - * `data_disk_name` - (Required) The name of the created data disk. - * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk will be created. - * `storage_account_type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * `size_gb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. - * `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. - * `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. - - - ## Detach Data Disk - - * `detach_data_disk` - (Optional) Detach a data disk from a stateful node. - * `data_disk_name` - (Required) The name of the detached data disk. - * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk exists. - * `should_deallocate` - (Required) Indicates whether to delete the data disk in addition to detach. - * `ttl_in_hours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. - - - ## Update State - - * `update_state` - (Optional) Update the stateful node state. - * `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. - - - ## Import VM - - * `import_vm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. - * `resource_group_name` - (Required) Name of the Resource Group for Stateful Node. - * `original_vm_name` - (Required) Azure Import Stateful Node Name. - * `draining_timeout` - (Optional) Hours to keep resources alive. - * `resources_retention_time` - (Optional) Hours to keep resources alive. - - - ## Deallocation Config - - * `delete` - (Required) Specify deallocation parameters for stateful node deletion. - * `should_terminate_vm` - (Required) Indicates whether to delete the stateful node's VM. - * `network_should_deallocate` - (Required) Indicates whether to delete the stateful node's network resources. - * `network_ttl_in_hours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. - * `disk_should_deallocate` - (Required) Indicates whether to delete the stateful node's disk resources. - * `disk_ttl_in_hours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. - * `snapshot_should_deallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. - * `snapshot_ttl_in_hours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. - * `public_ip_should_deallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. - * `public_ip_ttl_in_hours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. - :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. """ @@ -1567,482 +1141,6 @@ def __init__(__self__, """ Provides a Spotinst stateful node Azure resource. - ## Example Usage - - - ```python - import pulumi - import pulumi_spotinst as spotinst - - test_stateful_node_azure = spotinst.StatefulNodeAzure("testStatefulNodeAzure", - region="eastus", - resource_group_name="spotinst-azure", - description="example_stateful_node_azure_description", - strategy=spotinst.StatefulNodeAzureStrategyArgs( - draining_timeout=30, - fallback_to_on_demand=True, - optimization_windows=["Tue:19:46-Tue:20:46"], - revert_to_spot=spotinst.StatefulNodeAzureStrategyRevertToSpotArgs( - perform_at="timeWindow", - ), - preferred_life_cycle="od", - capacity_reservations=[spotinst.StatefulNodeAzureStrategyCapacityReservationArgs( - should_utilize=True, - utilization_strategy="utilizeOverOD", - capacity_reservation_groups=[spotinst.StatefulNodeAzureStrategyCapacityReservationCapacityReservationGroupArgs( - crg_name="crg name", - crg_resource_group_name="resourceGroupName", - crg_should_prioritize=True, - )], - )], - ), - os="Linux", - od_sizes=[ - "standard_ds1_v2", - "standard_ds2_v2", - ], - spot_sizes=[ - "standard_ds1_v2", - "standard_ds2_v2", - ], - preferred_spot_sizes=["standard_ds1_v2"], - zones=[ - "1", - "3", - ], - preferred_zone="1", - custom_data="", - shutdown_script="", - user_data="", - vm_name="VMName", - boot_diagnostics=[spotinst.StatefulNodeAzureBootDiagnosticArgs( - is_enabled=True, - storage_url="https://.blob.core.windows.net/test", - type="unmanaged", - )], - data_disks=[ - spotinst.StatefulNodeAzureDataDiskArgs( - size_gb=1, - lun=1, - type="Standard_LRS", - ), - spotinst.StatefulNodeAzureDataDiskArgs( - size_gb=10, - lun=2, - type="Standard_LRS", - ), - ], - extensions=[spotinst.StatefulNodeAzureExtensionArgs( - name="extensionName", - type="customScript", - publisher="Microsoft.Azure.Extensions", - api_version="2.0", - minor_version_auto_upgrade=True, - protected_settings={ - "script": "IyEvYmluL2Jhc2gKZWNobyAibmlyIiA+IC9ob29uaXIudHh0Cg==", - }, - )], - image=spotinst.StatefulNodeAzureImageArgs( - marketplace_images=[spotinst.StatefulNodeAzureImageMarketplaceImageArgs( - publisher="Canonical", - offer="UbuntuServer", - sku="16.04-LTS", - version="latest", - )], - ), - load_balancers=[spotinst.StatefulNodeAzureLoadBalancerArgs( - type="loadBalancer", - resource_group_name="testResourceGroup", - name="testLoadBalancer", - sku="Standard", - backend_pool_names=[ - "testBackendPool1", - "testBackendPool2", - ], - )], - login=spotinst.StatefulNodeAzureLoginArgs( - user_name="admin", - ssh_public_key="33a2s1f3g5a1df5g1ad3f2g1adfg56dfg==", - ), - managed_service_identities=[spotinst.StatefulNodeAzureManagedServiceIdentityArgs( - name="mySI2", - resource_group_name="myResourceGroup", - )], - network=spotinst.StatefulNodeAzureNetworkArgs( - network_resource_group_name="subnetResourceGroup", - virtual_network_name="vname", - network_interfaces=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceArgs( - is_primary=True, - subnet_name="testSubnet", - assign_public_ip=True, - public_ip_sku="Standard", - network_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceNetworkSecurityGroupArgs( - network_resource_group_name="test", - name="test", - )], - enable_ip_forwarding=True, - private_ip_addresses=["172.23.4.20"], - additional_ip_configurations=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceAdditionalIpConfigurationArgs( - name="test", - private_ip_address_version="IPv4", - )], - public_ips=[spotinst.StatefulNodeAzureNetworkNetworkInterfacePublicIpArgs( - network_resource_group_name="resourceGroup", - name="test", - )], - application_security_groups=[spotinst.StatefulNodeAzureNetworkNetworkInterfaceApplicationSecurityGroupArgs( - network_resource_group_name="AsgResourceGroup", - name="AsgName", - )], - )], - ), - os_disk=spotinst.StatefulNodeAzureOsDiskArgs( - size_gb=30, - type="Standard_LRS", - ), - secrets=[spotinst.StatefulNodeAzureSecretArgs( - source_vaults=[spotinst.StatefulNodeAzureSecretSourceVaultArgs( - name="string", - resource_group_name="string", - )], - vault_certificates=[spotinst.StatefulNodeAzureSecretVaultCertificateArgs( - certificate_url="string", - certificate_store="string", - )], - )], - security=spotinst.StatefulNodeAzureSecurityArgs( - security_type="Standard", - secure_boot_enabled=False, - vtpm_enabled=False, - ), - tags=[spotinst.StatefulNodeAzureTagArgs( - tag_key="Creator", - tag_value="string", - )], - health=spotinst.StatefulNodeAzureHealthArgs( - health_check_types=["vmState"], - unhealthy_duration=300, - grace_period=120, - auto_healing=True, - ), - should_persist_os_disk=False, - os_disk_persistence_mode="reattach", - should_persist_data_disks=True, - data_disks_persistence_mode="reattach", - should_persist_network=True, - scheduling_tasks=[ - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="pause", - cron_expression="44 10 * * *", - ), - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="resume", - cron_expression="48 10 * * *", - ), - spotinst.StatefulNodeAzureSchedulingTaskArgs( - is_enabled=True, - type="recycle", - cron_expression="52 10 * * *", - ), - ], - signals=[ - spotinst.StatefulNodeAzureSignalArgs( - type="vmReady", - timeout=20, - ), - spotinst.StatefulNodeAzureSignalArgs( - type="vmReady", - timeout=40, - ), - ], - proximity_placement_groups=[spotinst.StatefulNodeAzureProximityPlacementGroupArgs( - name="TestPPG", - resource_group_name="TestResourceGroup", - )], - deletes=[spotinst.StatefulNodeAzureDeleteArgs( - should_terminate_vm=True, - network_should_deallocate=True, - network_ttl_in_hours=0, - disk_should_deallocate=True, - disk_ttl_in_hours=0, - snapshot_should_deallocate=True, - snapshot_ttl_in_hours=0, - public_ip_should_deallocate=True, - public_ip_ttl_in_hours=0, - )]) - # ------------------------------------------------------------------- - ``` - - - # Argument Reference - - The following arguments are supported: - - * `name` - (Required) Azure stateful node name. - * `region` - (Required) The Azure region your stateful node will be created in. - * `resource_group_name` - (Required) Name of the Resource Group for stateful node. - * `description` - (Optional) Describe your Azure stateful node. - - - ## Strategy - - * `strategy` - (Required) Strategy for stateful node. - * `draining_timeout` - (Optional, Default `120`) Time (in seconds) to allow the VM be drained from incoming TCP connections and detached from MLB before terminating it during a scale down operation. - * `fallback_to_on_demand` - (Required) In case of no spots available, Stateful Node will launch an On-demand instance instead. - * `optimization_windows` - (Optional) Valid format: "ddd:hh:mm-ddd:hh:mm (day:hour(0-23):minute(0-59))", not empty if revertToSpot.performAt = timeWindow. - * `preferred_life_cycle` - (Optional, Enum `"od", "spot"`, Default `"spot"`) The desired type of VM. - * `revert_to_spot` - (Optional) Hold settings for strategy correction - replacing On-Demand for Spot VMs. - * `perform_at` - (Required, Enum `"timeWindow", "never", "always"`, Default `"always"`) Settings for maintenance strategy. - * `capacity_reservation` - (Optional) On-demand Capacity Reservation group enables you to reserve Compute capacity in an Azure region or an Availability Zone for any duration of time. [CRG can only be created on the Azure end.](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-create) - * `should_utilize` - (Required) Determines whether capacity reservations should be utilized. - * `utilization_strategy` - (Required, Enum `"utilizeOverSpot", "utilizeOverOD"`) The priority requested for using CRG. This value will determine if CRG is used ahead of spot VMs or On-demand VMs. (`"utilizeOverOD"`- If picked, we will use CRG only in case On demand should be launched. `"utilizeOverSpot"`- CRG will be preferred over Spot. Only after CRG is fully used, spot VMs can be used.) - * `capacity_reservation_groups` - (Optional) List of the desired CRGs to use under the associated Azure subscription. When null we will utilize any available reservation that matches the launch specification. - * `crg_name` - (Required) The name of the CRG. - * `crg_resource_group_name` - (Required) Azure resource group name - * `crg_should_prioritize` - The desired CRG to utilize ahead of other CRGs in the subscription. - - - ## Compute - - * `os` - (Required, Enum `"Linux", "Windows"`) Type of operating system. - * `od_sizes` - (Required) Available On-Demand sizes. - * `spot_sizes` - (Required) Available Spot-VM sizes. - * `preferred_spot_sizes` - (Optional) Prioritize Spot VM sizes when launching Spot VMs for the group. If set, must be a sublist of compute.vmSizes.spotSizes. - * `zones` - (Optional, Enum `"1", "2", "3"`) List of Azure Availability Zones in the defined region. If not defined, Virtual machines will be launched regionally. - * `preferred_zone` - (Optional, Enum `"1", "2", "3"`) The AZ to prioritize when launching VMs. If no markets are available in the Preferred AZ, VMs are launched in the non-preferred AZ. Must be a sublist of compute.zones. - * `custom_data` - (Optional) This value will hold the YAML in base64 and will be executed upon VM launch. - * `shutdown_script` - (Optional) Shutdown script for the stateful node. Value should be passed as a string encoded at Base64 only. - * `user_data` - (Optional) Define a set of scripts or other metadata that's inserted to an Azure virtual machine at provision time. (Base64 encoded) - * `vm_name` - (Optional) Set a VM name that will be persisted throughout the entire node lifecycle. - - - ## Boot Diagnostics - - * `boot_diagnostics` - * `is_enabled` - (Optional) Allows you to enable and disable the configuration of boot diagnostics at launch. - * `storage_url` - (Optional) The storage URI that is used if a type is unmanaged. The storage URI must follow the blob storage URI format ("https://.blob.core.windows.net/"). StorageUri is required if the type is unmanaged. StorageUri must be ‘null’ in case the boot diagnostics type is managed. - * `type` - (Optional, Enum `"managed", "unmanaged"`) Defines the storage type on VM launch in Azure. - - - ## Data Disks - - * `data_disk` - (Optional) The definitions of data disks that will be created and attached to the stateful node's VM. - * `size_gb` - (Required) The size of the data disk in GB, required if dataDisks is specified. - * `lun` - (Required) The LUN of the data disk. - * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - - - ## Extensions - - * `extension` - (Optional) An object for an azure extension. - * `name` - (Required) Required on compute.launchSpecification.extensions object. - * `type` - (Required) Required on compute.launchSpecification.extensions object. - * `publisher` - (Required) Required on compute.launchSpecification.extensions object. - * `api_version` - (Required) The API version of the extension. Required if extension specified. - * `minor_version_auto_upgrade` - (Required) Required on compute.launchSpecification.extensions object. - * `protected_settings` - (Optional) Object for protected settings. - * `public_settings` - (Optional) Object for public settings. - - - ## Image - - * `image` - * `marketplace_image` - (Optional) Select an image from Azure's Marketplace image catalogue. Required if the custom image or gallery image are not specified. - * `publisher` - (Required) Image publisher. - * `offer` - (Required) Image offer. - * `sku` - (Required) Image Stock Keeping Unit, which is the specific version of the image. - * `version` - (Required, Default `"latest"`) Image's version. if version not provided we use "latest". - * `gallery_image` - (Optional) Gallery image definitions. Required if custom image or marketplace image are not specified. - * `gallery_resource_group_name` - (Required) The resource group name for gallery image. - * `gallery_name` - (Required) Name of the gallery. - * `image_name` - (Required) Name of the gallery image. - * `version_name` - (Required) Image's version. Can be in the format x.x.x or 'latest'. - * `custom_image` - (Optional) Custom image definitions. Required if marketplace image or gallery image are not specified. - * `custom_image_resource_group_name` - (Required) The resource group name for custom image. - * `name` - (Required) The name of the custom image. - - - ## Load Balancer - - * `load_balancer` - (Optional) Add a load balancer. For Azure Gateway, each Backend Pool is a separate load balancer. - * `type` - (Required, Enum `"loadBalancer", "applicationGateway"`) The type of load balancer. - * `resource_group_name` - (Required) The Resource Group name of the Load Balancer. - * `name` - (Required) Name of the Application Gateway/Load Balancer. - * `sku` - (Optional) - * if type is `"LoadBalancer"` then possible values are `“Standard", "Basic”`. - * If ApplicationGateway then possible values are - `“Standard_Large”, “Standard_Medium”, “Standard_Small”, “Standard_v2", “WAF_Large”, “WAF_Medium", “WAF_v2"`. - * `backend_pool_names` - (Optional) Name of the Backend Pool to register the Stateful Node VMs to. Each Backend Pool is a separate load balancer. Required if Type is APPLICATION_GATEWAY. - - - ## Login - - * `login` - (Required) Set admin access for accessing your VMs. Password/SSH is required for Linux. - * `user_name` - (Required) username for admin access to VMs. - * `ssh_public_key` - (Optional) SSH for admin access to Linux VMs. Optional for Linux. - * `password` - (Optional) Password for admin access to Windows VMs. Required for Windows. - - - ## Managed Service Identities - - * `managed_service_identities` - (Optional) Add a user-assigned managed identity to the Stateful Node's VM. - * `name` - (Required) name of the managed identity. - * `resource_group_name` - (Required) The Resource Group that the user-assigned managed identity resides in. - - - ## Proximity Placement Groups - - * `proximity_placement_groups` - (Optional) Defines the proximity placement group in which the VM will be launched. - * `name` - (Required) name of the proximity placement group. - * `resource_group_name` - (Required) The Resource Group name of the proximity placement group. - - - ## Network - - * `network` - (Required) Define the Virtual Network and Subnet for your Stateful Node. - * `network_resource_group_name` - (Required) Vnet Resource Group Name. - * `virtual_network_name` - (Required) Virtual Network. - * `network_interface` - (Required) Define a network interface - * `is_primary` - (Required) Defines whether the network interface is primary or not. - * `subnet_name` - (Required) Subnet name. - * `assign_public_ip` - (Optional) Assign public IP. - * `public_ip_sku` - (Optional) Required if assignPublicIp=true values=[Standard/Basic]. - * `network_security_group` - (Optional) Network Security Group. - * `network_resource_group_name` - (Required) Requires valid security group name. - * `name` - (Required) Requires valid resource group name. - * `enable_ip_forwarding` - (Optional) Enable IP Forwarding. - * `private_ip_addresses` - (Optional) A list with unique items that every item is a valid IP. - * `additional_ip_configurations` - (Optional) Additional configuration of network interface. - * `name` - (Required) Configuration name. - * `private_ip_address_version` - (Required, Enum `"IPv4", "IPv6"` Default `"IPv4"`) Version of the private IP address. - * `public_ips` - (Optional) Defined a pool of Public Ips (from Azure), that will be associated to the network interface. We will associate one public ip per instance until the pool is exhausted, in which case, we will create a new one. - * `resource_group_name` - (Required) The resource group of the public ip. - * `name` - (Required) - The name of the public ip. - * `application_security_groups` - (Optional) Network Security Group. - * `resource_group_name` - (Required) Requires valid security group name. - * `name` - (Required) Requires valid resource group name. - - - ## OS Disk - - * `os_disk` - (Optional) Specify OS disk specification other than default. - * `size_gb` - (Optional, Default `"30"`) The size of the data disk in GB. - * `type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS"`) The type of the OS disk. - - - ## Secret - - * `secret` - (Optional) Set of certificates that should be installed on the VM. - * `source_vault` - (Required) The key vault reference, contains the required certificates. - * `name` - (Required) The name of the key vault. - * `resource_group_name` - (Required) The resource group name of the key vault. - * `vault_certificates` - (Required) The required certificate references. - * `certificate_url` - (Optional) The URL of the certificate under the key vault. - * `certificate_store` - (Required) The certificate store directory the VM. The directory is created in the LocalMachine account. - * This field is required only when using Windows OS type - * This field must be ‘null’ when the OS type is Linux - - - ## Security - - * `security` - (Optional) Specifies the Security related profile settings for the virtual machine. - * `secure_boot_enabled` - (Optional) Specifies whether secure boot should be enabled on the virtual machine. - * `security_type` - (Optional) Enum: `"Standard", "TrustedLaunch"` Security type refers to the different security features of a virtual machine. Security features like Trusted launch virtual machines help to improve the security of Azure generation 2 virtual machines. - * `vtpm_enabled` - (Optional) Specifies whether vTPM should be enabled on the virtual machine. - - - ## Tag - - * `tag` - (Optional) Unique Key-Value pair for all Stateful Node Resources. - * `tag_key` - (Optional) Tag Key for Stateful Node Resources. - * `tag_value` - (Optional) Tag Value for Stateful Node Resources. - - - ## Health - - * `health` - (Optional) Set the auto healing preferences for unhealthy VMs. - * `health_check_types` - (Optional, Enum `"vmState", "applicationGateway"`) Healthcheck to use to validate VM health. - * `unhealthy_duration` - (Optional) Amount of time to be unhealthy before a replacement is triggered. - * `auto_healing` - (Required) Enable Autohealing of unhealthy VMs. - * `grace_period` - (Optional) Period of time to wait for VM to reach healthiness before monitoring for unhealthiness. - - - ## Persistence - - * `should_persist_os_disk` - (Required) Should persist os disk. - * `os_disk_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * `should_persist_data_disks` - (Required) Should persist data disks. - * `data_disks_persistence_mode` - (Optional, Enum `"reattach", "onLaunch"`) - * `should_persist_network` - (Required) Should persist network. - - - ## Scheduling Tasks - - * `scheduling_task` - (Optional) Scheduling settings object for stateful node. - * `is_enabled` - (Required) Is scheduled task enabled for stateful node. - * `type` - (Required, Enum `"pause", "resume", "recycle") The type of the scheduled task - * `cron_expression` (Required) A expression which describes when to execute the scheduled task (UTC). - - - ## Signals - - * `signal` - (Optional) A signal object defined for the stateful node. - * `type` - (Required, Enum `"vmReady", "vmReadyToShutdown"`) The type of the signal defined for the stateful node. - * `timeout` - (Required, Default `"1800"`) The timeout in seconds to hold the vm until a signal is sent. If no signal is sent the vm will be replaced (vmReady) or we will terminate the vm (vmReadyToShutdown) after the timeout. - - *** - - - ## Attach Data Disk - - * `attach_data_disk` - (Optional) Create a new data disk and attach it to the stateful node. - * `data_disk_name` - (Required) The name of the created data disk. - * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk will be created. - * `storage_account_type` - (Required, Enum `"Standard_LRS", "Premium_LRS", "StandardSSD_LRS", "UltraSSD_LRS"`) The type of the data disk. - * `size_gb` - (Required) The size of the data disk in GB, Required if dataDisks is specified. - * `zone` - (Optional, Enum `"1", "2", "3"`) The Availability Zone in which the data disk will be created. If not defined, the data disk will be created regionally. - * `lun` - (Optional, Default `"orginal"`) The LUN of the data disk. If not defined, the LUN will be set in order. - - - ## Detach Data Disk - - * `detach_data_disk` - (Optional) Detach a data disk from a stateful node. - * `data_disk_name` - (Required) The name of the detached data disk. - * `data_disk_resource_group_name` - (Required) The resource group name in which the data disk exists. - * `should_deallocate` - (Required) Indicates whether to delete the data disk in addition to detach. - * `ttl_in_hours` - (Required, Default `"0"`) Hours to keep the disk alive before deletion. - - - ## Update State - - * `update_state` - (Optional) Update the stateful node state. - * `state` - (Required, Enum `"pause", "resume", "recycle"`) New state for the stateful node. - - - ## Import VM - - * `import_vm` - (Optional) Import an Azure VM and create a stateful node by providing a node configuration. - * `resource_group_name` - (Required) Name of the Resource Group for Stateful Node. - * `original_vm_name` - (Required) Azure Import Stateful Node Name. - * `draining_timeout` - (Optional) Hours to keep resources alive. - * `resources_retention_time` - (Optional) Hours to keep resources alive. - - - ## Deallocation Config - - * `delete` - (Required) Specify deallocation parameters for stateful node deletion. - * `should_terminate_vm` - (Required) Indicates whether to delete the stateful node's VM. - * `network_should_deallocate` - (Required) Indicates whether to delete the stateful node's network resources. - * `network_ttl_in_hours` - (Optional, Default: 96) Hours to keep the network resource alive before deletion. - * `disk_should_deallocate` - (Required) Indicates whether to delete the stateful node's disk resources. - * `disk_ttl_in_hours` - (Optional, Default: 96) Hours to keep the disk resource alive before deletion. - * `snapshot_should_deallocate` - (Required) Indicates whether to delete the stateful node's snapshot resources. - * `snapshot_ttl_in_hours` - (Optional, Default: 96) Hours to keep the snapshots alive before deletion. - * `public_ip_should_deallocate` - (Required) Indicates whether to delete the stateful node's public ip resources. - * `public_ip_ttl_in_hours` - (Optional, Default: 96) Hours to keep the public ip alive before deletion. - :param str resource_name: The name of the resource. :param StatefulNodeAzureArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -2070,6 +1168,7 @@ def _internal_init(__self__, health: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureHealthArgs']]] = None, image: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureImageArgs']]] = None, import_vms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureImportVmArgs']]]]] = None, + license_type: Optional[pulumi.Input[str]] = None, load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoadBalancerArgs']]]]] = None, login: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoginArgs']]] = None, managed_service_identities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureManagedServiceIdentityArgs']]]]] = None, @@ -2099,6 +1198,7 @@ def _internal_init(__self__, update_states: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureUpdateStateArgs']]]]] = None, user_data: Optional[pulumi.Input[str]] = None, vm_name: Optional[pulumi.Input[str]] = None, + vm_name_prefix: Optional[pulumi.Input[str]] = None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) @@ -2121,6 +1221,7 @@ def _internal_init(__self__, __props__.__dict__["health"] = health __props__.__dict__["image"] = image __props__.__dict__["import_vms"] = import_vms + __props__.__dict__["license_type"] = license_type __props__.__dict__["load_balancers"] = load_balancers __props__.__dict__["login"] = login __props__.__dict__["managed_service_identities"] = managed_service_identities @@ -2168,6 +1269,7 @@ def _internal_init(__self__, __props__.__dict__["update_states"] = update_states __props__.__dict__["user_data"] = user_data __props__.__dict__["vm_name"] = vm_name + __props__.__dict__["vm_name_prefix"] = vm_name_prefix __props__.__dict__["zones"] = zones super(StatefulNodeAzure, __self__).__init__( 'spotinst:index/statefulNodeAzure:StatefulNodeAzure', @@ -2191,6 +1293,7 @@ def get(resource_name: str, health: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureHealthArgs']]] = None, image: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureImageArgs']]] = None, import_vms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureImportVmArgs']]]]] = None, + license_type: Optional[pulumi.Input[str]] = None, load_balancers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoadBalancerArgs']]]]] = None, login: Optional[pulumi.Input[pulumi.InputType['StatefulNodeAzureLoginArgs']]] = None, managed_service_identities: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureManagedServiceIdentityArgs']]]]] = None, @@ -2220,6 +1323,7 @@ def get(resource_name: str, update_states: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['StatefulNodeAzureUpdateStateArgs']]]]] = None, user_data: Optional[pulumi.Input[str]] = None, vm_name: Optional[pulumi.Input[str]] = None, + vm_name_prefix: Optional[pulumi.Input[str]] = None, zones: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'StatefulNodeAzure': """ Get an existing StatefulNodeAzure resource's state with the given name, id, and optional extra @@ -2245,6 +1349,7 @@ def get(resource_name: str, __props__.__dict__["health"] = health __props__.__dict__["image"] = image __props__.__dict__["import_vms"] = import_vms + __props__.__dict__["license_type"] = license_type __props__.__dict__["load_balancers"] = load_balancers __props__.__dict__["login"] = login __props__.__dict__["managed_service_identities"] = managed_service_identities @@ -2274,6 +1379,7 @@ def get(resource_name: str, __props__.__dict__["update_states"] = update_states __props__.__dict__["user_data"] = user_data __props__.__dict__["vm_name"] = vm_name + __props__.__dict__["vm_name_prefix"] = vm_name_prefix __props__.__dict__["zones"] = zones return StatefulNodeAzure(resource_name, opts=opts, __props__=__props__) @@ -2337,6 +1443,11 @@ def image(self) -> pulumi.Output[Optional['outputs.StatefulNodeAzureImage']]: def import_vms(self) -> pulumi.Output[Optional[Sequence['outputs.StatefulNodeAzureImportVm']]]: return pulumi.get(self, "import_vms") + @property + @pulumi.getter(name="licenseType") + def license_type(self) -> pulumi.Output[Optional[str]]: + return pulumi.get(self, "license_type") + @property @pulumi.getter(name="loadBalancers") def load_balancers(self) -> pulumi.Output[Sequence['outputs.StatefulNodeAzureLoadBalancer']]: @@ -2482,6 +1593,11 @@ def user_data(self) -> pulumi.Output[str]: def vm_name(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "vm_name") + @property + @pulumi.getter(name="vmNamePrefix") + def vm_name_prefix(self) -> pulumi.Output[Optional[str]]: + return pulumi.get(self, "vm_name_prefix") + @property @pulumi.getter def zones(self) -> pulumi.Output[Optional[Sequence[str]]]: diff --git a/upstream b/upstream index b2716472..130a214e 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit b2716472d8485021b2386801cc9b073ae0c0df6c +Subproject commit 130a214e4e2ae340cd7a817a1f110e9ea04bd971