Virtual Machine



Azure Virtual Machines provide scalable computing resources in the cloud, enabling you to host your applications and workloads on Windows or Linux servers.


Example yaml file:


apiVersion: azure.boundless.software/v1alpha1
kind: VirtualMachine
metadata:
  name: vm-sample
spec:
  provider:
    region: "eastus"
  resourceGroup: "my-resource-group"
  vmImageSpec:
    publisher: "Canonical"
    offer: "UbuntuServer"
    sku: "18.04-LTS"
    version: "latest"
  osProfileSpec:
    adminUsername: "azureuser"
    adminPassword: "Password123!"
    sshPublicKey: "ssh-rsa AAAA..."
  hardwareSpec:
    vmSize: "Standard_DS2_v2"
  networkingSpec:
    createPublicIP: true
    subnetId: "/subscriptions/.../subnets/my-subnet"
    loadBalancerBackendAddressPoolIds:
      - "/subscriptions/.../backendAddressPools/my-pool"
  diskSpec:
    osDiskSize: 128
    caching: "ReadWrite"
    storageAccountType: "Premium_LRS"
    dataDisks:
      disk1:
        size: 256
        caching: "None"
        storageAccountType: "Premium_LRS"
  availabilityZone: 1
  tags:
    environment: "production"

Inputs


NameTypeDescription
provider*AzureProviderSpecThe provider for the VirtualMachine resource.
resourceGroup*stringThe resource group for the VirtualMachine resource.
vmImageSpec*VMImageSpecThe VM image spec for the VirtualMachine resource.
osProfileSpec*OSProfileSpecThe OS profile for the VirtualMachine resource.
hardwareSpec*HardwareSpecThe hardware spec for the VirtualMachine resource.
networkingSpecVMNetworkingSpecThe networking for the VirtualMachine resource.
availabilityZoneint32The availability zone (1-3) for the VirtualMachine resource.
availabilitySetIdstringThe availability set ID for the VirtualMachine resource.
diskSpecDiskSpecThe OS disk for the VirtualMachine resource.
tagsmap[string]*stringThe tags for the VirtualMachine resource.

VMImageSpec


NameTypeDescription
offer*stringThe offer for the VirtualMachine resource.
publisher*stringThe publisher for the VirtualMachine resource.
sku*stringThe sku for the VirtualMachine resource.
version*stringThe version for the VirtualMachine resource.

OSProfileSpec


NameTypeDescription
adminUsername*stringThe admin username of the VirtualMachine resource.
adminPassword*stringThe admin password of the VirtualMachine resource.
sshPublicKeystringThe SSH key data for the VirtualMachine resource.

HardwareSpec


NameTypeDescription
vmSize*stringThe VM size for the VirtualMachine resource.

VMNetworkingSpec


NameTypeDescription
loadBalancerBackendAddressPoolIds[]stringThe load balancer backend address pool IDs for the VirtualMachine resource.
createPublicIPboolWhether to create a public IP for the VirtualMachine resource.
subnetIdstringThe subnet ID for the VirtualMachine resource.
networkInterfaceIdstringThe network interface ID for the VirtualMachine resource.

OSDiskEncryptionSpec


NameTypeDescription
encryptionVaultIdstringThe encryption key ID for the VirtualMachine resource.
secretIdstringThe secret ID for the VirtualMachine resource.

DataDiskSpec


NameTypeDescription
diskIdstringThe disk ID for the VirtualMachine resource. Only required when attaching an existing disk.
size*int32The size of the data disk for the VirtualMachine resource.
cachingstringThe caching of the data disk for the VirtualMachine resource (None/ReadOnly/ReadWrite).
storageAccountTypestringThe storage account type for the VirtualMachine resource.

DataDiskStatus


NameTypeDescription
sizeint32The size of the data disk for the VirtualMachine resource.
idstringThe ID of the data disk for the VirtualMachine resource.
cachingstringThe caching of the data disk for the VirtualMachine resource.
lunint32The LUN of the data disk for the VirtualMachine resource.

ImageStatus


NameTypeDescription
offerstringThe offer of the VirtualMachine resource.
publisherstringThe publisher of the VirtualMachine resource.
skustringThe sku of the VirtualMachine resource.
versionstringThe version of the VirtualMachine resource.

OSDiskStatus


NameTypeDescription
sizeint32The size of the OS disk for the VirtualMachine resource.
idstringThe ID of the OS disk for the VirtualMachine resource.
cachingstringThe caching of the OS disk for the VirtualMachine resource.

VMNetworkingStatus


NameTypeDescription
publicIpAddressstringThe public IP address of the VirtualMachine resource.
subnetIdstringThe subnet ID of the VirtualMachine resource.
networkInterfaceIdstringThe network interface ID of the VirtualMachine resource.
loadBalancerBackendAddressPoolIds[]stringThe load balancer backend address pool IDs for the VirtualMachine resource.

Outputs


NameTypeDescription
conditionmetav1.ConditionThe condition of the VirtualMachine resource.
namestringThe name of the VirtualMachine resource.
locationstringThe location of the VirtualMachine resource.
idstringThe ID of the VirtualMachine resource.
vmSizestringThe VM size of the VirtualMachine resource.
networkingVMNetworkingStatusThe networking status of the VirtualMachine resource.
dataDisksmap[string]*DataDiskStatusThe data disks status for the VirtualMachine resource.
imageImageStatusThe image status for the VirtualMachine resource.
osDiskOSDiskStatusThe OS disk status for the VirtualMachine resource.



Previous

<< AKS