Skip to content

Commit

Permalink
azure config for vault terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Oct 21, 2024
1 parent 4a9932c commit f860648
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/azure/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ func GetAzureTerraformEnvs(envs map[string]string, cl *pkgtypes.Cluster) map[str
envs["ARM_CLIENT_SECRET"] = cl.AzureAuth.ClientSecret
envs["ARM_TENANT_ID"] = cl.AzureAuth.TenantID
envs["ARM_SUBSCRIPTION_ID"] = cl.AzureAuth.SubscriptionID
envs["TF_VAR_arm_client_id"] = cl.AzureAuth.ClientID
envs["TF_VAR_arm_client_secret"] = cl.AzureAuth.ClientSecret
envs["TF_VAR_arm_tenant_id"] = cl.AzureAuth.TenantID
envs["TF_VAR_arm_subscription_id"] = cl.AzureAuth.SubscriptionID
envs["TF_VAR_azure_storage_account"] = cl.StateStoreCredentials.Name
envs["TF_VAR_azure_storage_access_key"] = cl.StateStoreCredentials.SecretAccessKey

return envs
}
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (clctrl *ClusterController) StateStoreCredentials() error {
return fmt.Errorf(msg)

Check failure on line 100 in internal/controller/state.go

View workflow job for this annotation

GitHub Actions / run-tests

printf: non-constant format string in call to fmt.Errorf (govet)
}

// Azure storage is not S3 compatible, but reusing this struct in a (roughly) synonymous way
stateStoreData = pkgtypes.StateStoreCredentials{
Name: clctrl.KubefirstStateStoreBucketName,
SecretAccessKey: keys.Key1,
}

Expand Down

0 comments on commit f860648

Please sign in to comment.