Skip to content

Commit

Permalink
fix sqs url for china
Browse files Browse the repository at this point in the history
  • Loading branch information
haugenj committed Apr 9, 2021
1 parent 7fa7338 commit fe7c9a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion upup/pkg/fi/cloudup/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
if cluster.Spec.NodeTerminationHandler != nil {
dest["DefaultQueueName"] = func() string {
s := strings.Replace(tf.ClusterName(), ".", "-", -1)
url := "https://sqs." + tf.Region + ".amazonaws.com/" + tf.AWSAccountID + "/" + s + "-nth"
domain := ".amazonaws.com/"
if strings.Contains(tf.Region, "cn-") {
domain = ".amazonaws.com.cn/"
}
url := "https://sqs." + tf.Region + domain + tf.AWSAccountID + "/" + s + "-nth"
return url
}
}
Expand Down

0 comments on commit fe7c9a4

Please sign in to comment.