Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The sites/publicCertificates resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Web/sites/publicCertificates resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Web/sites/publicCertificates@2025-03-01' = {
parent: resourceSymbolicName
kind: 'string'
name: 'string'
properties: {
blob: any(...)
publicCertificateLocation: 'string'
}
}
Property Values
Microsoft.Web/sites/publicCertificates
| Name | Description | Value |
|---|---|---|
| kind | Kind of resource. | string |
| name | The resource name | string (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: sites |
| properties | PublicCertificate resource specific properties | PublicCertificateProperties |
PublicCertificateProperties
| Name | Description | Value |
|---|---|---|
| blob | Public Certificate byte array | any |
| publicCertificateLocation | Public Certificate Location | 'CurrentUserMy' 'LocalMachineMy' 'Unknown' |
Usage Examples
Bicep Samples
A basic example of deploying App Service Public Certificate.
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
name: resourceName
location: location
kind: 'Windows'
properties: {
isXenon: false
}
sku: {
capacity: 1
name: 'S1'
size: 'S1'
tier: 'Standard'
}
}
resource site 'Microsoft.Web/sites@2021-02-01' = {
name: resourceName
location: location
properties: {
clientAffinityEnabled: false
clientCertEnabled: false
enabled: true
httpsOnly: false
serverFarmId: serverfarm.id
siteConfig: {}
}
}
resource publicCertificate 'Microsoft.Web/sites/publicCertificates@2022-09-01' = {
parent: site
name: resourceName
properties: {
blob: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNzakNDQVpvQ0NRQ01kdDdEdnlnUHREQU5CZ2txaGtpRzl3MEJBUXNGQURBYk1Sa3dGd1lEVlFRRERCQmgKY0drdWRHVnljbUZtYjNKdEx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2E0OS9xU0h0LzZVTEtmTzAxL2NUczRpRjcxeWtYUGJoMwpLajljSTJ1bzlhWXRYa3hraEtyR3lVcEE3RkpxV3c9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=='
publicCertificateLocation: 'Unknown'
}
}
ARM template resource definition
The sites/publicCertificates resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Web/sites/publicCertificates resource, add the following JSON to your template.
{
"type": "Microsoft.Web/sites/publicCertificates",
"apiVersion": "2025-03-01",
"name": "string",
"kind": "string",
"properties": {
"blob": {},
"publicCertificateLocation": "string"
}
}
Property Values
Microsoft.Web/sites/publicCertificates
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2025-03-01' |
| kind | Kind of resource. | string |
| name | The resource name | string (required) |
| properties | PublicCertificate resource specific properties | PublicCertificateProperties |
| type | The resource type | 'Microsoft.Web/sites/publicCertificates' |
PublicCertificateProperties
| Name | Description | Value |
|---|---|---|
| blob | Public Certificate byte array | any |
| publicCertificateLocation | Public Certificate Location | 'CurrentUserMy' 'LocalMachineMy' 'Unknown' |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Install Public Certificate in App Service |
Install a Public Certificate in App Service. Once a public certificate is installed by deploying this template, it would be accessible to App Service code for consumption. This is supported only on dedicated App Service Plans. If your App Service is hosted on a public scale unit then you can only install certificates in CurrentUser-Personal certificate store. For App Service Environments, LocalMachine-Personal certificate store is also supported |
Terraform (AzAPI provider) resource definition
The sites/publicCertificates resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Web/sites/publicCertificates resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Web/sites/publicCertificates@2025-03-01"
name = "string"
parent_id = "string"
body = {
kind = "string"
properties = {
blob = ?
publicCertificateLocation = "string"
}
}
}
Property Values
Microsoft.Web/sites/publicCertificates
| Name | Description | Value |
|---|---|---|
| kind | Kind of resource. | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: sites |
| properties | PublicCertificate resource specific properties | PublicCertificateProperties |
| type | The resource type | "Microsoft.Web/sites/publicCertificates@2025-03-01" |
PublicCertificateProperties
| Name | Description | Value |
|---|---|---|
| blob | Public Certificate byte array | any |
| publicCertificateLocation | Public Certificate Location | 'CurrentUserMy' 'LocalMachineMy' 'Unknown' |
Usage Examples
Terraform Samples
A basic example of deploying App Service Public Certificate.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "serverfarm" {
type = "Microsoft.Web/serverfarms@2021-02-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
kind = "Windows"
properties = {
isXenon = false
}
sku = {
capacity = 1
name = "S1"
size = "S1"
tier = "Standard"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "site" {
type = "Microsoft.Web/sites@2021-02-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
clientAffinityEnabled = false
clientCertEnabled = false
enabled = true
httpsOnly = false
serverFarmId = azapi_resource.serverfarm.id
siteConfig = {
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "publicCertificate" {
type = "Microsoft.Web/sites/publicCertificates@2022-09-01"
parent_id = azapi_resource.site.id
name = var.resource_name
body = {
properties = {
blob = "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNzakNDQVpvQ0NRQ01kdDdEdnlnUHREQU5CZ2txaGtpRzl3MEJBUXNGQURBYk1Sa3dGd1lEVlFR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