azureshared

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gcpshared contains code to parse and define data types relevant for Microsoft Azure.

This package is intended to have a minimal size and surface. If you have Azure related code that is not shared by multiple applications, or if the code interacts with the GCP API, please keep the code in the application's internal package or add it to the Azure cloud package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicsFromProviderID

func BasicsFromProviderID(providerID string) (subscriptionID, resourceGroup string, err error)

BasicsFromProviderID extracts subscriptionID and resourceGroup from both types of valid azure providerID.

func ScaleSetInformationFromProviderID

func ScaleSetInformationFromProviderID(providerID string) (subscriptionID, resourceGroup, scaleSet, instanceID string, err error)

ScaleSetInformationFromProviderID splits a provider's id belonging to an azure scaleset into core components. A providerID for scale set VMs is build after the following schema: - 'azure:///subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/virtualMachineScaleSets/<scale-set-name>/virtualMachines/<instance-id>'

Types

type ApplicationCredentials

type ApplicationCredentials struct {
	TenantID          string
	AppClientID       string
	ClientSecretValue string
	Location          string
}

ApplicationCredentials is a set of Azure AD application credentials. It is the equivalent of a service account key in other cloud providers.

func ApplicationCredentialsFromURI

func ApplicationCredentialsFromURI(cloudServiceAccountURI string) (ApplicationCredentials, error)

ApplicationCredentialsFromURI converts a cloudServiceAccountURI into Azure ApplicationCredentials.

func (ApplicationCredentials) ToCloudServiceAccountURI

func (c ApplicationCredentials) ToCloudServiceAccountURI() string

ToCloudServiceAccountURI converts the ApplicationCredentials into a cloud service account URI.

Jump to

Keyboard shortcuts

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