Skip to content

Commit

Permalink
FT WI
Browse files Browse the repository at this point in the history
Signed-off-by: willdavsmith <[email protected]>
  • Loading branch information
willdavsmith committed Aug 8, 2024
1 parent bdfb399 commit 7356e43
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/azure/armauth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func NewARMCredential(opt *Options) (azcore.TokenCredential, error) {
// https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=go#azure-identity-client-libraries
switch authMethod {
case UCPCredentialAuth:
fmt.Println("willsmith: Using UCP credential")
return azcred.NewUCPCredential(azcred.UCPCredentialOptions{
Provider: opt.CredentialProvider,
})
Expand All @@ -81,7 +82,6 @@ func NewARMCredential(opt *Options) (azcore.TokenCredential, error) {
case ManagedIdentityAuth:
return azidentity.NewManagedIdentityCredential(nil)
case WorkloadIdentityAuth:
fmt.Println("made it to auth.go 1")
return azidentity.NewDefaultAzureCredential(nil)
default:
return azidentity.NewAzureCLICredential(nil)
Expand All @@ -90,7 +90,6 @@ func NewARMCredential(opt *Options) (azcore.TokenCredential, error) {

// GetAuthMethod returns the authentication method to use based on environment variables.
func GetAuthMethod() string {
fmt.Println("made it to auth.go 2")
// Allow explicit configuration of the auth method, and fall back
// to auto-detection if unspecified
authMethod := os.Getenv("ARM_AUTH_METHOD")
Expand Down
2 changes: 1 addition & 1 deletion pkg/azure/clientv2/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
// GetResourceGroupLocation retrieves the location of a given resource group from an Azure subscription. It returns an
// error if the resource group or the subscription cannot be found.
func GetResourceGroupLocation(ctx context.Context, subscriptionID string, resourceGroupName string, options *Options) (*string, error) {
fmt.Println("made it to common.go 1")
fmt.Printf("made it to common.go 12: %+v\n", options.Cred)
fmt.Println(options)
client, err := NewResourceGroupsClient(subscriptionID, options)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0.0"
version = "=3.7.0"
}
}
}
Expand Down

0 comments on commit 7356e43

Please sign in to comment.