From 6dc6b7086003c54c7c50f7c89270193279438bf4 Mon Sep 17 00:00:00 2001 From: rculpepper Date: Wed, 18 Dec 2024 18:10:17 -0500 Subject: [PATCH] add notafter field --- internal/consts/consts.go | 1 + .../resource_pki_secret_backend_root_sign_intermediate.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/internal/consts/consts.go b/internal/consts/consts.go index 8f33f0a5e..4983a1d97 100644 --- a/internal/consts/consts.go +++ b/internal/consts/consts.go @@ -451,6 +451,7 @@ const ( FieldEabKey = "key" FieldAcmeDirectory = "acme_directory" FieldEabId = "eab_id" + FieldNotAfter = "not_after" /* common environment variables */ diff --git a/vault/resource_pki_secret_backend_root_sign_intermediate.go b/vault/resource_pki_secret_backend_root_sign_intermediate.go index f11848e59..f9d144943 100644 --- a/vault/resource_pki_secret_backend_root_sign_intermediate.go +++ b/vault/resource_pki_secret_backend_root_sign_intermediate.go @@ -220,6 +220,13 @@ func pkiSecretBackendRootSignIntermediateResource() *schema.Resource { Optional: true, Description: "Specifies the default issuer of this request.", }, + consts.FieldNotAfter: { + Type: schema.TypeString, + Optional: true, + Description: "Set the Not After field of the certificate with specified date value. " + + "The value format should be given in UTC format YYYY-MM-ddTHH:MM:SSZ. " + + "Supports the Y10K end date for IEEE 802.1AR-2018 standard devices, 9999-12-31T23:59:59Z.", + }, }, } } @@ -247,6 +254,7 @@ func pkiSecretBackendRootSignIntermediateCreate(ctx context.Context, d *schema.R consts.FieldProvince, consts.FieldStreetAddress, consts.FieldPostalCode, + consts.FieldNotAfter, } intermediateSignBooleanAPIFields := []string{