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{}))