github.com/mmcquillan/packer@v1.1.1-0.20171009221028-c85cf0483a5d/builder/azure/common/template/template.go (about) 1 package template 2 3 import ( 4 "github.com/Azure/azure-sdk-for-go/arm/compute" 5 "github.com/Azure/azure-sdk-for-go/arm/network" 6 ) 7 8 ///////////////////////////////////////////////// 9 // Template 10 type Template struct { 11 Schema *string `json:"$schema"` 12 ContentVersion *string `json:"contentVersion"` 13 Parameters *map[string]Parameters `json:"parameters"` 14 Variables *map[string]string `json:"variables"` 15 Resources *[]Resource `json:"resources"` 16 } 17 18 ///////////////////////////////////////////////// 19 // Template > Parameters 20 type Parameters struct { 21 Type *string `json:"type"` 22 DefaultValue *string `json:"defaultValue,omitempty"` 23 } 24 25 ///////////////////////////////////////////////// 26 // Template > Resource 27 type Resource struct { 28 ApiVersion *string `json:"apiVersion"` 29 Name *string `json:"name"` 30 Type *string `json:"type"` 31 Location *string `json:"location,omitempty"` 32 DependsOn *[]string `json:"dependsOn,omitempty"` 33 Properties *Properties `json:"properties,omitempty"` 34 Tags *map[string]*string `json:"tags,omitempty"` 35 Resources *[]Resource `json:"resources,omitempty"` 36 } 37 38 type OSDiskUnion struct { 39 OsType compute.OperatingSystemTypes `json:"osType,omitempty"` 40 OsState compute.OperatingSystemStateTypes `json:"osState,omitempty"` 41 BlobURI *string `json:"blobUri,omitempty"` 42 Name *string `json:"name,omitempty"` 43 Vhd *compute.VirtualHardDisk `json:"vhd,omitempty"` 44 Image *compute.VirtualHardDisk `json:"image,omitempty"` 45 Caching compute.CachingTypes `json:"caching,omitempty"` 46 CreateOption compute.DiskCreateOptionTypes `json:"createOption,omitempty"` 47 DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` 48 ManagedDisk *compute.ManagedDiskParameters `json:"managedDisk,omitempty"` 49 } 50 51 // Union of the StorageProfile and ImageStorageProfile types. 52 type StorageProfileUnion struct { 53 ImageReference *compute.ImageReference `json:"imageReference,omitempty"` 54 OsDisk *OSDiskUnion `json:"osDisk,omitempty"` 55 } 56 57 ///////////////////////////////////////////////// 58 // Template > Resource > Properties 59 type Properties struct { 60 AccessPolicies *[]AccessPolicies `json:"accessPolicies,omitempty"` 61 AddressSpace *network.AddressSpace `json:"addressSpace,omitempty"` 62 DiagnosticsProfile *compute.DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 63 DNSSettings *network.PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"` 64 EnabledForDeployment *string `json:"enabledForDeployment,omitempty"` 65 EnabledForTemplateDeployment *string `json:"enabledForTemplateDeployment,omitempty"` 66 HardwareProfile *compute.HardwareProfile `json:"hardwareProfile,omitempty"` 67 IPConfigurations *[]network.IPConfiguration `json:"ipConfigurations,omitempty"` 68 NetworkProfile *compute.NetworkProfile `json:"networkProfile,omitempty"` 69 OsProfile *compute.OSProfile `json:"osProfile,omitempty"` 70 PublicIPAllocatedMethod *network.IPAllocationMethod `json:"publicIPAllocationMethod,omitempty"` 71 Sku *Sku `json:"sku,omitempty"` 72 //StorageProfile3 *compute.StorageProfile `json:"storageProfile,omitempty"` 73 StorageProfile *StorageProfileUnion `json:"storageProfile,omitempty"` 74 Subnets *[]network.Subnet `json:"subnets,omitempty"` 75 TenantId *string `json:"tenantId,omitempty"` 76 Value *string `json:"value,omitempty"` 77 } 78 79 type AccessPolicies struct { 80 ObjectId *string `json:"objectId,omitempty"` 81 TenantId *string `json:"tenantId,omitempty"` 82 Permissions *Permissions `json:"permissions,omitempty"` 83 } 84 85 type Permissions struct { 86 Keys *[]string `json:"keys,omitempty"` 87 Secrets *[]string `json:"secrets,omitempty"` 88 } 89 90 type Sku struct { 91 Family *string `json:"family,omitempty"` 92 Name *string `json:"name,omitempty"` 93 }