mirror of
https://github.com/certimate-go/certimate.git
synced 2026-06-30 21:05:12 +08:00
feat(provider): no need hostedZoneId in acme dns-01 provider aws route53
This commit is contained in:
parent
ca77ad56bb
commit
ae2682ecc2
@ -13,7 +13,7 @@ type ChallengerConfig struct {
|
||||
AccessKeyId string `json:"accessKeyId"`
|
||||
SecretAccessKey string `json:"secretAccessKey"`
|
||||
Region string `json:"region"`
|
||||
HostedZoneId string `json:"hostedZoneId"`
|
||||
HostedZoneId string `json:"hostedZoneId,omitempty"`
|
||||
DnsPropagationTimeout int `json:"dnsPropagationTimeout,omitempty"`
|
||||
DnsTTL int `json:"dnsTTL,omitempty"`
|
||||
}
|
||||
@ -27,7 +27,9 @@ func NewChallenger(config *ChallengerConfig) (certifier.ACMEChallenger, error) {
|
||||
providerConfig.AccessKeyID = config.AccessKeyId
|
||||
providerConfig.SecretAccessKey = config.SecretAccessKey
|
||||
providerConfig.Region = config.Region
|
||||
providerConfig.HostedZoneID = config.HostedZoneId
|
||||
if config.HostedZoneId != "" {
|
||||
providerConfig.HostedZoneID = config.HostedZoneId
|
||||
}
|
||||
if config.DnsPropagationTimeout != 0 {
|
||||
providerConfig.PropagationTimeout = time.Duration(config.DnsPropagationTimeout) * time.Second
|
||||
}
|
||||
|
||||
@ -320,7 +320,7 @@ func (d *Deployer) deployToWAF3WithCNAME(ctx context.Context, cloudCertId string
|
||||
RegionId: tea.String(d.config.Region),
|
||||
InstanceId: tea.String(d.config.InstanceId),
|
||||
CertId: tea.String(cloudCertId),
|
||||
TLSVersion: tea.String("tlsv1"),
|
||||
TLSVersion: tea.String("tlsv1.2"),
|
||||
EnableTLSv3: tea.Bool(true),
|
||||
}
|
||||
if describeDefaultHttpsResp.Body != nil && describeDefaultHttpsResp.Body.DefaultHttps != nil {
|
||||
|
||||
@ -31,6 +31,7 @@ const AccessConfigFormFieldsProviderCloudflare = () => {
|
||||
name={[parentNamePath, "zoneApiToken"]}
|
||||
initialValue={initialValues.zoneApiToken}
|
||||
label={t("access.form.cloudflare_zone_api_token.label")}
|
||||
extra={<span dangerouslySetInnerHTML={{ __html: t("access.form.cloudflare_zone_api_token.help") }}></span>}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("access.form.cloudflare_zone_api_token.tooltip") }}></span>}
|
||||
>
|
||||
|
||||
@ -31,6 +31,7 @@ const BizApplyNodeConfigFieldsProviderAWSRoute53 = () => {
|
||||
name={[parentNamePath, "hostedZoneId"]}
|
||||
initialValue={initialValues.hostedZoneId}
|
||||
label={t("workflow_node.apply.form.aws_route53_hosted_zone_id.label")}
|
||||
extra={t("workflow_node.apply.form.aws_route53_hosted_zone_id.help")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.apply.form.aws_route53_hosted_zone_id.tooltip") }}></span>}
|
||||
>
|
||||
@ -43,7 +44,6 @@ const BizApplyNodeConfigFieldsProviderAWSRoute53 = () => {
|
||||
const getInitialValues = (): Nullish<z.infer<ReturnType<typeof getSchema>>> => {
|
||||
return {
|
||||
region: "us-east-1",
|
||||
hostedZoneId: "",
|
||||
};
|
||||
};
|
||||
|
||||
@ -52,7 +52,7 @@ const getSchema = ({ i18n = getI18n() }: { i18n?: ReturnType<typeof getI18n> })
|
||||
|
||||
return z.object({
|
||||
region: z.string().nonempty(t("workflow_node.apply.form.aws_route53_region.placeholder")),
|
||||
hostedZoneId: z.string().nonempty(t("workflow_node.apply.form.aws_route53_hosted_zone_id.placeholder")),
|
||||
hostedZoneId: z.string().nullish(),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -191,7 +191,8 @@
|
||||
"access.form.cloudflare_dns_api_token.tooltip": "For more information, see <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a>",
|
||||
"access.form.cloudflare_zone_api_token.label": "Cloudflare Zone API token (Optional)",
|
||||
"access.form.cloudflare_zone_api_token.placeholder": "Please enter Cloudflare Zone API token",
|
||||
"access.form.cloudflare_zone_api_token.tooltip": "For more information, see <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a><br><br>Only required when you scope the DNS API token to <b>specific zones</b>. PLease scope the Zone API token to <b>all zones</b> with <i>Zone/Zone/Read</i> permission.",
|
||||
"access.form.cloudflare_zone_api_token.help": "Notes: Only required when you scope the DNS API token to <b>specific zones</b>. PLease scope the Zone API token to <b>all zones</b> with <i>Zone/Zone/Read</i> permission.",
|
||||
"access.form.cloudflare_zone_api_token.tooltip": "For more information, see <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a>",
|
||||
"access.form.cloudns_auth_id.label": "ClouDNS API user ID",
|
||||
"access.form.cloudns_auth_id.placeholder": "Please enter ClouDNS API user ID",
|
||||
"access.form.cloudns_auth_id.tooltip": "For more information, see <a href=\"https://www.cloudns.net/wiki/article/42/\" target=\"_blank\">https://www.cloudns.net/wiki/article/42/</a>",
|
||||
|
||||
@ -60,8 +60,9 @@
|
||||
"workflow_node.apply.form.aws_route53_region.label": "AWS Region",
|
||||
"workflow_node.apply.form.aws_route53_region.placeholder": "Please enter AWS Route53 region (e.g. us-east-1)",
|
||||
"workflow_node.apply.form.aws_route53_region.tooltip": "For more information, see <a href=\"https://docs.aws.amazon.com/en_us/general/latest/gr/rande.html#regional-endpoints\" target=\"_blank\">https://docs.aws.amazon.com/en_us/general/latest/gr/rande.html#regional-endpoints</a>",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.label": "AWS Route53 hosted zone ID",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.label": "AWS Route53 hosted zone ID (Optional)",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.placeholder": "Please enter AWS Route53 hosted zone ID",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.help": "Notes: Only required when there are several hosted zones with the same FQDN.",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.tooltip": "For more information, see <a href=\"https://docs.aws.amazon.com/en_us/Route53/latest/DeveloperGuide/hosted-zones-working-with.html\" target=\"_blank\">https://docs.aws.amazon.com/en_us/Route53/latest/DeveloperGuide/hosted-zones-working-with.html</a>",
|
||||
"workflow_node.apply.form.huaweicloud_dns_region.label": "Huawei Cloud region",
|
||||
"workflow_node.apply.form.huaweicloud_dns_region.placeholder": "Please enter Huawei Cloud DNS region (e.g. cn-north-1)",
|
||||
@ -170,7 +171,7 @@
|
||||
"workflow_node.monitor.form.port.placeholder": "Please enter port",
|
||||
"workflow_node.monitor.form.domain.label": "Domain (Optional)",
|
||||
"workflow_node.monitor.form.domain.placeholder": "Please enter domain name",
|
||||
"workflow_node.monitor.form.domain.help": "Notes: It is only required when the host is an IP address.",
|
||||
"workflow_node.monitor.form.domain.help": "Notes: Only required when the host is an IP address.",
|
||||
"workflow_node.monitor.form.request_path.label": "Request path (Optional)",
|
||||
"workflow_node.monitor.form.request_path.placeholder": "Please enter request path",
|
||||
|
||||
@ -201,7 +202,7 @@
|
||||
"workflow_node.deploy.form.1panel_console_auto_restart.label": "Auto restart 1Panel after deployment",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.label": "1Panel node name (Optional)",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.placeholder": "Please enter 1Panel node name",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.help": "Notes: It is only used for 1Panel v2+.",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.help": "Notes: Only used for 1Panel v2+.",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.tooltip": "You can find it on 1Panel dashboard.",
|
||||
"workflow_node.deploy.form.1panel_site_resource_type.option.website.label": "Website",
|
||||
"workflow_node.deploy.form.1panel_site_resource_type.option.certificate.label": "Certificate",
|
||||
|
||||
@ -190,7 +190,8 @@
|
||||
"access.form.cloudflare_dns_api_token.tooltip": "这是什么?请参阅 <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a>",
|
||||
"access.form.cloudflare_zone_api_token.label": "Cloudflare Zone API 令牌(可选)",
|
||||
"access.form.cloudflare_zone_api_token.placeholder": "请输入 Cloudflare Zone API 令牌",
|
||||
"access.form.cloudflare_zone_api_token.tooltip": "这是什么?请参阅 <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a><br><br>仅当你将 DNS API 令牌范围指定为<b>特定域</b>时需要填写,请将 Zone API 令牌范围指定为<b>全部域</b>,并分配 <i>Zone/Zone/Read</i> 权限。",
|
||||
"access.form.cloudflare_zone_api_token.help": "提示:仅当你将 DNS API 令牌范围指定为<b>特定域</b>时需要填写,请将 Zone API 令牌范围指定为<b>全部域</b>,并分配 <i>Zone/Zone/Read</i> 权限。",
|
||||
"access.form.cloudflare_zone_api_token.tooltip": "这是什么?请参阅 <a href=\"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/\" target=\"_blank\">https://developers.cloudflare.com/fundamentals/api/get-started/create-token/</a>",
|
||||
"access.form.cloudns_auth_id.label": "ClouDNS API 用户 ID",
|
||||
"access.form.cloudns_auth_id.placeholder": "请输入 ClouDNS API 用户 ID",
|
||||
"access.form.cloudns_auth_id.tooltip": "这是什么?请参阅 <a href=\"https://www.cloudns.net/wiki/article/42/\" target=\"_blank\">https://www.cloudns.net/wiki/article/42/</a>",
|
||||
|
||||
@ -60,8 +60,9 @@
|
||||
"workflow_node.apply.form.aws_route53_region.label": "AWS 服务区域",
|
||||
"workflow_node.apply.form.aws_route53_region.placeholder": "请输入 AWS Route53 服务区域(例如:us-east-1)",
|
||||
"workflow_node.apply.form.aws_route53_region.tooltip": "这是什么?请参阅 <a href=\"https://docs.aws.amazon.com/zh_cn/general/latest/gr/rande.html#regional-endpoints\" target=\"_blank\">https://docs.aws.amazon.com/zh_cn/general/latest/gr/rande.html#regional-endpoints</a>",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.label": "AWS Route53 托管区域 ID",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.label": "AWS Route53 托管区域 ID(可选)",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.placeholder": "请输入 AWS Route53 托管区域 ID",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.help": "提示:仅当存在多个相同 FQDN 的托管区域时需要填写。",
|
||||
"workflow_node.apply.form.aws_route53_hosted_zone_id.tooltip": "这是什么?请参阅 <a href=\"https://docs.aws.amazon.com/zh_cn/Route53/latest/DeveloperGuide/hosted-zones-working-with.html\" target=\"_blank\">https://docs.aws.amazon.com/zh_cn/Route53/latest/DeveloperGuide/hosted-zones-working-with.html</a>",
|
||||
"workflow_node.apply.form.huaweicloud_dns_region.label": "华为云服务区域",
|
||||
"workflow_node.apply.form.huaweicloud_dns_region.placeholder": "请输入华为云 DNS 服务区域(例如:cn-north-1)",
|
||||
@ -169,7 +170,7 @@
|
||||
"workflow_node.monitor.form.port.placeholder": "请输入主机端口",
|
||||
"workflow_node.monitor.form.domain.label": "域名(可选)",
|
||||
"workflow_node.monitor.form.domain.placeholder": "请输入域名",
|
||||
"workflow_node.monitor.form.domain.help": "提示:仅当主机地址为 IP 时需要输入。",
|
||||
"workflow_node.monitor.form.domain.help": "提示:仅当主机地址为 IP 时需要填写。",
|
||||
"workflow_node.monitor.form.request_path.label": "请求路径(可选)",
|
||||
"workflow_node.monitor.form.request_path.placeholder": "请输入请求路径",
|
||||
|
||||
@ -200,7 +201,7 @@
|
||||
"workflow_node.deploy.form.1panel_console_auto_restart.label": "部署后自动重启 1Panel 服务",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.label": "1Panel 子节点名称(可选)",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.placeholder": "请输入 1Panel 子节点名称",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.help": "提示:仅 1Panel v2+ 需要输入。不填写时,将替换主控节点证书;否则,将替换被控节点证书。",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.help": "提示:仅 1Panel v2+ 需要填写。不填写时,将替换主控节点证书;否则,将替换被控节点证书。",
|
||||
"workflow_node.deploy.form.1panel_site_node_name.tooltip": "请登录 1Panel 面板查看",
|
||||
"workflow_node.deploy.form.1panel_site_resource_type.option.website.label": "部署到指定网站",
|
||||
"workflow_node.deploy.form.1panel_site_resource_type.option.certificate.label": "替换指定证书",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user