mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-18 09:21:56 +08:00
fix: #841
This commit is contained in:
parent
9e4b7691ce
commit
37e0188db7
@ -5,7 +5,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"strings"
|
||||
|
||||
aliopen "github.com/alibabacloud-go/darabonba-openapi/v2/client"
|
||||
alislb "github.com/alibabacloud-go/slb-20140515/v4/client"
|
||||
@ -13,7 +12,6 @@ import (
|
||||
|
||||
"github.com/certimate-go/certimate/pkg/core"
|
||||
sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-slb"
|
||||
"github.com/certimate-go/certimate/pkg/utils/ifelse"
|
||||
)
|
||||
|
||||
type SSLDeployerProviderConfig struct {
|
||||
@ -61,10 +59,7 @@ func NewSSLDeployerProvider(config *SSLDeployerProviderConfig) (*SSLDeployerProv
|
||||
AccessKeyId: config.AccessKeyId,
|
||||
AccessKeySecret: config.AccessKeySecret,
|
||||
ResourceGroupId: config.ResourceGroupId,
|
||||
Region: ifelse.
|
||||
If[string](config.Region == "" || strings.HasPrefix(config.Region, "cn-")).
|
||||
Then("cn-hangzhou").
|
||||
Else("ap-southeast-1"),
|
||||
Region: config.Region,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not create ssl manager: %w", err)
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"github.com/alibabacloud-go/tea/tea"
|
||||
|
||||
"github.com/certimate-go/certimate/pkg/core"
|
||||
sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-slb"
|
||||
sslmgrsp "github.com/certimate-go/certimate/pkg/core/ssl-manager/providers/aliyun-cas"
|
||||
"github.com/certimate-go/certimate/pkg/utils/ifelse"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user