azure

package
v0.0.0-...-1aa1ecb Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

README

To test Azure

You will first need to create a Azure instance and then provide details of this instance as below.

If you are running the tests on an instance under scale set, only then you need to provide AZURE_SCALE_SET_NAME. Also you will have to provide the instance id (index in scale set) for AZURE_INSTANCE_ID instead of the instance name.

export AZURE_INSTANCE_ID=<instance-id>
export AZURE_INSTANCE_REGION=<instance-region>
export AZURE_SCALE_SET_NAME=<scale-set-name>
export AZURE_SUBSCRIPTION_ID=<subscription-id>
export AZURE_RESOURCE_GROUP_NAME=<resource-group-name-of-instance>
export AZURE_ENVIRONMENT=<azure-cloud-environment>
export AZURE_TENANT_ID=<tenant-id>
export AZURE_CLIENT_ID=<client-id>
export AZURE_CLIENT_SECRET=<client-secret>
go test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config Config) (cloudops.Ops, error)

NewClient creates new client from specified config.

func NewClientFromMetadata

func NewClientFromMetadata() (cloudops.Ops, error)

NewClientFromMetadata initializes cloudops driver for azure based on environment variables or based on instance metadata info available inside Azure VM

func NewEnvClient

func NewEnvClient() (cloudops.Ops, error)

NewEnvClient make new client from well known environment variables.

Types

type Config

type Config struct {
	InstanceID         string
	ScaleSetName       string
	SubscriptionID     string
	ResourceGroupName  string
	CloudEnvironment   string
	ManagedClusterName string
	AgentPoolName      string
	UserAgent          string
}

Config contains everything needed to create an Azure client. Only instanceID, subscriptionID and resourceGroupName are required, others are optional based on the required type of client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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