mirror of https://github.com/certd/certd
fix: 腾讯云授权支持设置是否国际站,部署到EO插件支持国际站
parent
65dcae79f8
commit
5cd3968929
|
@ -8,8 +8,7 @@ import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
||||||
export class TencentAccess extends BaseAccess {
|
export class TencentAccess extends BaseAccess {
|
||||||
@AccessInput({
|
@AccessInput({
|
||||||
title: "secretId",
|
title: "secretId",
|
||||||
helper:
|
helper: "使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建",
|
||||||
"使用对应的插件需要有对应的权限,比如上传证书,需要证书管理权限;部署到clb需要clb相关权限\n前往[密钥管理](https://console.cloud.tencent.com/cam/capi)进行创建",
|
|
||||||
component: {
|
component: {
|
||||||
placeholder: "secretId",
|
placeholder: "secretId",
|
||||||
},
|
},
|
||||||
|
@ -25,4 +24,29 @@ export class TencentAccess extends BaseAccess {
|
||||||
rules: [{ required: true, message: "该项必填" }],
|
rules: [{ required: true, message: "该项必填" }],
|
||||||
})
|
})
|
||||||
secretKey = "";
|
secretKey = "";
|
||||||
|
|
||||||
|
@AccessInput({
|
||||||
|
title: "站点类型",
|
||||||
|
value: "cn",
|
||||||
|
component: {
|
||||||
|
name: "a-select",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "国内站",
|
||||||
|
value: "cn",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "国际站",
|
||||||
|
value: "intl",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
encrypt: true,
|
||||||
|
rules: [{ required: true, message: "该项必填" }],
|
||||||
|
})
|
||||||
|
accountType: string;
|
||||||
|
|
||||||
|
isIntl() {
|
||||||
|
return this.accountType === "intl";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin {
|
||||||
getClient(accessProvider: TencentAccess) {
|
getClient(accessProvider: TencentAccess) {
|
||||||
const TeoClient = this.Client;
|
const TeoClient = this.Client;
|
||||||
|
|
||||||
|
const endpoint = accessProvider.isIntl()?"teo.intl.tencentcloudapi.com": "teo.tencentcloudapi.com";
|
||||||
const clientConfig = {
|
const clientConfig = {
|
||||||
credential: {
|
credential: {
|
||||||
secretId: accessProvider.secretId,
|
secretId: accessProvider.secretId,
|
||||||
|
@ -97,7 +98,7 @@ export class DeployCertToTencentEO extends AbstractTaskPlugin {
|
||||||
region: '',
|
region: '',
|
||||||
profile: {
|
profile: {
|
||||||
httpProfile: {
|
httpProfile: {
|
||||||
endpoint: 'teo.tencentcloudapi.com',
|
endpoint,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue