Skip to content

How does one create a certificate in keyvault via Bicep? #8457

Answered by brwilkinson
aegal asked this question in Q&A
Discussion options

You must be logged in to vote

You create certificates via policy.

There is a known issue about Certificates resource provider under keyvault not being published.

So you have to use an alternate method.

I use deploymentscripts

example for issuers, you can also do self signed instead of this, however it's not a valid cert

plus you may need some extra settings for these...

Module to create issuer

module CertificateIssuer 'x.CertificateIssuer.ps1.bicep' = [for (issuer, index) in CertIssuerInfo: {
  name: 'dp-kv-certificateissuer-${issuer.name}'
  params: {
    CertIssuerName: issuer.name
    CertIssuerProvider: issuer.provider
    Deployment: Deployment
    vaultName: KV.name
  }
}]

DeploymentScript in the Module

param C…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@brwilkinson
Comment options

Answer selected by brwilkinson
Comment options

You must be logged in to vote
4 replies
@brwilkinson
Comment options

@jeru81
Comment options

@brwilkinson
Comment options

@Zhaph
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants