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
resource "azurerm_app_service_certificate_order" "standard_cert" {
name = "example-cert-order"
resource_group_name = "fake"
location = "global"
distinguished_name = "CN=example.com"
}
resource "azurerm_app_service_certificate_order" "standard_cert" {
name = "example-cert-order"
resource_group_name = "fake"
location = "global"
distinguished_name = "CN=example.com"
}
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"
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
Parameters
-
app_service_certificate_not_renewable_reasonsoptional computed - list of string -
auto_renewoptional - bool -
certificatesoptional computed - list of object-
certificate_name- string -
key_vault_id- string -
key_vault_secret_name- string -
provisioning_state- string
-
-
csroptional computed - string -
distinguished_nameoptional computed - string -
domain_verification_tokenoptional computed - string -
expiration_timeoptional computed - string -
idoptional computed - string -
intermediate_thumbprintoptional computed - string -
is_private_key_externaloptional computed - bool -
key_sizeoptional - number -
locationrequired - string -
namerequired - string -
product_typeoptional - string -
resource_group_namerequired - string -
root_thumbprintoptional computed - string -
signed_certificate_thumbprintoptional computed - string -
statusoptional computed - string -
tagsoptional - map from string to string -
validity_in_yearsoptional - number -
timeoutssingle block
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.
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.
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.
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
apiVersionrequired - stringkindoptional - stringKind of resource.
locationrequired - stringResource Location.
namerequired - stringName of the certificate order.
propertiesrequiredautoRenewoptional - boolean<code>true</code> if the certificate should be automatically renewed when it expires; otherwise, <code>false</code>.
certificatesoptional - undefinedState of the Key Vault secret.
csroptional - stringLast CSR that was created for this order.
distinguishedNameoptional - stringCertificate distinguished name.
keySizeoptional - integerCertificate key size.
productTyperequired - stringCertificate product type.
validityInYearsoptional - integerDuration in years (must be 1).
tagsoptional - stringResource tags.
typerequired - 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.