armtemplates

package
v0.0.0-...-d7a40b3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Schema defines a resource group schema.
	Schema = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
	// SubscriptionSchema defines a subscription schema.
	SubscriptionSchema = "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	APIVersion string                             `json:"apiVersion"`
	Type       string                             `json:"type"`
	Name       string                             `json:"name"`
	Location   string                             `json:"location,omitempty"`
	Tags       map[string]string                  `json:"tags,omitempty"`
	Comments   string                             `json:"comments,omitempty"`
	DependsOn  []string                           `json:"dependsOn,omitempty"`
	Properties any                                `json:"properties,omitempty"`
	Identity   *armcompute.VirtualMachineIdentity `json:"identity,omitempty"`
	Resources  []Resource                         `json:"resources,omitempty"`

	// Non-uniform attributes.
	Sku *Sku `json:"sku,omitempty"`
}

Resource describes a template resource. For information on the individual fields, see https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/.

type Sku

type Sku struct {
	Name string `json:"name,omitempty"`
}

Sku represents an Azure SKU. Each API (compute/networking/storage) defines its own SKU types, but we use a common type because we don't require many fields.

type Template

type Template struct {
	// Schema defines a subscription schema or resource group schema.
	Schema string
	// Resources contains the definitions of resources that will
	// be created by the template.
	Resources []Resource `json:"resources"`
	// Parameters contains the values of whatever parameters
	// are used by the template.
	Parameters any `json:"parameters,omitempty"`
}

Template represents an Azure Resource Manager (ARM) Template. See: https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/

func (*Template) Map

func (t *Template) Map() (map[string]any, error)

Map returns the template as a map, suitable for use in azure-sdk-for-go/arm/resources/resources/DeploymentProperties.Template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL