Azure App Service (Web Apps) Certificate Order

This page shows how to write Terraform and Azure Resource Manager for App Service (Web Apps) Certificate Order and write them securely.

azurerm_app_service_certificate_order (Terraform)

The Certificate Order in App Service (Web Apps) can be configured in Terraform with the resource name azurerm_app_service_certificate_order. The following sections describe 4 examples of how to use the resource and its parameters.

Example Usage from GitHub

app_service_certificate_order_test.tf#L6
resource "azurerm_app_service_certificate_order" "standard_cert" {
  name                = "example-cert-order"
  resource_group_name = "fake"
  location            = "global"
  distinguished_name  = "CN=example.com"
}
app_service_certificate_order_test.tf#L6
resource "azurerm_app_service_certificate_order" "standard_cert" {
  name                = "example-cert-order"
  resource_group_name = "fake"
  location            = "global"
  distinguished_name  = "CN=example.com"
}
main.tf#L51
resource "azurerm_app_service_certificate_order" "example3" {
  name                = "example-cert-order"
  resource_group_name = azurerm_resource_group.example.name
  location            = "global"
  distinguished_name  = "CN=example.com"
  product_type        = "Standard"
main.tf#L7
resource "azurerm_app_service_certificate_order" "this" {
  auto_renew          = var.auto_renew
  csr                 = var.csr
  distinguished_name  = var.distinguished_name
  key_size            = var.key_size
  location            = var.location

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages an App Service Certificate Order.

Tips: Best Practices for The Other Azure App Service (Web Apps) Resources

In addition to the azurerm_app_service, Azure App Service (Web Apps) has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

azurerm_app_service

Ensure your App Service is accessible via HTTPS only

It is better to configure the App Service to be accessible via HTTPS only. By default, both HTTP and HTTPS are available.

risk-label

azurerm_function_app

Ensure to enable authentication to prevent anonymous request being accepted

It is better to enable authentication to prevent anonymous requests and ensure all communications in the application are authenticated.

Review your Azure App Service (Web Apps) settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

Microsoft.CertificateRegistration/certificateOrders (Azure Resource Manager)

The certificateOrders in Microsoft.CertificateRegistration can be configured in Azure Resource Manager with the resource name Microsoft.CertificateRegistration/certificateOrders. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

  • apiVersion required - string
  • kind optional - string

    Kind of resource.

  • location required - string

    Resource Location.

  • name required - string

    Name of the certificate order.

  • properties required
      • autoRenew optional - boolean

        <code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>.

      • certificates optional - undefined

        State of the Key Vault secret.

      • csr optional - string

        Last CSR that was created for this order.

      • distinguishedName optional - string

        Certificate distinguished name.

      • keySize optional - integer

        Certificate key size.

      • productType required - string

        Certificate product type.

      • validityInYears optional - integer

        Duration in years (must be 1).

  • tags optional - string

    Resource tags.

  • type required - string

Frequently asked questions

What is Azure App Service (Web Apps) Certificate Order?

Azure App Service (Web Apps) Certificate Order is a resource for App Service (Web Apps) of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure App Service (Web Apps) Certificate Order?

For Terraform, the gilyas/infracost, infracost/infracost and tommiefaj/Terraform-12-Project source code examples are useful. See the Terraform Example section for further details.