diff --git a/cmd/aws/create.go b/cmd/aws/create.go index 0d97f9144..9375e4f3f 100644 --- a/cmd/aws/create.go +++ b/cmd/aws/create.go @@ -1368,7 +1368,7 @@ func createAws(cmd *cobra.Command, args []string) error { } if viper.GetString("flags.dns-provider") == "cloudflare" { - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken } else { tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder" @@ -1395,7 +1395,7 @@ func createAws(cmd *cobra.Command, args []string) error { //dns provider secret to be stored in vault for external dns lifecycle switch dnsProviderFlag { case "cloudflare": - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken default: tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = "This is not used, role used instead" //Not strictly used. We use a role in GCP but keeping this here for consistency } diff --git a/cmd/civo/create.go b/cmd/civo/create.go index 93c0de4d3..1349837c9 100644 --- a/cmd/civo/create.go +++ b/cmd/civo/create.go @@ -1250,7 +1250,7 @@ func createCivo(cmd *cobra.Command, args []string) error { } if viper.GetString("flags.dns-provider") == "cloudflare" { - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken } else { tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CivoToken @@ -1263,7 +1263,7 @@ func createCivo(cmd *cobra.Command, args []string) error { //dns provider secret to be stored in vault for external dns lifecycle switch dnsProviderFlag { case "cloudflare": - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken default: tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CivoToken } diff --git a/cmd/digitalocean/create.go b/cmd/digitalocean/create.go index b07142712..e478205eb 100644 --- a/cmd/digitalocean/create.go +++ b/cmd/digitalocean/create.go @@ -1236,7 +1236,7 @@ func createDigitalocean(cmd *cobra.Command, args []string) error { } if viper.GetString("flags.dns-provider") == "cloudflare" { - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken } else { tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder" @@ -1249,7 +1249,7 @@ func createDigitalocean(cmd *cobra.Command, args []string) error { //dns provider secret to be stored in vault for external dns lifecycle switch dnsProviderFlag { case "cloudflare": - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken default: tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.DigitaloceanToken } diff --git a/cmd/gcp/create.go b/cmd/gcp/create.go index 7ea1d966d..5e0866d19 100644 --- a/cmd/gcp/create.go +++ b/cmd/gcp/create.go @@ -1241,7 +1241,7 @@ func createGCP(cmd *cobra.Command, args []string) error { //dns provider secret to be stored in vault for external dns lifecycle switch dnsProviderFlag { case "cloudflare": - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken default: tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = string(a) //Not strictly used. We use a role in GCP but keeping this here for consistency } diff --git a/cmd/vultr/create.go b/cmd/vultr/create.go index fced1d0f4..fd782a6c5 100644 --- a/cmd/vultr/create.go +++ b/cmd/vultr/create.go @@ -1236,7 +1236,7 @@ func createVultr(cmd *cobra.Command, args []string) error { if viper.GetString("flags.dns-provider") == "cloudflare" { tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken } else { tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder" } @@ -1248,7 +1248,7 @@ func createVultr(cmd *cobra.Command, args []string) error { //dns provider secret to be stored in vault for external dns lifecycle switch dnsProviderFlag { case "cloudflare": - tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken + tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken default: tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.VultrToken }