mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 13:34:52 +00:00
feat: support replacing old certificate on deployment to aws acm
This commit is contained in:
@@ -5,6 +5,7 @@ import { z } from "zod";
|
||||
|
||||
type DeployNodeConfigFormAWSACMConfigFieldValues = Nullish<{
|
||||
region: string;
|
||||
certificateArn?: string;
|
||||
}>;
|
||||
|
||||
export type DeployNodeConfigFormAWSACMConfigProps = {
|
||||
@@ -27,6 +28,7 @@ const DeployNodeConfigFormAWSACMConfig = ({ form: formInst, formName, disabled,
|
||||
.string({ message: t("workflow_node.deploy.form.aws_acm_region.placeholder") })
|
||||
.nonempty(t("workflow_node.deploy.form.aws_acm_region.placeholder"))
|
||||
.trim(),
|
||||
certificateArn: z.string({ message: t("workflow_node.deploy.form.aws_acm_certificate_arn.placeholder") }).nullish(),
|
||||
});
|
||||
const formRule = createSchemaFieldRule(formSchema);
|
||||
|
||||
@@ -51,6 +53,15 @@ const DeployNodeConfigFormAWSACMConfig = ({ form: formInst, formName, disabled,
|
||||
>
|
||||
<Input placeholder={t("workflow_node.deploy.form.aws_acm_region.placeholder")} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="certificateArn"
|
||||
label={t("workflow_node.deploy.form.aws_acm_certificate_arn.label")}
|
||||
rules={[formRule]}
|
||||
tooltip={<span dangerouslySetInnerHTML={{ __html: t("workflow_node.deploy.form.aws_acm_certificate_arn.tooltip") }}></span>}
|
||||
>
|
||||
<Input placeholder={t("workflow_node.deploy.form.aws_acm_certificate_arn.placeholder")} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
);
|
||||
};
|
||||
|
@@ -37,7 +37,7 @@ const DeployNodeConfigFormAzureKeyVaultConfig = ({
|
||||
certificateName: z
|
||||
.string({ message: t("workflow_node.deploy.form.azure_keyvault_certificate_name.placeholder") })
|
||||
.nullish()
|
||||
.refine((v) =>{
|
||||
.refine((v) => {
|
||||
if (!v) return true;
|
||||
return /^[a-zA-Z0-9-]{1,127}$/.test(v);
|
||||
}, t("workflow_node.deploy.form.azure_keyvault_certificate_name.errmsg.invalid")),
|
||||
|
@@ -261,6 +261,9 @@
|
||||
"workflow_node.deploy.form.aws_acm_region.label": "AWS ACM Region",
|
||||
"workflow_node.deploy.form.aws_acm_region.placeholder": "Please enter AWS ACM region (e.g. us-east-1)",
|
||||
"workflow_node.deploy.form.aws_acm_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.deploy.form.aws_acm_certificate_arn.label": "AWS ACM certificate ARN (Optional)",
|
||||
"workflow_node.deploy.form.aws_acm_certificate_arn.placeholder": "Please enter AWS ACM certificate ARN",
|
||||
"workflow_node.deploy.form.aws_acm_certificate_arn.tooltip": "Leave it blank to import a new certificate.",
|
||||
"workflow_node.deploy.form.aws_cloudfront_region.label": "AWS CloudFront Region",
|
||||
"workflow_node.deploy.form.aws_cloudfront_region.placeholder": "Please enter AWS CloudFront region (e.g. us-east-1)",
|
||||
"workflow_node.deploy.form.aws_cloudfront_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>",
|
||||
|
@@ -260,6 +260,9 @@
|
||||
"workflow_node.deploy.form.aws_acm_region.label": "AWS ACM 服务区域",
|
||||
"workflow_node.deploy.form.aws_acm_region.placeholder": "请输入 AWS ACM 服务区域(例如:us-east-1)",
|
||||
"workflow_node.deploy.form.aws_acm_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.deploy.form.aws_acm_certificate_arn.label": "AWS ACM 证书 ARN(可选)",
|
||||
"workflow_node.deploy.form.aws_acm_certificate_arn.placeholder": "请输入 AWS ACM 证书 ARN",
|
||||
"workflow_node.deploy.form.aws_acm_certificate_arn.tooltip": "不填写时,将导入为新证书。",
|
||||
"workflow_node.deploy.form.aws_cloudfront_region.label": "AWS CloudFront 服务区域",
|
||||
"workflow_node.deploy.form.aws_cloudfront_region.placeholder": "请输入 AWS CloudFront 服务区域(例如:us-east-1)",
|
||||
"workflow_node.deploy.form.aws_cloudfront_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>",
|
||||
|
Reference in New Issue
Block a user