From 4d248776bcc008543a5834b5b8b5dad904d3862a Mon Sep 17 00:00:00 2001 From: Jared Edwards Date: Thu, 19 Oct 2023 17:10:08 -0600 Subject: [PATCH] Vultr tf env var (#208) * add vultr cluster managemeent adjustments * vultr api key --- extensions/vultr/env.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/vultr/env.go b/extensions/vultr/env.go index 2a5327bc..f4db15eb 100644 --- a/extensions/vultr/env.go +++ b/extensions/vultr/env.go @@ -35,7 +35,7 @@ func GetVultrTerraformEnvs(envs map[string]string, cl *pkgtypes.Cluster) map[str envs["AWS_SECRET_ACCESS_KEY"] = cl.StateStoreCredentials.SecretAccessKey envs["TF_VAR_aws_access_key_id"] = cl.StateStoreCredentials.AccessKeyID envs["TF_VAR_aws_secret_access_key"] = cl.StateStoreCredentials.SecretAccessKey - envs["AWS_SESSION_TOKEN"] = "" // allows for debugging + envs["AWS_SESSION_TOKEN"] = "" // allows for debugging envs["TF_VAR_aws_session_token"] = "" // allows for debugging //envs["TF_LOG"] = "debug" @@ -52,7 +52,7 @@ func GetGithubTerraformEnvs(envs map[string]string, cl *pkgtypes.Cluster) map[st envs["AWS_SECRET_ACCESS_KEY"] = cl.StateStoreCredentials.SecretAccessKey envs["TF_VAR_aws_access_key_id"] = cl.StateStoreCredentials.AccessKeyID envs["TF_VAR_aws_secret_access_key"] = cl.StateStoreCredentials.SecretAccessKey - envs["AWS_SESSION_TOKEN"] = "" // allows for debugging + envs["AWS_SESSION_TOKEN"] = "" // allows for debugging envs["TF_VAR_aws_session_token"] = "" // allows for debugging return envs @@ -71,7 +71,7 @@ func GetGitlabTerraformEnvs(envs map[string]string, gid int, cl *pkgtypes.Cluste envs["TF_VAR_aws_secret_access_key"] = cl.StateStoreCredentials.SecretAccessKey envs["TF_VAR_owner_group_id"] = strconv.Itoa(gid) envs["TF_VAR_gitlab_owner"] = cl.GitAuth.Owner - envs["AWS_SESSION_TOKEN"] = "" // allows for debugging + envs["AWS_SESSION_TOKEN"] = "" // allows for debugging envs["TF_VAR_aws_session_token"] = "" // allows for debugging return envs @@ -87,7 +87,7 @@ func GetUsersTerraformEnvs(clientset *kubernetes.Clientset, cl *pkgtypes.Cluster envs["AWS_SECRET_ACCESS_KEY"] = cl.StateStoreCredentials.SecretAccessKey envs["TF_VAR_aws_access_key_id"] = cl.StateStoreCredentials.AccessKeyID envs["TF_VAR_aws_secret_access_key"] = cl.StateStoreCredentials.SecretAccessKey - envs["AWS_SESSION_TOKEN"] = "" // allows for debugging + envs["AWS_SESSION_TOKEN"] = "" // allows for debugging envs["TF_VAR_aws_session_token"] = "" // allows for debugging return envs @@ -102,7 +102,7 @@ func GetVaultTerraformEnvs(clientset *kubernetes.Clientset, cl *pkgtypes.Cluster envs[fmt.Sprintf("TF_VAR_%s_token", cl.GitProvider)] = cl.GitAuth.Token envs["VAULT_ADDR"] = providerConfigs.VaultPortForwardURL envs["VAULT_TOKEN"] = readVaultTokenFromSecret(clientset) - envs["TF_VAR_vultr_token"] = cl.VultrAuth.Token + envs["TF_VAR_vultr_api_key"] = cl.VultrAuth.Token envs["TF_VAR_atlantis_repo_webhook_secret"] = cl.AtlantisWebhookSecret envs["TF_VAR_atlantis_repo_webhook_url"] = cl.AtlantisWebhookURL envs["TF_VAR_kbot_ssh_private_key"] = cl.GitAuth.PrivateKey @@ -112,7 +112,7 @@ func GetVaultTerraformEnvs(clientset *kubernetes.Clientset, cl *pkgtypes.Cluster envs["AWS_SECRET_ACCESS_KEY"] = cl.StateStoreCredentials.SecretAccessKey envs["TF_VAR_aws_access_key_id"] = cl.StateStoreCredentials.AccessKeyID envs["TF_VAR_aws_secret_access_key"] = cl.StateStoreCredentials.SecretAccessKey - envs["AWS_SESSION_TOKEN"] = "" // allows for debugging + envs["AWS_SESSION_TOKEN"] = "" // allows for debugging envs["TF_VAR_aws_session_token"] = "" // allows for debugging switch cl.GitProvider {