github.com/rahart/packer@v0.12.2-0.20161229105310-282bb6ad370f/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  /////////////////////////////////////////////////
    39  // Template > Resource > Properties
    40  type Properties struct {
    41  	AccessPolicies               *[]AccessPolicies                   `json:"accessPolicies,omitempty"`
    42  	AddressSpace                 *network.AddressSpace               `json:"addressSpace,omitempty"`
    43  	DiagnosticsProfile           *compute.DiagnosticsProfile         `json:"diagnosticsProfile,omitempty"`
    44  	DNSSettings                  *network.PublicIPAddressDNSSettings `json:"dnsSettings,omitempty"`
    45  	EnabledForDeployment         *string                             `json:"enabledForDeployment,omitempty"`
    46  	EnabledForTemplateDeployment *string                             `json:"enabledForTemplateDeployment,omitempty"`
    47  	HardwareProfile              *compute.HardwareProfile            `json:"hardwareProfile,omitempty"`
    48  	IPConfigurations             *[]network.IPConfiguration          `json:"ipConfigurations,omitempty"`
    49  	NetworkProfile               *compute.NetworkProfile             `json:"networkProfile,omitempty"`
    50  	OsProfile                    *compute.OSProfile                  `json:"osProfile,omitempty"`
    51  	PublicIPAllocatedMethod      *network.IPAllocationMethod         `json:"publicIPAllocationMethod,omitempty"`
    52  	Sku                          *Sku                                `json:"sku,omitempty"`
    53  	StorageProfile               *compute.StorageProfile             `json:"storageProfile,omitempty"`
    54  	Subnets                      *[]network.Subnet                   `json:"subnets,omitempty"`
    55  	TenantId                     *string                             `json:"tenantId,omitempty"`
    56  	Value                        *string                             `json:"value,omitempty"`
    57  }
    58  
    59  type AccessPolicies struct {
    60  	ObjectId    *string      `json:"objectId,omitempty"`
    61  	TenantId    *string      `json:"tenantId,omitempty"`
    62  	Permissions *Permissions `json:"permissions,omitempty"`
    63  }
    64  
    65  type Permissions struct {
    66  	Keys    *[]string `json:"keys,omitempty"`
    67  	Secrets *[]string `json:"secrets,omitempty"`
    68  }
    69  
    70  type Sku struct {
    71  	Family *string `json:"family,omitempty"`
    72  	Name   *string `json:"name,omitempty"`
    73  }