{
  "description": "AzureMachineTemplate is the Schema for the azuremachinetemplates API.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "AzureMachineTemplateSpec defines the desired state of AzureMachineTemplate.",
      "properties": {
        "template": {
          "description": "AzureMachineTemplateResource describes the data needed to create an AzureMachine from a template.",
          "properties": {
            "spec": {
              "description": "Spec is the specification of the desired behavior of the machine.",
              "properties": {
                "acceleratedNetworking": {
                  "description": "AcceleratedNetworking enables or disables Azure accelerated networking. If omitted, it will be set based on whether the requested VMSize supports accelerated networking. If AcceleratedNetworking is set to true with a VMSize that does not support it, Azure will return an error.",
                  "type": "boolean"
                },
                "additionalTags": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "AdditionalTags is an optional set of tags to add to an instance, in addition to the ones added by default by the Azure provider. If both the AzureCluster and the AzureMachine specify the same tag name with different values, the AzureMachine's value takes precedence.",
                  "type": "object"
                },
                "allocatePublicIP": {
                  "description": "AllocatePublicIP allows the ability to create dynamic public ips for machines where this value is true.",
                  "type": "boolean"
                },
                "dataDisks": {
                  "description": "DataDisk specifies the parameters that are used to add one or more data disks to the machine",
                  "items": {
                    "description": "DataDisk specifies the parameters that are used to add one or more data disks to the machine.",
                    "properties": {
                      "cachingType": {
                        "description": "CachingType specifies the caching requirements.",
                        "enum": [
                          "None",
                          "ReadOnly",
                          "ReadWrite"
                        ],
                        "type": "string"
                      },
                      "diskSizeGB": {
                        "description": "DiskSizeGB is the size in GB to assign to the data disk.",
                        "format": "int32",
                        "type": "integer"
                      },
                      "lun": {
                        "description": "Lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. The value must be between 0 and 63.",
                        "format": "int32",
                        "type": "integer"
                      },
                      "managedDisk": {
                        "description": "ManagedDisk specifies the Managed Disk parameters for the data disk.",
                        "properties": {
                          "diskEncryptionSet": {
                            "description": "DiskEncryptionSetParameters defines disk encryption options.",
                            "properties": {
                              "id": {
                                "description": "ID defines resourceID for diskEncryptionSet resource. It must be in the same subscription",
                                "type": "string"
                              }
                            },
                            "type": "object",
                            "additionalProperties": false
                          },
                          "storageAccountType": {
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "nameSuffix": {
                        "description": "NameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format <machineName>_<nameSuffix>.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "diskSizeGB",
                      "nameSuffix"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "enableIPForwarding": {
                  "description": "EnableIPForwarding enables IP Forwarding in Azure which is required for some CNI's to send traffic from a pods on one machine to another. This is required for IpV6 with Calico in combination with User Defined Routes (set by the Azure Cloud Controller manager). Default is false for disabled.",
                  "type": "boolean"
                },
                "failureDomain": {
                  "description": "FailureDomain is the failure domain unique identifier this Machine should be attached to, as defined in Cluster API. This relates to an Azure Availability Zone",
                  "type": "string"
                },
                "identity": {
                  "default": "None",
                  "description": "Identity is the type of identity used for the virtual machine. The type 'SystemAssigned' is an implicitly created identity. The generated identity will be assigned a Subscription contributor role. The type 'UserAssigned' is a standalone Azure resource provided by the user and assigned to the VM",
                  "enum": [
                    "None",
                    "SystemAssigned",
                    "UserAssigned"
                  ],
                  "type": "string"
                },
                "image": {
                  "description": "Image is used to provide details of an image to use during VM creation. If image details are omitted the image will default the Azure Marketplace \"capi\" offer, which is based on Ubuntu.",
                  "properties": {
                    "id": {
                      "description": "ID specifies an image to use by ID",
                      "type": "string"
                    },
                    "marketplace": {
                      "description": "Marketplace specifies an image to use from the Azure Marketplace",
                      "properties": {
                        "offer": {
                          "description": "Offer specifies the name of a group of related images created by the publisher. For example, UbuntuServer, WindowsServer",
                          "minLength": 1,
                          "type": "string"
                        },
                        "publisher": {
                          "description": "Publisher is the name of the organization that created the image",
                          "minLength": 1,
                          "type": "string"
                        },
                        "sku": {
                          "description": "SKU specifies an instance of an offer, such as a major release of a distribution. For example, 18.04-LTS, 2019-Datacenter",
                          "minLength": 1,
                          "type": "string"
                        },
                        "thirdPartyImage": {
                          "default": false,
                          "description": "ThirdPartyImage indicates the image is published by a third party publisher and a Plan will be generated for it.",
                          "type": "boolean"
                        },
                        "version": {
                          "description": "Version specifies the version of an image sku. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.",
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "offer",
                        "publisher",
                        "sku",
                        "version"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "sharedGallery": {
                      "description": "SharedGallery specifies an image to use from an Azure Shared Image Gallery",
                      "properties": {
                        "gallery": {
                          "description": "Gallery specifies the name of the shared image gallery that contains the image",
                          "minLength": 1,
                          "type": "string"
                        },
                        "name": {
                          "description": "Name is the name of the image",
                          "minLength": 1,
                          "type": "string"
                        },
                        "offer": {
                          "description": "Offer specifies the name of a group of related images created by the publisher. For example, UbuntuServer, WindowsServer This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. This is needed when the source image from which this SIG image was built requires the `Plan` to be used.",
                          "type": "string"
                        },
                        "publisher": {
                          "description": "Publisher is the name of the organization that created the image. This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. This is needed when the source image from which this SIG image was built requires the `Plan` to be used.",
                          "type": "string"
                        },
                        "resourceGroup": {
                          "description": "ResourceGroup specifies the resource group containing the shared image gallery",
                          "minLength": 1,
                          "type": "string"
                        },
                        "sku": {
                          "description": "SKU specifies an instance of an offer, such as a major release of a distribution. For example, 18.04-LTS, 2019-Datacenter This value will be used to add a `Plan` in the API request when creating the VM/VMSS resource. This is needed when the source image from which this SIG image was built requires the `Plan` to be used.",
                          "type": "string"
                        },
                        "subscriptionID": {
                          "description": "SubscriptionID is the identifier of the subscription that contains the shared image gallery",
                          "minLength": 1,
                          "type": "string"
                        },
                        "version": {
                          "description": "Version specifies the version of the marketplace image. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.",
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "required": [
                        "gallery",
                        "name",
                        "resourceGroup",
                        "subscriptionID",
                        "version"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "osDisk": {
                  "description": "OSDisk specifies the parameters for the operating system disk of the machine",
                  "properties": {
                    "cachingType": {
                      "description": "CachingType specifies the caching requirements.",
                      "enum": [
                        "None",
                        "ReadOnly",
                        "ReadWrite"
                      ],
                      "type": "string"
                    },
                    "diffDiskSettings": {
                      "description": "DiffDiskSettings describe ephemeral disk settings for the os disk.",
                      "properties": {
                        "option": {
                          "description": "Option enables ephemeral OS when set to \"Local\" See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details",
                          "enum": [
                            "Local"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "option"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "diskSizeGB": {
                      "description": "DiskSizeGB is the size in GB to assign to the OS disk. Will have a default of 30GB if not provided",
                      "format": "int32",
                      "type": "integer"
                    },
                    "managedDisk": {
                      "description": "ManagedDisk specifies the Managed Disk parameters for the OS disk.",
                      "properties": {
                        "diskEncryptionSet": {
                          "description": "DiskEncryptionSetParameters defines disk encryption options.",
                          "properties": {
                            "id": {
                              "description": "ID defines resourceID for diskEncryptionSet resource. It must be in the same subscription",
                              "type": "string"
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "storageAccountType": {
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "osType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "osType"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "providerID": {
                  "description": "ProviderID is the unique identifier as specified by the cloud provider.",
                  "type": "string"
                },
                "roleAssignmentName": {
                  "description": "RoleAssignmentName is the name of the role assignment to create for a system assigned identity. It can be any valid GUID. If not specified, a random GUID will be generated.",
                  "type": "string"
                },
                "securityProfile": {
                  "description": "SecurityProfile specifies the Security profile settings for a virtual machine.",
                  "properties": {
                    "encryptionAtHost": {
                      "description": "This field indicates whether Host Encryption should be enabled or disabled for a virtual machine or virtual machine scale set. Default is disabled.",
                      "type": "boolean"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "spotVMOptions": {
                  "description": "SpotVMOptions allows the ability to specify the Machine should use a Spot VM",
                  "properties": {
                    "maxPrice": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances",
                      "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
                      "x-kubernetes-int-or-string": true
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "sshPublicKey": {
                  "type": "string"
                },
                "subnetName": {
                  "description": "SubnetName selects the Subnet where the VM will be placed",
                  "type": "string"
                },
                "userAssignedIdentities": {
                  "description": "UserAssignedIdentities is a list of standalone Azure identities provided by the user The lifecycle of a user-assigned identity is managed separately from the lifecycle of the AzureMachine. See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-cli",
                  "items": {
                    "description": "UserAssignedIdentity defines the user-assigned identities provided by the user to be assigned to Azure resources.",
                    "properties": {
                      "providerID": {
                        "description": "ProviderID is the identification ID of the user-assigned Identity, the format of an identity is: 'azure:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'",
                        "type": "string"
                      }
                    },
                    "required": [
                      "providerID"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "vmSize": {
                  "type": "string"
                }
              },
              "required": [
                "osDisk",
                "sshPublicKey",
                "vmSize"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "spec"
          ],
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "template"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
