Skip to content

Commit

Permalink
Cleanup fixes
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Frahry <[email protected]>
  • Loading branch information
dvob and mbfrahry committed Aug 4, 2023
1 parent 267c689 commit ec05d7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/services/keyvault/key_vault_certificate_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/Azure/azure-sdk-for-go/services/keyvault/v7.1/keyvault"
"github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down Expand Up @@ -404,7 +405,7 @@ func createCertificate(d *pluginsdk.ResourceData, meta interface{}) (keyvault.Ce
defer cancel()

name := d.Get("name").(string)
keyVaultId, err := parse.VaultID(d.Get("key_vault_id").(string))
keyVaultId, err := commonids.ParseKeyVaultID(d.Get("key_vault_id").(string))
if err != nil {
return keyvault.CertificateBundle{}, err
}
Expand Down Expand Up @@ -651,7 +652,7 @@ func keyVaultCertificateCreationRefreshFunc(ctx context.Context, client *keyvaul
return nil, "", fmt.Errorf("missing status in certificate operation")
}

if *operation.Status == "inProgress" {
if strings.EqualFold(*operation.Status, "inProgress") {
return operation, "Provisioning", nil
}

Expand Down

0 comments on commit ec05d7a

Please sign in to comment.