Terraform module for an Azure static website

Provisions an Azure storage account configured for static website hosting, with a sample HashiCafe website.

Enabled for Terraform Cloud no-code provisioning.

Requirements

Name Version
terraform >= 0.13
azurerm >= 3.0
random >= 3.0

Providers

Name Version
azurerm 3.74.0
random 3.5.1

Modules

No modules.

Resources

Name Type
azurerm_resource_group.website resource
azurerm_storage_account.website resource
azurerm_storage_blob.images resource
azurerm_storage_blob.index resource
random_integer.id resource
random_integer.product resource

Inputs

Name Description Type Default Required
delete_retention_days Number of days to retain deleted items. number n/a yes
department Value for the department tag. string "WebDev" no
env Value for the environment tag. string n/a yes
location The region where the resources are created. string n/a yes
prefix A prefix to add to the storage account name to make it unique. A random number will also be added. string n/a yes
storage_kind Kind of storage account to create. string "StorageV2" no
storage_replication_type Type of replication to use for the storage account. string "LRS" no
storage_tier Tier of the storage account. string "Standard" no

Outputs

Name Description
endpoint The storage account's self-hosted static site URL
product The product which was randomly selected.
resource_group_name The name of the Azure Resource Group that was created.
storage_account_name The name of the Azure Storage Account that was created.