azure

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	User           *User  `json:"user"`
	TenantID       string `json:"tenantId" envconfig:"TENANT_ID" required:"true"`
	SubscriptionID string `json:"id" envconfig:"SUBSCRIPTION_ID" required:"true"`
	ResourceGroup  ResourceGroup
	Deployment     Deployment
}

Account holds the values needed to talk to the Azure API

func GetCurrentAccount

func GetCurrentAccount() (*Account, error)

GetCurrentAccount will run an az account show and parse that into an account strcut

func NewAccount

func NewAccount() (*Account, error)

NewAccount will parse env vars and return a new struct

func (*Account) CreateDeployment

func (a *Account) CreateDeployment(name string, e *engine.Engine) error

CreateDeployment will deploy a cluster to a given resource group using the template and parameters on disk

func (*Account) CreateGroup

func (a *Account) CreateGroup(name, location string) error

CreateGroup will create a resource group in a given location

func (*Account) DeleteGroup

func (a *Account) DeleteGroup() error

DeleteGroup delets a given resource group by name

func (*Account) Login

func (a *Account) Login() error

Login will login to a given subscription

func (*Account) SetSubscription

func (a *Account) SetSubscription() error

SetSubscription will call az account set --subscription for the given Account

type Deployment

type Deployment struct {
	Name              string // Name of the deployment
	TemplateDirectory string // engine.GeneratedDefinitionPath
}

Deployment represents a deployment of an acs cluster

type ResourceGroup

type ResourceGroup struct {
	Name     string
	Location string
}

ResourceGroup represents a collection of azure resources

type User

type User struct {
	ID     string `json:"name" envconfig:"CLIENT_ID" required:"true"`
	Secret string `envconfig:"CLIENT_SECRET" required:"true"`
	Type   string `json:"type"`
}

User represents the user currently logged into an Account

Jump to

Keyboard shortcuts

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