Documentation ¶
Index ¶
Constants ¶
View Source
const ( UCPCredentialAuth = "UCPCredential" ServicePrincipalAuth = "ServicePrincipal" ManagedIdentityAuth = "ManagedIdentity" CliAuth = "CLI" )
Authentication methods
Variables ¶
This section is empty.
Functions ¶
func GetAuthMethod ¶
func GetAuthMethod() string
GetAuthMethod returns the authentication method to use based on environment variables.
func IsServicePrincipalConfigured ¶
IsServicePrincipalConfigured checks if ServicePrincipalAuth is the authentication method configured.
func NewARMCredential ¶
func NewARMCredential(opt *Options) (azcore.TokenCredential, error)
NewARMCredential evaluates the authentication method and returns the appropriate credential.
Types ¶
type ArmConfig ¶
type ArmConfig struct { // ClientOptions is the client options for Azure SDK client. ClientOptions clientv2.Options }
ArmConfig is the configuration we use for managing ARM resources
func NewArmConfig ¶
NewArmConfig creates a new ArmConfig instance with the given options, or default options if none are provided, and returns it or an error if one occurs.
type Options ¶
type Options struct { // CredentialProvider is an UCP credential client for Azure service principal. CredentialProvider sdk_cred.CredentialProvider[sdk_cred.AzureCredential] }
Options represents the options of ArmConfig.
Click to show internal directories.
Click to hide internal directories.