azure_login

package
v2.46.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Login

type Login struct {
	// contains filtered or unexported fields
}

func New

func New(executor commands.Executor) *Login

New creates a new Login instance by relying on Viper for necessary configuration. Supported viper flags are:

  • service-principal-id
  • service-principal-secret
  • service-principal-tenant
  • user-assigned-managed-identity-client-id
  • managed-identity-tenant-id
  • use-managed-identity

func NewWithParams

func NewWithParams(executor commands.Executor, servicePrincipalId string, servicePrincipalSecret string, servicePrincipalTenantId string, userAssignedManagedIdentityClientId string, managedIdentityTenantId string, useManagedIdentity bool) *Login

NewWithParams creates a new Login instance with the ability to provide all parameters directly

func (*Login) Login

func (l *Login) Login() error

Login logs the currently configured user in AzureCLI and Terraform

Attempts the login in the following order if configured:

  • user assigned managed identity
  • system assigned managed identity
  • service principal
  • normal user login

func (*Login) SetSubscription

func (l *Login) SetSubscription(subscriptionId string) error

SetSubscription sets the current Azure subscription on the running system (for Azure CLI & Terraform)

Jump to

Keyboard shortcuts

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