From 30bba1df18d7d49a2a4a7199988f106578d6b3d4 Mon Sep 17 00:00:00 2001 From: Haim Date: Tue, 10 Oct 2023 16:06:56 +0300 Subject: [PATCH] Fix handling of bundle_certs in Secrets Manager public cert --- .../secretsmanager/resource_ibm_sm_public_certificate.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go index 38a9853b6e..fb268ad8ed 100644 --- a/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go +++ b/ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go @@ -781,8 +781,9 @@ func resourceIbmSmPublicCertificateMapToSecretPrototype(d *schema.ResourceData) model.Dns = core.StringPtr(d.Get("dns").(string)) } } - if _, ok := d.GetOk("bundle_certs"); ok { - model.BundleCerts = core.BoolPtr(d.Get("bundle_certs").(bool)) + bundleCerts, ok := d.GetOkExists("bundle_certs") + if ok { + model.BundleCerts = core.BoolPtr(bundleCerts.(bool)) } if _, ok := d.GetOk("rotation"); ok { RotationModel, err := resourceIbmSmPublicCertificateMapToPublicCertificateRotationPolicy(d.Get("rotation").([]interface{})[0].(map[string]interface{}))